cancel
Showing results for 
Search instead for 
Did you mean: 

SQLPlus query

Former Member
0 Kudos

Hi everybody,

I've a question regarding Oracle and SQLPlus on Windows OS. I hope somebody can help me.

I need to schedule a batch file that execute 2 queries everyday.

exemple :

SQLPLUS "/as sysdba" @d:\script1.sql

SQLPLUS "/as sysdba" @d:\script2.sql

Those queries takes around 3 or 4mn to run but after that the output takes 15 mn.

The goal of this batch is to put the execution plan in the cache of Oracle, so i don't need to display queries results.

Is there a way to prevent SQLPlus displaying query result?

Thanks a lot,

Accepted Solutions (1)

Accepted Solutions (1)

stefan_koehler
Active Contributor
0 Kudos

Hello Alexandre,

to be honest this way of keeping execution plans in the library cache is a little bit "strange".. but to answer your question "Is there a way to prevent SQLPlus displaying query result?".

If you want only to see no results you have to put the following line at the beginning of your sql script:

> set termout off;

If you also don't want to see the SQLPLUS banner, you have to call the sqlplus with the silent option as well:

> sqlplus -s "/as sysdba" @d:\script1.sql

Regards

Stefan

Former Member
0 Kudos

Thanks Stefan, I agree with you concerning my question.

I put the "set termout off;" in scripts and everything is ok.

Answers (0)