原文链接:点击打开链接
Oracle控制文件
1、概念
在讲控制文件之前,我们看2个概念。
物理组成:数据库由数据文件、控制文件、日志文件、参数文件、口令文件、日志归档文件组成。
Instance:实例由内存结构(memory structure)和后台进程(backgroundprocessor)组成。
控制文件说明:控制文件是oracle 数据库的一个入口文件,通过控制文件,数据库可以找到datafile,可以管理数据库的状态。
2、控制包含如下内容:
1) The database name anddatabase unique identifier (DBID)
2) The time stamp of database creation
3) Information about datafiles, online redo log files, and archived redo log files
4) Tablespace information
5) RMAN backups
在数据库使用的过程中会不断的读写控制文件。
在数据库open的状态下,必须保证能够写控制文件。
当我们recover 数据库的时候,也会从控制文件中读取所有数据文件的信息。
其他的操作比如添加数据文件的时候,也会更新控制文件中的信息。
总之,关于控制文件我们注意2点:
(1)控制文件包含了data files,online redo log files等在打开数据库时需要访问的信息。
控制文件会跟踪数据库结构信息的改变。比如当我们add,rename,drop数据文件或者redo log的时候,数据库会及时更新控制文件中的信息。(由实例来做)
(2)控制文件包含了一些metadata,这些元数据在数据库处于非open状态必须能够访问。
比如控制文件包含recover数据库需要的一些信息,如checkpoints。检查点可以标明数据库进行instance recovery时,在redo stream 中开始恢复的SCN值。 Checkpoint SCN之前的所有提交都必须写入了数据文件。
每隔3秒,checkpoint进程会把online redo log中checkpoint位置信息更新控制文件。
Oacle 10g的控制文件有3个,存放在相同目录下。
Oacle 11g的控制文件有2个,存放在不同目录下。
3、控制文件记录类型
控制文件中的信息是以sections的来存储的,每个sections 由一些record组成。
每个section 由多个逻辑的control file block组成。 Record 可以跨section 中的block。
控制文件的记录(record)分几种类型?
(1)Circular reuse records --循环重用记录
如: RMAN 备份记录,归档日志历史信息,循环重用记录可以被删除,并且不会影响产品数据库。
这些record 里包含是一些不重要的信息,在某些条件下,这些record中的信息会被重写。比如当所有可用的record slot都写满的时候,这时候数据库就需要扩展控制文件来增加更多的空间来创建新的record,或者重新之前旧的record。
循环可用记录包含的信息有archived log file 和RMAN backups。
(2)Noncircular reuse records --非循环重用记录
记录是那些不能被删除的记录。非循环重用记录包括数据文件列表和日志文件列表。
这部分record里保存的是重要的信息,这部分信息不能经常改变,也不能被重写。
比如tablespace,data files,online redo log files 和redo threads。
对于循环重用记录,有个参数可以控制这个循环的时间。提问:这个参数是什么?
CONTROL_FILE_RECORD_KEEP_TIME 用来控制循环record的保存时间,
其单位为天,默认情况下,Oracle 会将循环记录保存7天。
该参数设置为0到365之间的任意值。
查看、修改循环的时间
SQL> select name,value from v$parameter where name='control_file_record_keep_time';
NAME VALUE
--------------------------------------------------------------------------------
control_file_record_keep_time 7
SQL> alter system set control_file_record_keep_time=20;
System altered.
SQL> select name,value from v$parameter wherename='control_file_record_keep_time';
NAME VALUE
--------------------------------------------------------------------------------
control_file_record_keep_time 20
三个重要的参数
1.V$CONTROLFILE
SQL> select * from v$controlfile;
--10g:
SQL> select * from v$controlfile;
--11g:
SQL> set pagesize 100
SQL> col status for a10
SQL> col name for a60
SQL> set lin 120
SQL> select * from v$controlfile;
STATUS NAME IS_RECOVERY_DEST_FILE BLOCK_SIZE FILE_SIZE_BLKS
------------------------------------------------------------------------------------------------------------ ---------- --------------
/u01/oradata2/TSH1/control01.ctl NO 16384 430
/u01/oradata2/TSH1/control02.ctl NO 16384 430
/u01/oradata2/TSH1/control03.ctl NO 16384 430
这里的STATUS 是空。为什么呢?
STATUS VARCHAR2(7) INVALID if the name cannot be determined(which should not occur); NULL if the name can be determined
STATUS 列有两种状态:INVALID,和NULL.(注意,不是显示为VALID.)
如果控制文件不能被检测到,就会显示为INVALID。如果可以检测到,就会显示NULL。
2.V$PARAMETER
V$parameter视图显示当前影响session的所有初始化参数。
SQL> select name,type,value from v$parameter where name like '%control_file%';
NAME TYPE VALUE
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
control_files 2 /u01/oradata2/TSH1/control01.ctl, /u01/oradata2/TSH1/control02.ctl,/u01/oradata2/TSH1/control03.ctl
control_file_record_keep_time 3 20
3.V$CONTROLFILE_RECORD_SECTION
我们可以通过v$controlfile_record_section视图查看控制文件里包含的内容。
SQL> col type for a40
SQL> select type,record_size from v$controlfile_record_section;
TYPE RECORD_SIZE
---------------------------------------- -----------
DATABASE 316
CKPT PROGRESS 8180
REDO THREAD 256
REDO LOG 72
DATAFILE 428
FILENAME 524
TABLESPACE 68
TEMPORARY FILENAME 56
RMAN CONFIGURATION 1108
LOG HISTORY 56
OFFLINE RANGE 200
TYPE RECORD_SIZE
---------------------------------------- -----------
ARCHIVED LOG 584
BACKUP SET 40
BACKUP PIECE 736
BACKUP DATAFILE 116
BACKUP REDOLOG 76
DATAFILE COPY 660
BACKUP CORRUPTION 44
COPY CORRUPTION 40
DELETED OBJECT 20
PROXY COPY 852
BACKUP SPFILE 36
TYPE RECORD_SIZE
---------------------------------------- -----------
DATABASE INCARNATION 56
FLASHBACK LOG 84
RECOVERY DESTINATION 180
INSTANCE SPACE RESERVATION 28
REMOVABLE RECOVERY FILES 32
RMAN STATUS 116
THREAD INSTANCE NAME MAPPING 80
MTTR 100
DATAFILE HISTORY 568
STANDBY DATABASE MATRIX 400
GUARANTEED RESTORE POINT 212
TYPE RECORD_SIZE
---------------------------------------- -----------
RESTORE POINT 212
34 rows selected.
版本越高类型越多,11g有37个
4、控制文件的备份与恢复
1.使用rman备份控制文件
1)使用rman自动备份
CONFIGURE CONTROLFILE AUTOBACKUP OFF; # default
controlfile autobackup 这个参数默认是OFF的,即默认不自动备份,我们把这个参数改成自动备份:
RMAN> configure controlfile autobackup on; --修改为on
提问:什么会自动备份控制文件?
改成自动以后,在数据文件有变化,或者备份数据库的时候,都会自动的备份控制文件和spfile文件。
2)使用rman命令备份
RMAN> backup current controlfile tag='bak_ctlfile'format='/u01/ctl_file_%U_%T';
controlfile autobackup on——>有自动备份controfile和spfile
2.使用rman恢复控制文件1)从自动备份中恢复
SQL> select dbid from v$database;
DBID
-----------------
1298860441
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992bytes
Variable Size 109053520 bytes
Database Buffers 171966464 bytes
Redo Buffers 2973696 bytes
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@sharqueen ~]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Tue Apr 1621:14:02 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: TSH1 (not mounted)
RMAN> set dbid=1298860441;(不指定dbid会报错)
executing command: SET DBID
--nocatalog模式并且控制文件丢失时需要设置DBID,否则会有如下提示:
AUTOBACKUP search with format "%F" not attempted becauseDBID was not set
AUTOBACKUP search with format "%F" not attempted because DBID was not set
RMAN> restore controlfile from autobackup;
2)从备份文件中恢复
RMAN> restore controlfile from'/u01/ctl_file_0mo78ian_1_1_20130416';
Starting restore at 16-APR-13
using channel ORA_DISK_1
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output filename=/u01/oradata2/TSH1/control01.ctl
output filename=/u01/oradata2/TSH1/control02.ctl
output filename=/u01/oradata2/TSH1/control03.ctl
Finished restore at 16-APR-13
SQL> alter database mount;
Database altered.
SQL> alter database open;
alter database open
*
ERROR at line 1:
ORA-01589: must use RESETLOGS or NORESETLOGS option for databaseopen
要recover!
RMAN> recover database;
RMAN> alter database open resetlogs;
database opened
resetlogs后建议重新rman备份!
3.重建控制文件1)dump控制文件
SQL>oradebugsetmypid
Statement processed.
SQL> alter database backup controlfile to trace;
Database altered.
SQL>oradebugtracefile_name
/u01/app/oracle/admin/TSH1/udump/tsh1_ora_27097.trc
[oracle@sharqueen u01]$ cat /u01/app/oracle/admin/TSH1/udump/tsh1_ora_27097.trc
/u01/app/oracle/admin/TSH1/udump/tsh1_ora_27097.trc
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 -Production
With the Partitioning, OLAP and Data Mining options
ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1
System name: Linux
Node name: sharqueen
Release: 2.6.18-128.el5
Version: #1 SMP Wed Dec17 11:42:39 EST 2008
Machine: i686
Instance name: TSH1
Redo thread mounted by this instance: 1
Oracle process number: 16
Unix process pid: 27097, image: oracle@sharqueen (TNS V1-V3)
*** SERVICE NAME:(SYS$USERS) 2013-04-16 21:33:41.897
*** SESSION ID:(157.145) 2013-04-16 21:33:41.897
*** 2013-04-16 21:33:41.897
-- The following are current System-scope REDO Log Archival related
-- parameters and can be included in the database initializationfile.
--
-- LOG_ARCHIVE_DEST=''
-- LOG_ARCHIVE_DUPLEX_DEST=''
--
-- LOG_ARCHIVE_FORMAT=%t_%s_%r.dbf
--
-- DB_UNIQUE_NAME="TSH1"
--
-- LOG_ARCHIVE_CONFIG='SEND, RECEIVE, NODG_CONFIG'
-- LOG_ARCHIVE_MAX_PROCESSES=2
-- STANDBY_FILE_MANAGEMENT=MANUAL
-- STANDBY_ARCHIVE_DEST=?/dbs/arch
-- FAL_CLIENT=''
-- FAL_SERVER=''
--
-- LOG_ARCHIVE_DEST_1='LOCATION=/u01/arch'
-- LOG_ARCHIVE_DEST_1='OPTIONAL REOPEN=300 NODELAY'
-- LOG_ARCHIVE_DEST_1='ARCH NOAFFIRM NOEXPEDITE NOVERIFY SYNC'
-- LOG_ARCHIVE_DEST_1='REGISTER NOALTERNATE NODEPENDENCY'
-- LOG_ARCHIVE_DEST_1='NOMAX_FAILURE NOQUOTA_SIZE NOQUOTA_USEDNODB_UNIQUE_NAME'
-- LOG_ARCHIVE_DEST_1='VALID_FOR=(PRIMARY_ROLE,ONLINE_LOGFILES)'
-- LOG_ARCHIVE_DEST_STATE_1=ENABLE
--
-- Below are two sets of SQL statements, each of which creates a new
-- control file and uses it to open the database. The first setopens
-- the database with the NORESETLOGS option and should be used onlyif
-- the current versions of all online logs are available. The second
-- set opens the database with the RESETLOGS option and should beused
-- if online logs are unavailable.
-- The appropriate set of statements can be copied from the traceinto
-- a script file, edited as necessary, and executed when there is a
-- need to re-create the control file.
--
-- Set #1. NORESETLOGS case
--
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- Additional logs may be required for media recovery of offline
-- Use this only if the current versions of all online logs are
-- available.
-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
-- ALTER DATABASE SET STANDBYDATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
CREATE CONTROLFILE REUSEDATABASE "TSH1" NORESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/oradata2/TSH1/redo01.log' SIZE 50M,
GROUP 2 '/u01/oradata2/TSH1/redo02.log' SIZE 50M,
GROUP 3 '/u01/oradata2/TSH1/redo03.log' SIZE 50M
-- STANDBY LOGFILE
DATAFILE
'/u01/oradata2/TSH1/system01.dbf',
'/u01/oradata2/TSH1/undotbs01.dbf',
'/u01/oradata2/TSH1/sysaux01.dbf',
'/u01/oradata2/TSH1/users01.dbf',
'/u01/oradata2/TSH1/example01.dbf',
'/u01/oradata2/TSH1/test102.dbf',
'/u01/oradata2/TSH1/fsrecon.dbf',
'/home/oracle/TSH1/test.dbf'
CHARACTER SET WE8ISO8859P1
;
-- Configure RMAN configuration record 1
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILEAUTOBACKUP','ON');
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- disk. Any one log file from each branch can be used to
-- re-create incarnation records.
-- ALTER DATABASE REGISTER LOGFILE '/u01/arch/1_1_562360180.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/arch/1_1_780085211.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/arch/1_1_780177560.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/arch/1_1_780679802.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/arch/1_1_812928133.dbf';
-- Recovery is required if any of the datafiles are restoredbackups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE
-- All logs need archiving and a log switch is needed.
ALTER SYSTEM ARCHIVE LOGALL;
-- Database can now be opened normally.
ALTER DATABASE OPEN;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/oradata/TSH1/temp01.dbf'REUSE;
ALTER TABLESPACE TEMP03 ADD TEMPFILE '/u01/oradata2/TSH1/temp03.bdf'
SIZE 104857600 REUSE AUTOEXTEND OFF;
-- End of tempfile additions.
--
-- Set #2. RESETLOGS case
--
-- The following commands will create a new control file and use it
-- to open the database.
-- Data used by Recovery Manager will be lost.
-- The contents of online logs will be lost and all backups will
-- be invalidated. Use this only if online logs are damaged.
-- After mounting the created controlfile, the following SQL
-- statement will place the database in the appropriate
-- protection mode:
-- ALTER DATABASE SET STANDBYDATABASE TO MAXIMIZE PERFORMANCE
STARTUP NOMOUNT
CREATE CONTROLFILE REUSEDATABASE "TSH1" RESETLOGS ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 '/u01/oradata2/TSH1/redo01.log' SIZE 50M,
GROUP 2 '/u01/oradata2/TSH1/redo02.log' SIZE 50M,
GROUP 3 '/u01/oradata2/TSH1/redo03.log' SIZE 50M
-- STANDBY LOGFILE
DATAFILE
'/u01/oradata2/TSH1/system01.dbf',
'/u01/oradata2/TSH1/undotbs01.dbf',
'/u01/oradata2/TSH1/sysaux01.dbf',
'/u01/oradata2/TSH1/users01.dbf',
'/u01/oradata2/TSH1/example01.dbf',
'/u01/oradata2/TSH1/test102.dbf',
'/u01/oradata2/TSH1/fsrecon.dbf',
'/home/oracle/TSH1/test.dbf'
CHARACTER SET WE8ISO8859P1
;
-- Configure RMAN configuration record 1
VARIABLE RECNO NUMBER;
EXECUTE :RECNO := SYS.DBMS_BACKUP_RESTORE.SETCONFIG('CONTROLFILEAUTOBACKUP','ON');
-- Commands to re-create incarnation table
-- Below log names MUST be changed to existing filenames on
-- disk. Any one log file from each branch can be used to
-- re-create incarnation records.
-- ALTER DATABASE REGISTER LOGFILE '/u01/arch/1_1_562360180.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/arch/1_1_780085211.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/arch/1_1_780177560.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/arch/1_1_780679802.dbf';
-- ALTER DATABASE REGISTER LOGFILE '/u01/arch/1_1_812928133.dbf';
-- Recovery is required if any of the datafiles are restoredbackups,
-- or if the last shutdown was not normal or immediate.
RECOVER DATABASE USINGBACKUP CONTROLFILE
-- Database can now be opened zeroing the online logs.
ALTER DATABASE OPENRESETLOGS;
-- Commands to add tempfiles to temporary tablespaces.
-- Online tempfiles have complete space information.
-- Other tempfiles may require adjustment.
ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/oradata/TSH1/temp01.dbf'REUSE;
ALTER TABLESPACE TEMP03 ADD TEMPFILE '/u01/oradata2/TSH1/temp03.bdf'
SIZE 104857600 REUSE AUTOEXTEND OFF;
-- End of tempfile additions.
--
2)使用SQL重建控制文件使用NORESETLOGS 重建控制文件。
SQL> startup nomount
SQL> Recover database;
SQL> Alter database open;
1.temp临时表空间的影响
SQL> select tablespace_name,status from dba_tablespaces;
SQL> select * from v$tempfile;
no rows selected但实际上,我们查询v$tempfile,却没有相关的记录。 我们必须手工地添加TEMP空间。 这也是控制文件的创建脚本里面为什么最后会有一行添加temp 数据文件的记录。
在次查询就ok了:
SQL> select name from v$tempfile;
假如存在一个只读的表空间,那么在重建控制文件之后,read-only的数据文件会重命名为MISSING00005的格式,最后是5位数字,这个数据根据file_id对应。并且datafile也会变成offline。
所以在重建控制文件之后,我们需要对只读文件的datafile进行rename 操作,还原成原来的名称,并且修改其状态为online。
所以在重建控制文件之前需要留意datafile的文件名称,如果有多个datafile,那么就需要注意其顺序。这个需要注意一点。
SQL> select file_id,file_name,status,online_status from dba_data_files;
FILE_ID FILE_NAME STATUS ONL
---------- ---------------------------------------------------------------- ---
4 /u01/app/oracle/oradata/gg2/users01.dbf AVAILABLE ONL
3/u01/app/oracle/oradata/gg2/undotbs01.dbf AVAILABLE ONL
2/u01/app/oracle/oradata/gg2/sysaux01.dbf AVAILABLE ONL
1/u01/app/oracle/oradata/gg2/system01.dbf AVAILABLE SYS
5/u01/app/oracle/product/11.2.0.3/db_1/dbs/MISSING00005 AVAILABLEOFF
6/u01/app/oracle/product/11.2.0.3/db_1/dbs/MISSING00006 AVAILABLEOFF
6 rows selected.
--现在对2个datafile进行rename 操作:
SQL> ALTER DATABASE RENAME FILE 'MISSING00005' TO'/u01/app/oracle/oradata/gg2/dave01.dbf';
Database altered.
SQL> ALTER DATABASE RENAME FILE 'MISSING00006' TO'/u01/app/oracle/oradata/gg2/dave02.dbf';
Database altered.
这时我们使用命令将表空间下的所有datafile online:
SQL> alter tablespace dave online;
Tablespace altered.
现在我们就可以看到数据文件已经正常了:
SQL> select file_name,status,online_status from dba_data_files;
FILE_NAME STATUS ONLINE_
------------------------------------------------------- --------- -------
/u01/app/oracle/oradata/gg2/users01.dbf AVAILABLE ONLINE
/u01/app/oracle/oradata/gg2/undotbs01.dbf AVAILABLE ONLINE
/u01/app/oracle/oradata/gg2/sysaux01.dbf AVAILABLE ONLINE
/u01/app/oracle/oradata/gg2/system01.dbf AVAILABLE SYSTEM
/u01/app/oracle/oradata/gg2/dave01.dbf AVAILABLE ONLINE
/u01/app/oracle/oradata/gg2/dave02.dbf AVAILABLE ONLINE
6、清理控制文件中的数据(清理目的:好看一点)
控制文件将内部数据记录分为两类:循环重用记录和非循环重用记录。
(1)循环重用记录包含可以从控制文件中删除的信息。如: RMAN 备份记录,归档日志历史信息,循环重用记录可以被删除,并且不会影响产品数据库。
(2)非循环重用记录是那些不能被删除的记录。非循环重用记录包括数据文件列表和日志文件列表。
1.手工清理v$archived_log记录SQL> archive log list;
SQL> Select count(1) from v$archived_log;
COUNT(1)
----------
1 --从控制文件读出
SQL> select resetlogs_id,sequence# from v$archived_log order by1;
RESETLOGS_ID SEQUENCE#
------------ ----------
812928133 1
SQL> execute sys.dbms_backup_restore.resetCfileSection(11); --清理
PL/SQL procedure successfully completed.
SQL> select resetlogs_id,sequence# from v$archived_log order by1;
no rows selected
SQL> select * from v$archived_log;
no rows selected
清理好了!2.关于resetCfileSection函数中ID号的说明
cat $ORACLE_HOME/rdbms/admin/dbmsbkrs.sql
-- Valid record types are defined as the following constants:
RTYP_DB_INFO constant binary_integer:= 0;
RTYP_CKPTPROG constant binary_integer:= 1;
RTYP_THREAD constant binary_integer:= 2;
RTYP_LOGFILE constant binary_integer := 3;
RTYP_DATAFILE constant binary_integer:= 4;
RTYP_FILENAME constant binary_integer:= 5;
RTYP_TABLESPACE constant binary_integer:= 6;
RTYP_RESERVED1 constant binary_integer := 7;
RTYP_TEMPFILE constant binary_integer:= 7;
RTYP_RMAN_CONFIGURATION constant binary_integer := 8;
RTYP_LOG_HISTORY constant binary_integer := 9;
RTYP_OFFLINE_RANGE constant binary_integer := 10;
RTYP_ARCHIVED_LOG constant binary_integer := 11;
RTYP_BACKUP_SET constant binary_integer:= 12;
RTYP_BACKUP_PIECE constant binary_integer := 13;
RTYP_BACKUP_DFILE constant binary_integer := 14;
RTYP_BACKUP_LOG constant binary_integer:= 15;
RTYP_DFILE_COPY constant binary_integer := 16;
RTYP_BACKUP_DFILE_CORR constant binary_integer := 17;
RTYP_DFILE_COPY_CORR constant binary_integer := 18;
RTYP_DELETED_OBJECT constant binary_integer := 19;
RTYP_RESERVED3 constant binary_integer:= 20;
RTYP_PROXY constant binary_integer:= 20;
RTYP_RESERVED4 constant binary_integer:= 21;
RTYP_BACKUP_SPFILE constant binary_integer := 21;
RTYP_DB2 constant binary_integer:= 22;
RTYP_INCARNATION constant binary_integer := 23;
RTYP_FLASHBACK constant binary_integer:= 24;
RTYP_RA_INFO constant binary_integer:= 25;
RTYP_INST_RSVT constant binary_integer:= 26;
RTYP_AGED_FILES constant binary_integer:= 27;
RTYP_RMAN_STATUS constant binary_integer := 28;
RTYP_THREAD_INST constant binary_integer := 29;
RTYP_MTR constant binary_integer := 30;
RTYP_DFH constant binary_integer:= 31;
RTYP_SDM constant binary_integer:= 32;
RTYP_RSP constant binary_integer:= 33;
RTYP_NRR constant binary_integer := 34;
RTYP_BLOCK_CORRUPTION constant binary_integer := 35;
RTYP_ACM_OPERATION constant binary_integer := 36;
RTYP_FOREIGN_ARCHIVED_LOG constant binary_integer := 37;
3.手工清理v$rman_status记录
--清除RMAN_STATUS 记录