Re: Is there an Event for Capturing Oracle Errors in a Trace File?

Andrew, how many database links do you use in that particular=20
application?=20
Here is the full error text for your error:

$ oerr ora 12345
12345, 00000, "user %s lacks CREATE SESSION privilege in database link=20
(linkname %s)"
// *Cause: There are several possible causes for this message:
//         First, you will get this message if your username in the
//         second database specified was not granted the
//         CREATE SESSION system privilege.
//         Second, you will get this message if the username specified
//         in the connect string of the database link definition was
//         not granted the CREATE SESSION system privilege.
// *Action: The action you take depends upon the cause of the message:
//         In the first case, ensure that your username in the=20
secondary
//         database was granted the CREATE SESSION system privilege.
//         In the second case, ensure the username specified in the
//         connect string of the database link definition was granted
//         the CREATE SESSION system privilege in the secondary=20
database.
$

What kind of the pertinent text are you looking for? You can attach=20
oradebug to the session and do the following:

SQL> oradebug session_event 12345 trace name errorstack forever, level  12
Statement processed.
SQL>

If you don't like session event, you can set the event in the process, by u=
sing "event"
instead of the "session_event". In case of dedicated session, it's the same=
 thing.
The only thing to be gained by that is the SQL causing the error. The rest =
will be
gibberish. I still don't uderstand the problem. Unless you have many databa=
se links,
the problem looks pretty clear to me.





On 09/16/2004 09:51:49 PM, Andrew V Zitelli wrote:
> Is there an Oracle event that can be set, to capture the details of=20
> the
> database session's errors in a trace file ?  Use of Oracle event=20
> 10046
> provides only a simple indication that an error was raised, but does=20
> not
> provide details.  For example:
>=20
>      EXEC
> #1:c=3D10000,e=3D10498,p=3D0,cr=3D10,cu=3D9,mis=3D0,r=3D0,dep=3D0,og=3D4,
> tim=3D1526794508053
>      ERROR #1:err=3D1 tim=3D156343757
>=20
> I would like to capture the error number (e.g. ORA-12345) and=20
> pertinent
> text if possible.  I do not require the entire error stack, simply=20
> the
> error as returned to a client application.  Can anyone point me to=20
> details
> on an event like this?  I am using Oracle 9.2 and 10.1 under Solaris.
>=20
> Kind regards,
>=20
> Andy Zitelli,
> Raytheon, Fullerton, CA
>=20
> --
> http://www.freelists.org/webpage/oracle-l
>=20
>=20

--=20
Mladen Gogala
Oracle DBA


--
http://www.freelists.org/webpage/oracle-l

Other related posts: