Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Parsing the spool file.....
Hi all,
I have a question. We have a dumb ass configuration management team. Basically they want us to prepare Unix script with the necessary code to apply the changes to the Oracle database, and the CM team will apply the changes out to the field.
Here is an example script:
sqlplus /@$1 <<EOF
GRANT SELECT ON dba_tab_columns TO mirs_dynamic_data; GRANT SELECT ON dba_synonyms TO mirs_dynamic_data; GRANT SELECT ON dba_objects TO mirs_dynamic_data;
I'd like to get something that will go through the file and when it finds an ORA- error, it prints out the previous say 10 lines so one can see what led up to the error.
Additionally, a typical log file would look like this:
Synonym created.
Grant succeeded.
Table altered.
Table dropped.
Table created.
Warning: Trigger created with compilation errors.
SELECT * FROM OLD_A_FDBK_DD2246
*
ERROR at line 9:
ORA-00942: table or view does not exist
Where it says the Trigger had warnings, how do I know the trigger name??? Is there any way to echo the name of the procedure or object it is working with???
Thanks!! Received on Wed Oct 04 2006 - 16:04:24 CDT
![]() |
![]() |