对oracle controlfile进行转储
环境:
rhel5.5,x64,oracle 10.2.0.5.12
转储命令:
alter session set events 'immediate trace name controlf level 9';
该命令摘自:
How to find the name of an old Restore Point when the database will not open: ORA-38760 (Doc ID 1288189.1)
不过,貌似吕海波大师用的是level 10的命令:
alter session set events 'immediate trace name controlf level 10'
另外,在mos文章 RMAN Recovery Session Fails with ORA-1861 (Doc ID 852723.1)中,提到了level 20:
alter session set events 'immediate trace name controlf level 20';
至于level 表示的含义,在别的文章中研究一下。
[oracle@jjtest udump]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Fri May 15 09:28:07 2015
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> oradebug setmypid
Statement processed.
SQL> alter session set events 'immediate trace name controlf level 9';
Session altered.
SQL> oradebug tracefile_name
/u01/app/oracle/admin/orcl/udump/orcl_ora_4484.trc
以下全文引用'orcl_ora_4484.trc'文件的内容:
/u01/app/oracle/admin/orcl/udump/orcl_ora_4484.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1
System name: Linux
Node name: jjtest
Release: 2.6.18-348.el5
Version: #1 SMP Wed Nov 28 21:22:00 EST 2012
Machine: x86_64
Instance name: orcl
Redo thread mounted by this instance: 1
Oracle process number: 15
Unix process pid: 4484, image: oracle@jjtest (TNS V1-V3)
*** ACTION NAME:() 2015-05-15 09:28:10.059
*** MODULE NAME:(sqlplus@jjtest (TNS V1-V3)) 2015-05-15 09:28:10.059
*** SERVICE NAME:() 2015-05-15 09:28:10.059
*** SESSION ID:(654.7) 2015-05-15 09:28:10.059
*** 2015-05-15 09:28:10.059
Processing Oradebug command 'setmypid'
*** 2015-05-15 09:28:22.620
DUMP OF CONTROL FILES, Seq # 444 = 0x1bc
V10 STYLE FILE HEADER:
Compatibility Vsn = 169870592=0xa200500
Db ID=1407362313=0x53e2a509, Db Name='ORCL'
Activation ID=0=0x0
Control Seq=444=0x1bc, File size=430=0x1ae
File Number=0, Blksiz=16384, File Type=1 CONTROL
***************************************************************************
DATABASE ENTRY
***************************************************************************
(size = 316, compat size = 316, section max = 1, section in-use = 1,
last-recid= 0, old-recno = 0, last-recno = 0)
(extent = 1, blkno = 1, numrecs = 1)
05/13/2015 08:12:57
DB Name "ORCL"
Database flags = 0x00404000 0x00001000
Controlfile Creation Timestamp 05/13/2015 08:13:03
Incmplt recovery scn: 0x0000.00000000
Resetlogs scn: 0x0000.0005eca9 Resetlogs Timestamp 05/13/2015 08:13:06
Prior resetlogs scn: 0x0000.00000001 Prior resetlogs Timestamp 04/20/2010 08:24:24
Redo Version: compatible=0xa200500
#Data files = 7, #Online files = 7
Database checkpoint: Thread=1 scn: 0x0000.0006b6fe
Threads: #Enabled=1, #Open=1, Head=1, Tail=1
enabled threads: 01000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
00000000 00000000 00000000