Oracle数据库丢失控制文件的恢复四则(九)

2014-11-24 17:02:16 · 作者: · 浏览: 7
K TO 1; # default

CONFIGURE MAXSETSIZE TO UNLIMITED; # default

CONFIGURE ENCRYPTION FOR DATABASE OFF; #default

CONFIGURE ENCRYPTION ALGORITHM 'AES128'; #default

CONFIGURE COMPRESSION ALGORITHM 'BASIC' ASOF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default

CONFIGURE ARCHIVELOG DELETION POLICY TONONE; # default

CONFIGURE SNAPSHOT CONTROLFILE NAME TO'/u01/apps/oracle/product/11gr2/db_1/dbs/snapcf_bkt.f'; # default

删除后alert日志报错:

Errors in file/u01/apps/oracle/diag/rdbms/bkt/bkt/trace/bkt_m000_15066.trc:

ORA-00210: cannot open the specifiedcontrol file

ORA-00202: control file:'/u02/oradat/bkt/control01.ctl'

ORA-27041: unable to open file

Linux-x86_64 Error: 2: No such file ordirectory

Additional information: 3

sys@BKT> shutdown immediate

Database closed.

ORA-00210: cannot open the specifiedcontrol file

ORA-00202: control file:'/u02/oradat/bkt/control01.ctl'

ORA-27041: unable to open file

Linux-x86_64 Error: 2: No such file ordirectory

Additional information: 3

sys@BKT> shutdown abort ;

ORACLE instance shut down.

sys@BKT> startup

ORACLE instance started.

Total System Global Area 417546240 bytes

Fixed Size 2228944 bytes

Variable Size 322964784 bytes

Database Buffers 83886080 bytes

Redo Buffers 8466432 bytes

ORA-00205: error in identifying controlfile, check alert log for more info

[root@master ~]# cp/u01/apps/oracle/product/11gr2/db_1/dbs/snapcf_bkt.f/u02/oradat/bkt/control01.ctl

[root@master ~]# cp/u01/apps/oracle/product/11gr2/db_1/dbs/snapcf_bkt.f/u02/flash_recovery_area/bkt/control02.ctl

[root@master ~]# chown oracle:oinstall/u02/oradat/bkt/control01.ctl

[root@master ~]# chown oracle:oinstall/u02/flash_recovery_area/bkt/control02.ctl

sys@BKT> recover database using backupcontrolfile ;

ORA-00279: change 1266893 generated at05/09/2013 03:27:56 needed for thread 1

ORA-00289: suggestion :/u02/flash_recovery_area/BKT/archivelog/2013_05_08/o1_mf_1_28_%u_.arc

ORA-00280: change 1266893 for thread 1 isin sequence #28

Specify log: {=suggested |filename | AUTO | CANCEL}

因为是老的controlfile,所以sequence都是老旧的,

dle> select group#,sequence#,status fromv$log ;

GROUP# SEQUENCE# STATUS

---------- ---------- ----------------

1 25 INACTIVE

3 24 INACTIVE

2 26 CURRENT

idle> archive log list ;

Database log mode Archive Mode

Automatic archival Enabled

Archive destination USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence 24

Next log sequence to archive 26

Current log sequence 26

查看相应的目录

[oracle@master ~]$ ll/u02/flash_recovery_area/BKT/archivelog/2013_05_08/

total 62224

-rw-r----- 1 oracle oinstall 177152 May 7 12:10 o1_mf_1_10_8rlng20m_.arc

-rw-r----- 1 oracle oinstall 1024 May 7 12:12 o1_mf_1_11_8rlnkd1g_.arc

-rw-r----- 1 oracle oinstall 1024 May 7 12:12 o1_mf_1_12_8rlnkfdr_.arc

-rw-r----- 1 oracle oinstall 10752 May 7 12:17 o1_mf_1_13_8rlnt65r_.arc

-rw-r----- 1 oracle oinstall 1024 May 7 12:17 o1_mf_1_14_8rlnt6r7_.arc

-rw-r----- 1 oracle oinstall 1536 May 7 12:17 o1_mf_1_15_8rlnt7b1_.arc

-rw-r----- 1 oracle oinstall 1024 May 7 12:17 o1_mf_1_16_8rlnt7x7_.arc

-rw-r----- 1 oracle oinstall 1024 May 7 12:17 o1_mf_1_17_8rlnt8g7_.arc

-rw-r----- 1 oracle oinstall 1024 May 7 12:17 o1_mf_1_18_8rlnt8wk_.arc

-rw-r----- 1 oracle oinstall 1024 May 7 12:17 o1_mf_1_19_8rlnt9bn_.arc

-rw-r----- 1 oracle oinstall 1024 May 7 12:17 o1_mf_1_20_8rlnt9p8_.arc

-rw-r----- 1 oracle oin