リカバリポイントで復元/回復するためにRMANバックアップを介して手順をテストしていますが、失敗します。正確に私は初めて実行し、それは動作します:バックアップ:
RMAN> backup database INCLUDE CURRENT CONTROLFILE format '/u01/app/Oracle/keep_dir/bkp.%U' tag 'test_op2' keep until time 'sysdate+2' restore point 'pre_test_op2';
そして、復元/回復:
SQL> shutdown immediate;
SQL> startup nomount;
RMAN> set DBID 1024124299
RMAN> restore controlfile from '/u01/app/Oracle/keep_dir/bkp.0dq3bfju_1_1';
RMAN> sql "alter database mount";
RMAN> restore database from TAG=TEST_OP2;
RMAN> RECOVER DATABASE;
RMAN> sql "alter database open resetlogs";
SQL> alter database open resetlogs
最後の化身リストは次のとおりでした:
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 MYDB 1024124299 PARENT 1 17-SEP-11
2 2 MYDB 1024124299 PARENT 995548 21-FEB-15
3 3 MYDB 1024124299 CURRENT 1202973 01-APR-15
バックアップを再実行しました:
RMAN> backup database INCLUDE CURRENT CONTROLFILE format '/u01/app/Oracle/keep_dir/bkp.%U' tag 'test_op2' keep until time 'sysdate+2' restore point 'pre_test_op2';
次に、DBを変更した後、手順を再試行し、データファイルとテーブルスペースを追加し、他のものを削除します。次に、復元を試みます。
RMAN> set DBID 1024124299
RMAN> restore controlfile from '/u01/app/Oracle/keep_dir/bkp.0dq3bfju_1_1';
RMAN> sql "alter database mount";
RMAN> restore database from TAG=TEST_OP2;
と回復しますが、失敗します:
RMAN> RECOVER DATABASE;
Starting recover at 02-APR-15
using channel ORA_DISK_1
starting media recovery
archived log for thread 1 with sequence 4 is already on disk as file /u01/app/Oracle/fast_recovery_area/MYDB/archivelog/2015_04_02/o1_mf_1_4_bksxl25h_.arc
archived log for thread 1 with sequence 5 is already on disk as file /u01/app/Oracle/oradata/MYDB/redo02.log
archived log file name=/u01/app/Oracle/fast_recovery_area/MYDB/archivelog/2015_04_02/o1_mf_1_4_bksxl25h_.arc thread=1 sequence=4
archived log file name=/u01/app/Oracle/oradata/MYDB/redo02.log thread=1 sequence=5
creating datafile file number=7 name=/u01/app/Oracle/oradata/MYDB/MYDB/datafile/BSO_MYDB-PAR_20150402_000101.dbf
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 04/02/2015 04:21:37
RMAN-11003: failure during parse/execution of SQL statement: alter database recover datafile list
1 , 2 , 3 , 4 , 5 , 6 , 8 , 9 , 10 , 11
ORA-01179: file 10 does not exist
バックアップをリストすると、ファイルを失ったようです:
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
10 Full 1010.57M DISK 00:00:48 02-APR-15
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TEST_OP2
Piece Name: /u01/app/Oracle/keep_dir/bkp.0cq3bfi6_1_1
Keep: BACKUP_LOGS Until: 04-APR-15
List of Datafiles in backup set 10
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/mydb/system01.dbf
2 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/mydb/sysaux01.dbf
3 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/mydb/undotbs01.dbf
4 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/mydb/users01.dbf
5 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/mydb/MYDB/datafile/o1_mf_bso_cfg__bgkz5vc3_.dbf
6 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/mydb/MYDB/datafile/o1_mf_bso_cfg__bgkz9qy2_.dbf
8 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/mydb/MYDB/datafile/BSO_MYDB-PAR2_20150221_1713.dbf
9 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/mydb/MYDB/datafile/BSO_MYDB-PAR3_20150221_1713.dbf
10 Full 1250240 02-APR-15
11 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/mydb/MYDB/datafile/BSO_MYDB-PAR_20150401_100200.dbf
どちらが問題なのかわかりません。手伝って頂けますか?ありがとう、Ste
はい、バックアップ出力に従います:
RMAN> list backup;
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
10 Full 1010.57M DISK 00:00:48 02-APR-15
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TEST_OP2
Piece Name: /u01/app/Oracle/keep_dir/bkp.0cq3bfi6_1_1
Keep: BACKUP_LOGS Until: 04-APR-15
List of Datafiles in backup set 10
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/MYDB/system01.dbf
2 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/MYDB/sysaux01.dbf
3 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/MYDB/undotbs01.dbf
4 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/MYDB/users01.dbf
5 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/MYDB/MYDB/datafile/o1_mf_bso_cfg__bgkz5vc3_.dbf
6 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/MYDB/MYDB/datafile/o1_mf_bso_cfg__bgkz9qy2_.dbf
8 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/MYDB/MYDB/datafile/BSO_MYDB-PAR2_20150221_1713.dbf
9 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/MYDB/MYDB/datafile/BSO_MYDB-PAR3_20150221_1713.dbf
10 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/MYDB/MYDB/datafile/BSO_MYDB-PAR_20150401_100100.dbf
11 Full 1250240 02-APR-15 /u01/app/Oracle/oradata/MYDB/MYDB/datafile/BSO_MYDB-PAR_20150401_100200.dbf
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
11 Full 9.33M DISK 00:00:01 02-APR-15
BP Key: 11 Status: AVAILABLE Compressed: NO Tag: TEST_OP2
Piece Name: /u01/app/Oracle/keep_dir/bkp.0dq3bfju_1_1
Keep: BACKUP_LOGS Until: 04-APR-15
Control File Included: Ckp SCN: 1250258 Ckp time: 02-APR-15
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
12 Full 80.00K DISK 00:00:01 02-APR-15
BP Key: 12 Status: AVAILABLE Compressed: NO Tag: TEST_OP2
Piece Name: /u01/app/Oracle/keep_dir/bkp.0eq3bfk0_1_1
Keep: BACKUP_LOGS Until: 04-APR-15
SPFILE Included: Modification time: 02-APR-15
SPFILE db_unique_name: MYDB
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
13 4.00K DISK 00:00:00 02-APR-15
BP Key: 13 Status: AVAILABLE Compressed: NO Tag: TEST_OP2
Piece Name: /u01/app/Oracle/keep_dir/bkp.0fq3bfk2_1_1
Keep: BACKUP_LOGS Until: 04-APR-15
List of Archived Logs in backup set 13
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- --------- ---------- ---------
1 4 1250236 02-APR-15 1250273 02-APR-15
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
14 Full 9.33M DISK 00:00:01 02-APR-15
BP Key: 14 Status: AVAILABLE Compressed: NO Tag: TEST_OP2
Piece Name: /u01/app/Oracle/keep_dir/bkp.0gq3bfk3_1_1
Keep: BACKUP_LOGS Until: 04-APR-15
Control File Included: Ckp SCN: 1250278 Ckp time: 02-APR-15
ファイル10は、他のファイルと同じバックアップピースの一部です。
vm-sles11-node3:~ # ll /u01/app/Oracle/keep_dir/bkp.0cq3bfi6_1_1
-rw-r----- 1 Oracle oinstall 1059667968 Apr 2 03:56 /u01/app/Oracle/keep_dir/bkp.0cq3bfi6_1_1