Skip to Main Content

SQL & PL/SQL

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!

How to trace SQL output in a log file using bash

user4736028Jun 29 2016 — edited Jun 29 2016

Hi,

i'm using this code in a bash shell :

     sqlplus user/pw@DB << EOF

          @scriptRCA.sql $1 $2;

          exit;

     EOF

The sql script execute some delete, insert and update.

I need to write in a log file the output i could see in the console, for example 

ERROR at line 1:

ORA-22288: file or LOB operation FILEOPEN failed

No such file or directory

ORA-06512: at "SYS.XMLTYPE", line 296

ORA-06512: at line 1

ORA-06512: at line 17

I googled for this and i've found a lot of suggestions, but no one work....

i'm quite desperate

Help me pleas

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2016
Added on Jun 29 2016
9 comments
2,168 views