The questions I have are:
- Why does this log file point to exceptions that seemingly don’t exist?
- How am I supposed to diagnose this if I can’t locate the error?
- Does anybody have a solution for printing these logs out in their terminal, with the correct columns and line indentation (it looks like the log files are observing 80 total columns; 0-79, which seems to be an artifact of time immemorial)?
I ran into an issue with a recent Oracle REST Data Services (ORDS) install, and I see the exceptions in the log, like this (tail end of the log file):
102 end;
103 Error report -
104 ORA-01031: insufficient privileges
105 ORA-06512: at "ORDS_METADATA.ORDS_ADMIN", line 1148
106 ORA-06512: at "ORDS_METADATA.ORDS_INTERNAL", line 512
107 ORA-06512: at "ORDS_METADATA.ORDS_INTERNAL", line 602
108 ORA-06512: at "ORDS_METADATA.ORDS_INTERNAL", line 602
109 ORA-06512: at "ORDS_METADATA.ORDS_ADMIN", line 1137
110 ORA-06512: at line 43
111 ORA-06512: at line 86
112 01031. 00000 - "insufficient privileges"
113 *Document: YES
114 *Cause: A database operation was attempted without the required
115 privilege(s).
116 *Action: Ask your database administrator or security administrator to
grant
117 you the required privilege(s).
118
119 More Details :
120 https://docs.oracle.com/error-help/db/ora-01031/
121 https://docs.oracle.com/error-help/db/ora-06512/
But when I retrieve one of these PL/SQL packages, and open in either Database Actions (in my Autonomous Database) or my mac terminal, nothing “lines up.” Take for instance ORDS_METADATA.ORDS_INTERNAL
:
The lines actually stop at 501. And same if I open the file in my terminal. I was able to find a command that got me part of the way there: cat -n demo-4.sql | fold
Which produced this:
Even with the absence of correct indentation (on new/next lines), I still don’t see the exception. On the bright side, at least they line up with each other. Seems like log files from other Oracle products do this too, is that true?
What I’ve attempted thus far:
- Spent 1-2 hours reserching the following commands:
- vi/ex commands
- Sed command
- Read through the zsh manual for 1-2 hours
- Spent another 1 hour trying to get a single command to work (achieved some results, although pretty poor).