Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Get the SQL query text in the logfile when using sqlplus in nohup

XerXiJun 24 2015 — edited Jun 25 2015

Hello,

I have a script for issuing commands to sqlplus, using nohup. It looks like this:

echo "

connect / as sysdba

set echo on

set feedback on

set time on

alter index WRH\$_EVENT_HISTOGRAM_PK rebuild partition WRH\$_EVENT__1016414561_24006;

quit

" | sqlplus /nolog > /home/oracle/${ORACLE_SID}_sysaux.log

In the logfile I get "Index altered." but without the actual SQL query. Is there a way to get that also in the log?

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 23 2015
Added on Jun 24 2015
3 comments
558 views