cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
anchaljain
Level 2

Executing an oracle script in IA

Hi,

I've just started using IA 2008, and need to update our custom oracle installer to run the following commands:

C:\>sqlplus sys/password as sysdba

SQL>EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;

SQL>PURGE DBA_RECYCLEBIN;
SQL>exit

Can someone please let me know what's the best way to do this? Should I add all of these as separate execute command actions, or put all of the commands in a file and use the execute script/batch file to run them.

Thanks in advance, any help will be much appreciated.
Labels (1)
0 Kudos
(3) Replies
pv7721
Level 20

I think both approaches should work.
0 Kudos
anchaljain
Level 2

Thanks.. my only doubt with putting all of these as separate commands was that the commands:

SQL>EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;

SQL>PURGE DBA_RECYCLEBIN;
SQL>exit

are not really commands you can directly enter in a command window, will they still be executed correctly since I'm connecting to sqlplus in the previous command?

If I put all of these in a file, do I use it as a batch file and include it in IA? or add them as scripts?
0 Kudos
pv7721
Level 20

Sorry, I missed that (i.e. that those 3 are commands written at the SQL prompt). I think you don't have any choice but put that into an .SQL script.
0 Kudos