惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
Spread Privacy
Spread Privacy
I
InfoQ
V
V2EX
S
Schneier on Security
小众软件
小众软件
C
CERT Recently Published Vulnerability Notes
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Stack Overflow Blog
Stack Overflow Blog
T
Threat Research - Cisco Blogs
L
Lohrmann on Cybersecurity
Recent Announcements
Recent Announcements
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Attack and Defense Labs
Attack and Defense Labs
云风的 BLOG
云风的 BLOG
The Hacker News
The Hacker News
S
SegmentFault 最新的问题
C
Cybersecurity and Infrastructure Security Agency CISA
NISL@THU
NISL@THU
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
GbyAI
GbyAI
Latest news
Latest news
S
Secure Thoughts
Project Zero
Project Zero
MongoDB | Blog
MongoDB | Blog
I
Intezer
Security Latest
Security Latest
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
N
Netflix TechBlog - Medium
V2EX - 技术
V2EX - 技术
量子位
T
Threatpost
T
The Blog of Author Tim Ferriss
Y
Y Combinator Blog
T
Tor Project blog
A
Arctic Wolf
Microsoft Security Blog
Microsoft Security Blog
T
The Exploit Database - CXSecurity.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
C
Check Point Blog
博客园 - Franky
Google DeepMind News
Google DeepMind News
The Register - Security
The Register - Security
The GitHub Blog
The GitHub Blog
L
LINUX DO - 热门话题

博客园 - 知道得越多知道的越少

window10上登录Oracle时提示ORA-12546:Permission denied 大表的主键创建优化技术(转一篇有深度的文章) Oracle并行执行特性应用初探 解决Rhel5上安装VMWare tools的问题 Oracle 性能诊断艺术 第四章 笔记 Oracle国外站点汇集 查出全表扫描的相关SQL语句 SQL条件的顺序对性能的影响 用SQL语句求排除断号的号码串 易用性规范 64位Oracle数据库环境下安装使用32位的PLSQL-Developer 使用Pivot进行行列转换不能合并为一行的问题 删除Oracle程序,重装后遇到的两个小问题 闪回查询,9i,10G到11G的不断增强 归档日志充满的问题解决 ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务 问题解决 生成SQL记录集的一些数据 导入的数据,删除约束后没有自动删除对应索引,重建约束出错 如何取出某一用户的密码,再原封不动的改回去?
在客户端通过外部表访问Trace文件的内容
知道得越多知道的越少 · 2010-05-06 · via 博客园 - 知道得越多知道的越少

有时候,因为服务器的权限原因,或者因为异构操作系统等因素,我们无法及时获取Trace文件,下面这种方法通过SQL查询读出Trace文件的内容。

1。先查出Trace文件的名称及目录;

2。建立目录对象;

3。创建外部表;

4。查询外部表;代码

Select d.Value || '\' || Lower(RTrim(i.Instance, Chr(0))) || '_ora_' || p.Spid || '.trc' Trace_File_Name
From (Select p.Spid
       
From Sys.V$mystat M, Sys.V$session S, Sys.V$process P
       
Where m.Statistic# = 1 And s.Sid = m.Sid And p.Addr = s.Paddr) P,
     (
Select t.Instance
       
From Sys.V$thread T, Sys.V$parameter V
       
Where v.Name = 'thread' And (v.Value = 0 Or t.Thread# = To_Number(v.Value))) I,
     (
Select Value From Sys.V$parameter Where Name = 'user_dump_dest') Dcreate directory tracefile as 'G:\ORACLE\PRODUCT\10.2.0\DB_1\ADMIN\ORCL\UDUMP';
create table tracefile 
 (
TEXT varchar2(4000))
 organization external (
 type oracle_loader
 
default directory tracefile
 access parameters (
 records delimited 
by newline
 nobadfile
 nodiscardfile
 nologfile 
 )
 location(
'orcl_ora_4800.trc')
 ) reject limit Unlimited;
 
 
select * from tracefile;