运行程序,然后用sys用户查看当前正在运行的sql:
select OSUSER, USERNAME, SQL_TEXT from V$SESSION a, V$SQLTEXT b
    where a.SQL_ADDRESS = b.ADDRESS
    order by ADDRESS, PIECE;

解决方案 »

  1.   

    zakat(听者如歌) 
    能看到具体参数的实值?
      

  2.   

    天啊 你没看懂吗?请问如何找到ORACLE真实的SQL执行语句?
    比如传给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)
      

  3.   

    看完下面就知道怎么取真实的sql了....Trace files are written on behalf of server processes whenever internal errors occur.
    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.