Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> 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=20database.
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> #1:c=3D10000,e=3D10498,p=3D0,cr=3D10,cu=3D9,mis=3D0,r=3D0,dep=3D0,og=3D4,
> EXEC
>=20
>=20
>=20
>=20
--=20
Mladen Gogala
Oracle DBA
-- http://www.freelists.org/webpage/oracle-lReceived on Thu Sep 16 2004 - 21:49:38 CDT
![]() |
![]() |