automating a script [message #622497] |
Wed, 27 August 2014 03:05  |
 |
farooqomar57
Messages: 3 Registered: August 2014
|
Junior Member |
|
|
I have a .sql script which takes two input parameters
DEF input_license = '&1';
DEF sql_id = '&2';
input license will always be Y
and i get the sqlid from the below query
select sql_id from v$sql_plan
say if i have 50 sqlids i have to input every id's manually ,so im thinking to automate this that way i can avoid inputting values manually.any thoughts how can this be done
|
|
|
|
|
|
|
|
|
Re: automating a script [message #622514 is a reply to message #622507] |
Wed, 27 August 2014 05:21  |
Lalit Kumar B
Messages: 3174 Registered: May 2013 Location: World Wide on the Web
|
Senior Member |
|
|
farooqomar57 wrote on Wed, 27 August 2014 14:36but i wanted to do it unix ie. spool the output of SELECT sql_id FROM V$SQL_PLAN to file
Just use SPOOL in a SQL*plus session. In your shell script open a sqlplus session, SPOOL location:\filename, your query and finally spool off.
|
|
|