Home > Database > Mysql Tutorial > body text

oracle 10g 获得dump文件的名称和位置

WBOY
Release: 2016-06-07 15:44:35
Original
1247 people have browsed it

select u_dump.value||'/'||db_name.value||'_ora_'||v$process.spid||nvl2(v$process.traceid,'_'||v$process.traceid,null)||'.trc' trace file from v$parameter u_dump cross join v$parameter db_name cross join v$process join v$session on v$proces

select u_dump.value||'/'||db_name.value||'_ora_'||v$process.spid||nvl2(v$process.traceid,'_'||v$process.traceid,null)||'.trc' "trace file" from v$parameter u_dump cross join v$parameter db_name cross join v$process join v$session on v$process.addr=v$session.paddr where u_dump.name='user_dump_dest' and db_name.name='db_name' and v$session.audsid=sys_context('userenv','sessionid');

 

注释:select后的字符串组成句子再执行的例子,那是字符串里有程序包的存在。



查看当前用户的trace file路径:

select p.value || '\' || t.instance || '_ora_' || ltrim(to_char(p.spid,'fm99999')) || '.trc'

    from v$process p, v$session s, v$parameter p, v$thread t

    where p.addr = s.paddr and s.audsid = userenv('sessionid') and p.name = 'user_dump_dest';


http://logicgate.iteye.com/blog/419292

 


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template