SELECT DIRCTIONARY.* FROM DIRCTIONARY WHERE (TYPE =
请问怎么才能显示完整的SQL?
另外SQL Text页始终没有内容,其Query的内容我也没有改过,如下
select sql_text from v$sqltext_with_newlines
where address = hextoraw(:sql_address)
and hash_value = :sql_hash_value
order by piece
4 个解决方案
#1
取一下length(sql_text)看是不是 显示全了。
#2
select a.SID, b.SQL_TEXT
from v$session a, v$sqltext b
where a.SQL_ADDRESS=b.ADDRESS
and a.sid=&v_sid;
可以找到SQL语句
from v$session a, v$sqltext b
where a.SQL_ADDRESS=b.ADDRESS
and a.sid=&v_sid;
可以找到SQL语句
#3
启用当前session的跟踪:
SQL> alter session set sql_trace=true;
SQL>alter session set events '10046 trace name context forever, level 12';
以上生成的跟踪文件位于user_dump_dest目录中,位置及文件名可以通过以下SQL查询获得
SQL> select 2 d.value||'/'||lower(rtrim(i.instance, chr(0)))||'_ora_'||p.spid||'.trc' trace_file_name 3 from 4 ( select p.spid 5 from sys.v$mystat m,sys.v$session s,sys.v$process p 6 where m.statistic# = 1 and s.sid = m.sid and p.addr = s.paddr) p, 7 ( select t.instance from sys.v$thread t,sys.v$parameter v 8 where v.name = 'thread' and (v.value = 0 or t.thread# = to_number(v.value))) i, 9 ( select value from sys.v$parameter where name = 'user_dump_dest') d 10 /
SQL> alter session set sql_trace=true;
SQL>alter session set events '10046 trace name context forever, level 12';
以上生成的跟踪文件位于user_dump_dest目录中,位置及文件名可以通过以下SQL查询获得
SQL> select 2 d.value||'/'||lower(rtrim(i.instance, chr(0)))||'_ora_'||p.spid||'.trc' trace_file_name 3 from 4 ( select p.spid 5 from sys.v$mystat m,sys.v$session s,sys.v$process p 6 where m.statistic# = 1 and s.sid = m.sid and p.addr = s.paddr) p, 7 ( select t.instance from sys.v$thread t,sys.v$parameter v 8 where v.name = 'thread' and (v.value = 0 or t.thread# = to_number(v.value))) i, 9 ( select value from sys.v$parameter where name = 'user_dump_dest') d 10 /
#4
抱歉,前段时间封闭开发,跟踪的SQL每次只能现实64个字符
不管怎样,今天晚上结贴,太久了
不管怎样,今天晚上结贴,太久了
#1
取一下length(sql_text)看是不是 显示全了。
#2
select a.SID, b.SQL_TEXT
from v$session a, v$sqltext b
where a.SQL_ADDRESS=b.ADDRESS
and a.sid=&v_sid;
可以找到SQL语句
from v$session a, v$sqltext b
where a.SQL_ADDRESS=b.ADDRESS
and a.sid=&v_sid;
可以找到SQL语句
#3
启用当前session的跟踪:
SQL> alter session set sql_trace=true;
SQL>alter session set events '10046 trace name context forever, level 12';
以上生成的跟踪文件位于user_dump_dest目录中,位置及文件名可以通过以下SQL查询获得
SQL> select 2 d.value||'/'||lower(rtrim(i.instance, chr(0)))||'_ora_'||p.spid||'.trc' trace_file_name 3 from 4 ( select p.spid 5 from sys.v$mystat m,sys.v$session s,sys.v$process p 6 where m.statistic# = 1 and s.sid = m.sid and p.addr = s.paddr) p, 7 ( select t.instance from sys.v$thread t,sys.v$parameter v 8 where v.name = 'thread' and (v.value = 0 or t.thread# = to_number(v.value))) i, 9 ( select value from sys.v$parameter where name = 'user_dump_dest') d 10 /
SQL> alter session set sql_trace=true;
SQL>alter session set events '10046 trace name context forever, level 12';
以上生成的跟踪文件位于user_dump_dest目录中,位置及文件名可以通过以下SQL查询获得
SQL> select 2 d.value||'/'||lower(rtrim(i.instance, chr(0)))||'_ora_'||p.spid||'.trc' trace_file_name 3 from 4 ( select p.spid 5 from sys.v$mystat m,sys.v$session s,sys.v$process p 6 where m.statistic# = 1 and s.sid = m.sid and p.addr = s.paddr) p, 7 ( select t.instance from sys.v$thread t,sys.v$parameter v 8 where v.name = 'thread' and (v.value = 0 or t.thread# = to_number(v.value))) i, 9 ( select value from sys.v$parameter where name = 'user_dump_dest') d 10 /
#4
抱歉,前段时间封闭开发,跟踪的SQL每次只能现实64个字符
不管怎样,今天晚上结贴,太久了
不管怎样,今天晚上结贴,太久了