运行程序,然后用sys用户查看当前正在运行的sql:
select OSUSER, USERNAME, SQL_TEXT from V$SESSION a, V$SQLTEXT b
where a.SQL_ADDRESS = b.ADDRESS
order by ADDRESS, PIECE;
select OSUSER, USERNAME, SQL_TEXT from V$SESSION a, V$SQLTEXT b
where a.SQL_ADDRESS = b.ADDRESS
order by ADDRESS, PIECE;
能看到具体参数的实值?
比如传给ORACLE 参数pName = 'KING' pSex= 'B' pAge =null
Select * From Emp
where (Name =:pName or :pName is null) and (Age =:pAge or :pAge is null) and (Sex =:pSex or :pSex is null)
Additionally, setting the initialization parameter SQL_TRACE = TRUE causes the
SQL trace facility to generate performance statistics for the processing of all SQL
statements for an instance and write them to the USER_DUMP_DEST directory.
Optionally, trace files can be generated for server processes at user request.
Regardless of the current value of the SQL_TRACE initialization parameter, each
session can enable or disable trace logging on behalf of the associated server process
by using the SQL statement ALTER SESSION SET SQL_TRACE. This example
enables the SQL trace facility for a specific session:
ALTER SESSION SET SQL_TRACE TRUE;====================================================
Caution: Because the SQL trace facility for server processes can
cause significant system overhead resulting in severe performance
impact, enable this feature only when collecting statistics.