Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2828096
  • 博文数量: 599
  • 博客积分: 16398
  • 博客等级: 上将
  • 技术积分: 6875
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-30 12:04
个人简介

WINDOWS下的程序员出身,偶尔也写一些linux平台下小程序, 后转行数据库行业,专注于ORACLE和DB2的运维和优化。 同时也是ios移动开发者。欢迎志同道合的朋友一起研究技术。 数据库技术交流群:58308065,23618606

文章分类

全部博文(599)

文章存档

2014年(12)

2013年(56)

2012年(199)

2011年(105)

2010年(128)

2009年(99)

分类: Oracle

2013-08-01 11:35:20


一直以来感觉跟踪EXP都比较麻烦,MOS 上有篇文章来介绍EXP的跟踪

Getting 10046 Trace for Export and Import [ID 258418.1]

最近发现EXP还有个专门的跟踪参数TRACE=TRUE,这使得跟踪EXP变的格外简单。

[oracle@db2server ~]$ exp test/test file=test.dmp trace=true 

Export: Release 11.2.0.3.0 - Production on Thu Aug 1 00:37:39 2013

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Export done in ZHS16GBK character set and AL16UTF16 NCHAR character set

About to export specified users ...
. exporting pre-schema procedural objects and actions
. exporting foreign function library names for user TEST 
. exporting PUBLIC type synonyms
. exporting private type synonyms
. exporting object type definitions for user TEST 
About to export TEST's objects ...
. exporting database links
. exporting sequence numbers
. exporting cluster definitions
. about to export TEST's tables via Conventional Path ...
. . exporting table                              A          0 rows exported
. . exporting table                           CPIC          0 rows exported
. . exporting table                           DEPT          4 rows exported
. . exporting table                            EMP         14 rows exported
. . exporting table                          HAIER          9 rows exported
. . exporting table                    PART_TAB_P1          0 rows exported
. . exporting table                    PART_TAB_P2          1 rows exported
. . exporting table                    PART_TAB_P3          1 rows exported
. . exporting table                    PART_TAB_P4          1 rows exported
. . exporting table                    PART_TAB_P5          2 rows exported
. . exporting table                      PRODUCT_A          2 rows exported
. . exporting table                      PRODUCT_B          2 rows exported
. . exporting table                             T1         10 rows exported
. . exporting table                             T2         10 rows exported
. . exporting table                       TEMP_TMP
. . exporting table                           TEST      75926 rows exported
. . exporting table                          TMP_T
. . exporting table                       T_OBJECT     146946 rows exported
. . exporting table                       WIDE_TBL         31 rows exported
. exporting synonyms
. exporting views
. exporting stored procedures
. exporting operators
. exporting referential integrity constraints
. exporting triggers
. exporting indextypes
. exporting bitmap, functional and extensible indexes
. exporting posttables actions
. exporting materialized views
. exporting snapshot logs
. exporting job queues
. exporting refresh groups and children
. exporting dimensions
. exporting post-schema procedural objects and actions
. exporting statistics
Export terminated successfully without warnings.


跟踪文件发现ORACLE实际执行了一条ALTER SESSION SET SQL_TRACE = TRUE的语句,
这仅仅是LEVEL 1的跟踪,如果要更高级别的跟踪,还得采用ID 258418.1介绍的方法。


[root@db2server trace]# more huateng_ora_16762.trc
Trace file /u01/app/oracle/diag/rdbms/huateng/huateng/trace/huateng_ora_16762.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/db11.2.0.3
System name:    Linux
Node name:      db2server
Release:        2.6.18-92.el5
Version:        #1 SMP Tue Jun 10 18:49:47 EDT 2008
Machine:        i686
VM name:        VMWare Version: 6
Instance name: huateng
Redo thread mounted by this instance: 1
Oracle process number: 19
Unix process pid: 16762, image: oracle@db2server (TNS V1-V3)




*** 2013-08-01 00:37:40.524
*** SESSION ID:(1.7) 2013-08-01 00:37:40.524
*** CLIENT ID:() 2013-08-01 00:37:40.524
*** SERVICE NAME:(SYS$USERS) 2013-08-01 00:37:40.524
*** MODULE NAME:(exp@db2server (TNS V1-V3)) 2013-08-01 00:37:40.524
*** ACTION NAME:() 2013-08-01 00:37:40.524
 
=====================
PARSING IN CURSOR #12071688 len=34 dep=0 uid=96 oct=42 lid=96 tim=1375288660523391 hv=3913151867 ad='65feb0' sqlid='14ys3d7nmvxbv'
ALTER SESSION SET SQL_TRACE = TRUE
END OF STMT
EXEC #12071688:c=7999,e=9296,p=1,cr=17,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=1375288660515824
CLOSE #12071688:c=0,e=6,dep=0,type=0,tim=1375288660526277
=====================
PARSING IN CURSOR #6850772 len=202 dep=1 uid=0 oct=3 lid=0 tim=1375288660528887 hv=3819099649 ad='2615a2e8' sqlid='3nkd3g3ju5ph1'
select obj#,type#,ctime,mtime,stime, status, dataobj#, flags, oid$, spare1, spare2 from obj$ where owner#=:1 and name=:2 and namespace=:3 and remoteo
wner is null and linkname is null and subname is null
END OF STMT
EXEC #6850772:c=0,e=41,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=2853959010,tim=1375288660528884
FETCH #6850772:c=0,e=49,p=0,cr=3,cu=0,mis=0,r=0,dep=1,og=4,plh=2853959010,tim=1375288660529175
CLOSE #6850772:c=0,e=3,dep=1,type=3,tim=1375288660529216
EXEC #6850772:c=0,e=17,p=0,cr=0,cu=0,mis=0,r=0,dep=1,og=4,plh=2853959010,tim=1375288660529413
FETCH #6850772:c=0,e=52,p=0,cr=4,cu=0,mis=0,r=1,dep=1,og=4,plh=2853959010,tim=1375288660529489
CLOSE #6850772:c=0,e=5,dep=1,type=3,tim=1375288660529527

阅读(1351) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~