Hi.

You would need to wrap the "ALTER SESSION" into an Execute Immediate
statement:

EXECUTE IMMEDIATE 'ALTER SESSION SET EVENTS ''10046 trace name content
forever, level 4''';

Regards,
     Mark.

PS:  Single quotes become double quotes since the whole thing is wrapped in
another set of quotes, and the semi-colon is removed from the statement
being wrapped up.




                                                                                       
                              
                    "Bahar, Rivaldi                                                    
                              
                    (BBASSI-CHQ)"          To:     Multiple recipients of list 
ORACLE-L <[EMAIL PROTECTED]>       
                    <rivaldi.bahar@b       cc:                                         
                              
                    bassi.com>             Subject:     RE: Bind variables             
                              
                    Sent by:                                                           
                              
                    [EMAIL PROTECTED]                                                   
                              
                                                                                       
                              
                                                                                       
                              
                    11/02/2003 06:53                                                   
                              
                    Please respond                                                     
                              
                    to 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).




<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   Privileged/Confidential information may be contained in this message.
          If you are not the addressee indicated in this message
       (or responsible for delivery of the message to such person),
            you may not copy or deliver this message to anyone.
In such case, you should destroy this message and kindly notify the sender
           by reply e-mail or by telephone on (61 3) 9612-6999.
   Please advise immediately if you or your employer does not consent to
                Internet e-mail for messages of this kind.
        Opinions, conclusions and other information in this message
              that do not relate to the official business of
                         Transurban City Link Ltd
         shall be understood as neither given nor endorsed by it.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<---->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Mark Richard
  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