[root@dev2_180db ~]# su - oracle
[oracle@dev2_180db dbs]$ ls
hc_center.dat initcenter.ora initdw.ora init.ora lkCENTER orapwcenter spfilecenter.ora
[oracle@dev2_180db dbs]$more spfilecenter.ora
center.__db_cache_size=1224736768
center.__java_pool_size=16777216
center.__large_pool_size=16777216
center.__shared_pool_size=301989888
center.__streams_pool_size=0
*._allow_resetlogs_corruption=true
*._kgl_large_heap_warning_threshold=8388608
*.aq_tm_processes=0
*.audit_file_dest='/u01/app/oracle/admin/center/adump'
*.background_dump_dest='/u01/app/oracle/admin/center/bdump'
*.compatible='10.2.0.1.0'
*.control_files='/u01/app/oracle/admin/center/control01.ctl','/u02/oradata/center/control02.ctl','/u02/oradata/center/control03.ctl'
*.core_dump_dest='/u01/app/oracle/admin/center/cdump'
*.db_2k_cache_size=33554432
*.db_block_size=8192
*.db_domain=''
*.db_file_multiblock_read_count=128
*.db_files=4000
*.db_name='center'
*.db_recovery_file_dest_size=4294967296
*.db_recovery_file_dest=''
*.job_queue_processes=0
*.log_archive_dest='/u02/oradata/center/archive'
*.log_checkpoints_to_alert=FALSE
*.open_cursors=600
*.parallel_execution_message_size=65535
*.parallel_max_servers=128
*.pga_aggregate_target=209715200
*.processes=1000
*.recyclebin='ON'
*.remote_login_passwordfile='EXCLUSIVE'
*.replication_dependency_tracking=FALSE
*.session_cached_cursors=100
*.sga_target=1610612736
*.shared_pool_size=100m
*.undo_management='AUTO'
*.undo_retention=0
*.undo_tablespace='undots'
*.user_dump_dest='/u01/app/oracle/admin/center/udump'
*.workarea_size_policy='AUTO'
[oracle@dev2_180db dbs]$ cd /u02/oradata/center/archive
[oracle@dev2_180db archive]$ find /u02/oradata/center/archive -mtime +1 -name "*.dbf" -exec rm -rf {} ;
当手工删除了归档日志以后,Rman备份会检测到日志缺失,www.linuxidc.com从而无法进一步继续执行。
所以此时需要手工执行crosscheck过程,之后Rman备份可以恢复正常。
[oracle@dev2_180db archive]$ rman target /
Recovery Manager: Release 10.2.0.1.0 - Production on Thu Jan 12 00:45:38 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database: CENTER (DBID=4195036994)
RMAN> crosscheck archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=1028 devtype=DISK
validation failed for archived log
archive log filename=/u02/oradata/center/archive/1_1_766187842.dbf recid=1 stamp=766189358
Crosschecked 1 objects
RMAN> delete expired archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=1028 devtype=DISK
List of Archived Log Copies
Key Thrd Seq S Low Time Name
------- ---- ------- - --------- ----
1 1 1 X 02-NOV-11 /u02/oradata/center/archive/1_1_766187842.dbf
Do you really want to delete the above objects (enter YES or NO)? Y
deleted archive log
archive log filename=/u02/oradata/center/archive/1_1_766187842.dbf recid=1 stamp=766189358
Deleted 1 EXPIRED objects
RMAN> report obsolete;
RMAN> delete obsolete;
RMAN> crosscheck archivelog all;
released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=1028 devtype=DISK
specification does not match any archive log in the recovery catalog
如果有看到specification does not match any archive log in the recovery catalog返回信息,那说明数据库已经正常了。
RMAN> exit
Recovery Manager complete.
[oracle@dev2_180db archive]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jan 12 01:11:38 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
SQL>start mount;
SQL>alter database noarchivelog;
SQL>alter database open;