ITPub博客

首页 > 数据库 > Oracle > [20160902][转载]跟踪rman操作.txt

[20160902][转载]跟踪rman操作.txt

原创 Oracle 作者:lfree 时间:2016-09-02 08:36:30 0 删除 编辑

[20160902]跟踪rman操作.txt

--转载:跟踪rman
https://laurent-leturgez.com/2016/08/29/tracing-oracle-binaries-and-tools/
--以前仅仅知道debug,没有知道这么细,做一个记录,原链接里面还有DGMGRL,EXPDP / IMPDP,SRVCTL,OPATCH,10046事件的跟踪。

RMAN

RMAN is the Oracle utility used to backup and recover your databases. To enable tracing is RMAN, you have to switch rman is "debug" mode.

This mode can be enabled directly in rman:

[oracle@oel7 ~]$ rman target /
Recovery Manager: Release 12.1.0.2.0 - Production on Wed Feb 24 15:45:13 2016
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
connected to target database: ORCL (DBID=1413029491)
 
RMAN> debug on
 
RMAN-03036: Debugging set to level=9[MEDIUM], types=ALL
DBGSQL: TARGET> begin dbms_rcvman.setDebugOn; dbms_rcvman.dumpPkgState('Debug On'); end;
DBGSQL: sqlcode = 0
DBGRCVMAN: ENTERING dumpPkgState Debug On
.../...

Or (much better) it can be enabled with the debug option in the rman command, and by specifying a trace file :
   
[oracle@oel7 ~]$ rman target / debug trace=tracefile.trc
Recovery Manager: Release 12.1.0.2.0 - Production on Wed Feb 24 15:22:10 2016
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
RMAN-06005: connected to target database: ORCL (DBID=1413029491)
RMAN> disconnect

All the debug stuff is then located in your "tracefile.trc" file.

You can enable tracing on specific component in rman :

    SQL: for tracing SQL queries generated by rman
    RESTORE: for tracing restore operation only
    RECOVER: for tracing recovery operation only
    RESYNC: for tracing synchronization operation only
    DUPLICATE: for tracing duplicate operation only

And for each or all of these component, you can set a verbosity level from 1 (lowest) to 10 (highest). 9 is the default
verbosity level. Sometimes, you can change the verbosity level without any change in your tracefile.

Here are some examples (point that many components can be traced at the same time):
   
[oracle@oel7 ~]$ rman target / debug recover level=10 trace=tracefile.trc
[oracle@oel7 ~]$ rman target / debug sql level=1 trace=tracefile.trc
RMAN> debug restore,sql level=10

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-2124380/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    4006
  • 访问量
    7969478