redirect explain plan in a file

Database

redirect explain plan in a file

Hello,

I have to create a bteq script that automaticly get sql query done (in dbc.accesslog) for a user, and then do the explain plan of these queries.
But i need to redirect theses explain plans in a file.
WHat is the best way to do that ?
In a bteq, how d oyou redirect the result of a query in an os file ?

Thanks a lot.
1 REPLY
N/A

Re: redirect explain plan in a file

use the following commands in your bteq to export the result of a query to a file :

.export report file="filename"
your query;
.export reset