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

2014-11-24 17:02:16 · 作者: · 浏览: 9
bkt/redo03.log' SIZE 50M BLOCKSIZE 512

11 --STANDBY LOGFILE

12 DATAFILE

13 '/u02/oradat/bkt/system01.dbf',

14 '/u02/oradat/bkt/sysaux01.dbf',

15 '/u02/oradat/bkt/undotbs01.dbf',

16 '/u02/oradat/bkt/test1_01.dbf',

17 '/u02/oradat/bkt/users01.dbf',

18 '/u02/oradat/bkt/example01.dbf'

19 CHARACTER SET ZHS16GBK

20 ;

Control file created.

sys@BKT> select status from v$instance ;

STATUS

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

MOUNTED

也可能需要手动的recover一下

recover database

sys@BKT> alter database open ;

Database altered.

添加临时文件

sys@BKT> ALTER TABLESPACE TEMP ADDTEMPFILE '/u02/oradat/bkt/temp01.dbf';

RMAN> list backup ;

specification does not match any backup inthe repository

RMAN> catalog db_recovery_file_dest ;

RMAN> list backup ;

List of Backup Sets

===================

BS Key Type LV Size Device TypeElapsed Time Completion Time

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

1 Full 1.07G DISK 00:00:00 18-APR-13

BP Key: 1 Status: AVAILABLE Compressed: NO Tag: TAG20130418T223159

Piece Name:/u02/flash_recovery_area/BKT/backupset/2013_04_18/o1_mf_nnndf_TAG20130418T223159_8q00yzs1_.bkp

List of Datafiles in backup set 1

File LV Type Ckp SCN CkpTime Name

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

1 Full 1095500 18-APR-13 /u02/oradat/bkt/system01.dbf

2 Full 1095500 18-APR-13 /u02/oradat/bkt/sysaux01.dbf

3 Full 1095500 18-APR-13 /u02/oradat/bkt/undotbs01.dbf

4 Full 1095500 18-APR-13 /u02/oradat/bkt/users01.dbf

5 Full 1095500 18-APR-13 /u02/oradat/bkt/example01.dbf

BS Key Type LV Size Device TypeElapsed Time Completion Time

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

2 Full 9.36M DISK 00:00:00 18-APR-13

BP Key: 2 Status: AVAILABLE Compressed: NO Tag: TAG20130418T223159

Piece Name:/u02/flash_recovery_area/BKT/backupset/2013_04_18/o1_mf_ncsnf_TAG20130418T223159_8q016gmf_.bkp

SPFILE Included: Modification time: 18-APR-13

SPFILE db_unique_name: BKT

Control File Included: Ckp SCN: 1095500 Ckp time: 18-APR-13

RMAN> list incarnation

2> ;

List of Database Incarnations

DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time

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

1 1 BKT 536381303 CURRENT 995548 18-APR-13

RMAN>

Continue applying redo log files until thelast log has been applied to the restored

data files, then cancel recovery byexecuting the following command:

CANCEL

The database indicates whether recovery issuccessful. If you cancel before all the

data files have been recovered to a consistentSCN and then try to open the

database, then you get an ORA-1113error ifmore recovery is necessary. You can

query V$RECOVER_FILEto determine whethermore recovery is needed, or if a

backup of a data file was notrestoredbefore starting incomplete recovery.

无备份使用snap控制文件

RMAN> show all

2> ;

using target database control file insteadof recovery catalog

RMAN configuration parameters for databasewith db_unique_name BKT are:

CONFIGURE RETENTION POLICY TO REDUNDANCY 1;# default

CONFIGURE BACKUP OPTIMIZATION OFF; #default

CONFIGURE DEFAULT DEVICE TYPE TO DISK; #default

CONFIGURE CONTROLFILE AUTOBACKUP OFF; #default

CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FORDEVICE TYPE DISK TO '%F'; # default

CONFIGURE DEVICE TYPE DISK PARALLELISM 1BACKUP TYPE TO BACKUPSET; # default

CONFIGURE DATAFILE BACKUP COPIES FOR DEVICETYPE DISK TO 1; # default

CONFIGURE ARCHIVELOG BACKUP COPIES FORDEVICE TYPE DIS