Ai
1 Star 1 Fork 0

冯际成/Oracle_SQL_Scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
sess_user_trace_file_loc.sql 1.48 KB
一键复制 编辑 原始数据 按行查看 历史
Abdul mohammed 提交于 2016-02-06 08:58 +08:00 . Fri Feb 5 18:58:16 CST 2016
-- | PURPOSE : Oracle writes TRACE to the directory based on the value of your |
-- | "user_dump_dest" parameter in init.ora file. The trace files |
-- | use the "System Process ID" as part of the file name to ensure |
-- | a unique file for each user session. The following query helps |
-- | the DBA to determine where the TRACE files will be written and |
-- | the name of the file it would create for its particular |
-- | session. |
-- | NOTE : As with any code, ensure to test this script in a development |
-- | environment before attempting to run it in production. |
-- +----------------------------------------------------------------------------+
SET PAGESIZE 9999
COLUMN "Trace File Path" FORMAT a65 HEADING 'Your tracefile with path is:'
SELECT
a.trace_path || ' > ' || b.trace_file "Trace File Path"
FROM
( SELECT value trace_path
FROM v$parameter
WHERE name='user_dump_dest'
) a
, ( SELECT c.instance || '_ora_' || spid ||'.trc' TRACE_FILE
FROM v$process,
(SELECT LOWER(instance) instance FROM v$thread) c
WHERE addr = ( SELECT paddr
FROM v$session
WHERE audsid = ( SELECT userenv('SESSIONID')
FROM dual
)
)
) b
/
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/sapall/Oracle_SQL_Scripts.git
git@gitee.com:sapall/Oracle_SQL_Scripts.git
sapall
Oracle_SQL_Scripts
Oracle_SQL_Scripts
master

搜索帮助