- SQL> select userenv('sid') from dual;
-
- USERENV('SID')
- --------------
- 70
-
- SQL>
- SQL> SET SERVEROUTPUT ON SIZE 99999;
- SQL> EXECUTE PRINT_TABLE('SELECT SQL_TEXT FROM V$SQL S,V$TRANSACTION T WHERE S.LAST_ACTIVE_TIME=T.START_DATE');
- SQL_TEXT : delete from test where object_id=12
- -----------------
- SQL_TEXT : select
- grantee#,privilege#,nvl(col#,0),max(mod(nvl(option$,0),2))from objauth$ where
- obj#=:1 group by grantee#,privilege#,nvl(col#,0) order by grantee#
- -----------------
- SQL_TEXT : SELECT /* OPT_DYN_SAMP */ /*+ ALL_ROWS
- IGNORE_WHERE_CLAUSE NO_PARALLEL(SAMPLESUB)
- opt_param('parallel_execution_enabled', 'false') NO_PARALLEL_INDEX(SAMPLESUB)
- NO_SQL_TUNE */ NVL(SUM(C1),0), NVL(SUM(C2),0) FROM (SELECT /*+
- IGNORE_WHERE_CLAUSE NO_PARALLEL("TEST") FULL("TEST") NO_PARALLEL_INDEX("TEST")
- */ 1 AS C1, CASE WHEN "TEST"."OBJECT_ID"=12 THEN 1 ELSE 0 END AS C2 FROM "TEST"
- SAMPLE BLOCK (6.134372 , 1) SEED (1) "TEST") SAMPLESUB
- -----------------
- SQL_TEXT : select col#, grantee#,
- privilege#,max(mod(nvl(option$,0),2)) from objauth$ where obj#=:1 and col# is
- not null group by privilege#, col#, grantee# order by col#, grantee#
- -----------------
- SQL_TEXT : select
- type#,blocks,extents,minexts,maxexts,extsize,extpct,user#,iniexts,NVL(lists,6553
- 5),NVL(groups,65535),cachehint,hwmincr,
- NVL(spare1,0),NVL(scanhint,0),NVL(bitmapranges,0) from seg$ where ts#=:1 and
- file#=:2 and block#=:3
- -----------------
- PL/SQL procedure successfully completed.