alter session is DDL, you should do:

execute immediate 'ALTER Session SET EVENTS ''10046 trace name context
forever, level 4''';

Richard

-----Original Message-----
Sent: Monday, February 10, 2003 2:54 PM
To: Multiple recipients of list ORACLE-L


It worked well from SQLplus but not from procedure.
Did I miss something ?

SQL>    create or replace procedure testtrace
  2       as
  3    vempno varchar2(3);
  4    vempno1 varchar2(3);
  5    begin
  6   ALTER Session SET EVENTS '10046 trace name context forever, level 4';
  7  select empno into vempno from test where rownum  < 2;
  8   select empno into vempno1 from test1 where rownum < 2;
  9   end;
 10  /

Warning: Procedure created with compilation errors.

SQL> show error
Errors for PROCEDURE TESTTRACE:

LINE/COL ERROR
-------- -----------------------------------------------------------------
6/2      PLS-00103: Encountered the symbol "ALTER" when expecting one of
         the following:
         begin declare exit for goto if loop mod null pragma raise
         return select update while <an identifier>
         <a double-quoted delimited-identifier> <a bind variable> <<
         close current delete fetch lock insert open rollback
         savepoint set sql execute commit forall
         <a single-quoted SQL string>

-----Original Message-----
Sent: Monday, February 10, 2003 12:59 PM
To: Multiple recipients of list ORACLE-L


In order to see the actual value of bind variables, you need to use
event 10046 with level 4.

from your procedure do:

alter session set events '10046 trace name context forever, level 4'

Richard

-----Original Message-----
Sent: Monday, February 10, 2003 12:29 PM
To: Multiple recipients of list ORACLE-L


Hi Listers,

I set the sql trace true in a procedure, 
let's say the procedure testproc(var1 IN number, var2 IN varchar2).
Is there a way to know the value passed to that procedure (the value of var1
and
var2) in the trace file ? And also the value of bind variable of each SQL 
statement in that procedure ?

The procedure called through application, not from SQLplus.

Thanks.


****************************************************************************
************************************
This e-mail, including any attachments, may include confidential and/or
proprietary information,
and is intended for use only by the person or entity to which it is
addressed.  If the reader of this
e-mail is not the intended recipient, or his or her authorized agent, the
reader is hereby notified
that any dissemination, distribution, or copying of this e-mail is strictly
prohibited.  If you have
received this e-mail in error, please notify the sender by replying to this
message and delete
this e-mail immediately.
****************************************************************************
************************************
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Bahar, Rivaldi (BBASSI-CHQ)
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Richard Ji
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

****************************************************************************
************************************
This e-mail, including any attachments, may include confidential and/or
proprietary information,
and is intended for use only by the person or entity to which it is
addressed.  If the reader of this
e-mail is not the intended recipient, or his or her authorized agent, the
reader is hereby notified
that any dissemination, distribution, or copying of this e-mail is strictly
prohibited.  If you have
received this e-mail in error, please notify the sender by replying to this
message and delete
this e-mail immediately.
****************************************************************************
************************************
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Bahar, Rivaldi (BBASSI-CHQ)
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Richard Ji
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to