Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Bind variables
Try
exec sql alter session set events .........
Rajesh
-----Original Message-----
Sent: Monday, February 10, 2003 11:54 AM
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.
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: ListGuru_at_fatcity.com (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).
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: ListGuru_at_fatcity.com (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).
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: ListGuru_at_fatcity.com (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: Pillai, Rajesh
INET: Rajesh.Pillai_at_nordstrom.com
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: ListGuru_at_fatcity.com (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). Received on Mon Feb 10 2003 - 15:18:51 CST