新しいサーバーで回復できるように、USBドライブにコピーできるrmanでホットバックアップを実行しようとしています。
バックアップは2日前に行われ、restore database
コマンドは同じ日に機能していたため、最後のSCNでUNTIL SCN
を使用する必要があると思いますが、RMAN-20208: UNTIL CHANGE is before RESETLOGS change
を取得します
インターネットでRESET DATABASE
を使用する必要があることを確認しましたが、RMAN-06002: command not allowed when not connected to a recovery catalog
が表示され、この手順はOracle 10以降(Oracle 9iを使用している)でしか機能しないと思います。
何か案は?
rmanでバックアップ
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'c:/brubru/auto/%F';
run
{
CROSSCHECK BACKUP;
CROSSCHECK COPY;
CROSSCHECK BACKUPSET;
CROSSCHECK COPY OF DATABASE;
CROSSCHECK archivelog all;
allocate channel d1 device type disk format 'c:/brubru/%U.bkp';
BACKUP CHECK LOGICAL DATABASE format ‘c:/brubru/data_%d_%s_%T.bak’ PLUS ARCHIVELOG DELETE INPUT;
release channel d1;
}
復元(2番目のサーバー)
> oradim -new -sid PEM -intpwd sys
> set Oracle_SID=PEM
> rman target /
Recovery Manager: Release 9.2.0.1.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
connected to target database (not started)
RMAN> startup nomount
startup failed: ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file 'C:\Oracle\ORA92\DATABASE\INITPEM.ORA'
trying to start the Oracle instance without parameter files ...
Oracle instance started
Total System Global Area 97589952 bytes
Fixed Size 453312 bytes
Variable Size 46137344 bytes
Database Buffers 50331648 bytes
Redo Buffers 667648 bytes
RMAN> set dbid 2176828955
executing command: SET DBID
RMAN> RUN {
2> SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'C:\brubru\auto
\%F';
3> RESTORE SPFILE FROM AUTOBACKUP;
4> }
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
using target database controlfile instead of recovery catalog
Starting restore at 13-05-20
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=9 devtype=DISK
channel ORA_DISK_1: looking for autobackup on day: 20130520
channel ORA_DISK_1: looking for autobackup on day: 20130519
channel ORA_DISK_1: looking for autobackup on day: 20130518
channel ORA_DISK_1: autobackup found: C:\brubru\auto\c-2176828955-20130518-00
channel ORA_DISK_1: SPFILE restore from autobackup complete
Finished restore at 13-05-20
RMAN> shutdown immediate
Oracle instance shut down
RMAN> startup nomount
connected to target database (not started)
Oracle instance started
Total System Global Area 135338868 bytes
Fixed Size 453492 bytes
Variable Size 109051904 bytes
Database Buffers 25165824 bytes
Redo Buffers 667648 bytes
RMAN> set dbid=2176828955
executing command: SET DBID
RMAN> RUN {
2> SET CONTROLFILE AUTOBACKUP FORMAT
3> FOR DEVICE TYPE DISK TO 'C:\brubru\auto\%F';
4> RESTORE CONTROLFILE FROM AUTOBACKUP;
5> }
executing command: SET CONTROLFILE AUTOBACKUP FORMAT
Starting restore at 13-05-20
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=13 devtype=DISK
channel ORA_DISK_1: looking for autobackup on day: 20130520
channel ORA_DISK_1: looking for autobackup on day: 20130519
channel ORA_DISK_1: looking for autobackup on day: 20130518
channel ORA_DISK_1: autobackup found: C:\brubru\auto\c-2176828955-20130518-00
channel ORA_DISK_1: controlfile restore from autobackup complete
replicating controlfile
input filename=C:\BDD_Oracle\ORADATA\PEM\CONTROL01.CTL
output filename=C:\BDD_Oracle\ORADATA\PEM\CONTROL02.CTL
output filename=C:\BDD_Oracle\ORADATA\PEM\CONTROL03.CTL
Finished restore at 13-05-20
RMAN> alter database mount;
database mounted
RMAN> run
2> {
3> allocate channel c1 device type disk format 'c:\brubru\%U.bkp';
4> restore database;
5> release channel c1;
6> }
released channel: ORA_DISK_1
allocated channel: c1
channel c1: sid=13 devtype=DISK
Starting restore at 13-05-20
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 05/20/2013 15:53:37
RMAN-06026: some targets not found - aborting restore
RMAN-06023: no backup or copy of datafile 15 found to restore
RMAN-06023: no backup or copy of datafile 14 found to restore
RMAN-06023: no backup or copy of datafile 13 found to restore
RMAN-06023: no backup or copy of datafile 12 found to restore
RMAN-06023: no backup or copy of datafile 11 found to restore
RMAN-06023: no backup or copy of datafile 10 found to restore
RMAN-06023: no backup or copy of datafile 9 found to restore
RMAN-06023: no backup or copy of datafile 8 found to restore
RMAN-06023: no backup or copy of datafile 7 found to restore
RMAN-06023: no backup or copy of datafile 6 found to restore
RMAN-06023: no backup or copy of datafile 5 found to restore
RMAN-06023: no backup or copy of datafile 4 found to restore
RMAN-06023: no backup or copy of datafile 3 found to restore
RMAN-06023: no backup or copy of datafile 2 found to restore
RMAN-06023: no backup or copy of datafile 1 found to restore
RMAN> list backup;
List of Backup Sets
===================
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
105 737M DISK 00:00:39 13-05-18
BP Key: 105 Status: AVAILABLE Tag: TAG20130518T124955
Piece Name: C:\BRUBRU\39O9ULFK_1_1.BKP
List of Archived Logs in backup set 105
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- -------- ---------- ---------
1 1156 245177104 13-05-11 245458552 13-05-12
1 1157 245458552 13-05-12 245647641 13-05-13
1 1158 245647641 13-05-13 245857439 13-05-14
1 1159 245857439 13-05-14 246084782 13-05-15
1 1160 246084782 13-05-15 246304002 13-05-16
1 1161 246304002 13-05-16 246519120 13-05-17
1 1162 246519120 13-05-17 246722961 13-05-18
1 1163 246722961 13-05-18 246779464 13-05-18
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
106 Full 1G DISK 00:02:14 13-05-18
BP Key: 106 Status: AVAILABLE Tag: TAG20130518T125043
Piece Name: C:\BRUBRU\DATA_PEM_106_20130518.BAK
List of Datafiles in backup set 106
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- -------- ----
1 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\PEM\SYSTEM01.DBF
2 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\PEM\UNDOTBS01.DBF
3 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\PEM\CWMLITE01.DBF
4 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\PEM\DRSYS01.DBF
5 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\PEM\EXAMPLE01.DBF
6 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\PEM\INDX01.DBF
7 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\PEM\ODM01.DBF
8 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\PEM\TOOLS01.DBF
9 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\PEM\USERS01.DBF
10 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\PEM\XDB01.DBF
11 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\PEM\USER.ORA
12 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\PEM\GDR2.ORA
13 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\PEM\USR.ORA
14 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\RMAN\RMAN01.DBF
15 Full 246779607 13-05-18 C:\BDD_Oracle\ORADATA\RMAN3\RMAN301.DBF
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
107 163K DISK 00:00:01 13-05-18
BP Key: 107 Status: AVAILABLE Tag: TAG20130518T125258
Piece Name: C:\BRUBRU\3BO9ULLA_1_1.BKP
List of Archived Logs in backup set 107
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- -------- ---------- ---------
1 1164 246779464 13-05-18 246779907 13-05-18
RMAN> run
2> {
3> allocate channel c1 device type disk format 'c:\brubru\%U.bkp';
4> set until SCN 246779907;
5> restore database;
6> release channel c1;
7> }
allocated channel: c1
channel c1: sid=13 devtype=DISK
executing command: SET until clause
released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of set command at 05/20/2013 15:59:11
RMAN-20208: UNTIL CHANGE is before RESETLOGS change
RMAN> LIST INCARNATION;
List of Database Incarnations
DB Key Inc Key DB Name DB ID CUR Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 PEM 2176828955 NO 190578 10-02-10
2 2 PEM 2176828955 YES 246779908 13-05-18
RMAN> RESET DATABASE TO INCARNATION 1;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of reset command at 05/20/2013 15:55:33
RMAN-06002: command not allowed when not connected to a recovery catalog
はい、このシナリオはNOCATALOGモードで可能です。私は先週の土曜日に9.2でこれを正確に行ったので、それを保証することができます:)あなたの試みはほとんど成功しました。間違ったことは、Reset SCN 246779908
を超えた、古すぎる制御ファイルを復元したことだけです。 C:\brubru\auto\c-2176828955-20130518-00
を移動すると、おそらく少し古い制御ファイルが見つかり、復元は成功します。 LIST INCARNATIONS
が新しいインカネーションをまったく表示しないことを確認します-controlfileはそれを認識しません。