RMAN recovery to a different node using Networker [message #389263] |
Fri, 27 February 2009 22:15 |
lotusdeva
Messages: 201 Registered: March 2005
|
Senior Member |
|
|
I feel retarded, please help:(
I took hotbackup using RMAN catalog which went to tape. Here is the script for that:
connect target sys/*****@PROD;
connect rcvcat rman/****@catalog;
run {
allocate channel t1 type 'SBT_TAPE';
send 'NSR_ENV=(NSR_SERVER="***",NSR_DATA_VOLUME_POOL=Oracle)';
backup database plus archivelog;
release channel t1;
}
My settings include control file autobackup as follows:
RMAN> show all;
RMAN configuration parameters are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 10 DAYS;
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '/NMO_%F/';
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/data/backups/PROD/ora_df%t_s%s_s%p';
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/data/backups/PROD/hotbkp/snapcf_PROD.f';
I am trying to restore this backup that is on tape (EMC Networker) to a different node. I can do this outside of Networker without any problems. However, when I try to get the backup from tape I have this issue:
1. initPROD.ora is created and modified accordingly on a new server
2. Export sid, startup nomount on new server
export ORACLE_SID=PROD (on this new server)
rman target /
startup nomount
3. I then run the following and get this error:
RMAN> run {
2> allocate channel t1 type 'SBT_TAPE'
3> send 'NSR_ENV=(NSR_SERVER="***",NSR_CLIENT="********")';
4> restore controlfile from autobackup;
5> sql 'alter database mount';
6> sql 'alter database rename file "/data/dbf/PROD/redo01.log" to "/data/scratch/dbf/PROD/redo01.log"';
7> sql 'alter database rename file "/data/dbf/PROD/redo02.log to "/data/scratch/dbf/PROD/redo02.log"';
8> sql 'alter database rename file "/data/dbf/PROD/redo03.log to "/data/scratch/dbf/PROD/redo03.log"';
9> set until sequence 22; (I get this from archive logs)
10> set newname for datafile 1 to '/data/scratch/dbf/PROD/system01.dbf';
11> set newname for datafile 2 to '/data/scratch/dbf/PROD/undotbs01.dbf';
12> set newname for datafile 3 to '/data/scratch/dbf/PROD/sysaux01.dbf';
13> set newname for datafile 4 to '/data/scratch/dbf/PROD/users01.dbf';
14> restore database;
15> switch datafile all;
16> recover database;
17> alter database open resetlogs;
18> }
allocated channel: t1
channel t1: sid=149 devtype=SBT_TAPE
channel t1: NMO v4.5.0.0
Starting restore at 27-FEB-09
released channel: t1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 02/27/2009 22:10:43
RMAN-06495: must explicitly specify DBID with SET DBID command
I cannot seem to pass this error. This error indicates that the db has to be either mounted or DBID set before the restore of teh controlfile. Mounting db before the restore of the controlfile does not work. Setting db id 1) does not make sense because if the primary db is down then I cannot get it, right? My primary is up now, so I was able to get db id, but setting it made the restore hang with the following:
RMAN> run {
connect target
set dbid=466048808
2> allocate channel t1 type 'SBT_TAPE'
3> send 'NSR_ENV=(NSR_SERVER="***",NSR_CLIENT="********")';
4> restore controlfile from autobackup;
5> sql 'alter database mount';
6> sql 'alter database rename file "/data/dbf/PROD/redo01.log" to "/data/scratch/dbf/PROD/redo01.log"';
7> sql 'alter database rename file "/data/dbf/PROD/redo02.log to "/data/scratch/dbf/PROD/redo02.log"';
8> sql 'alter database rename file "/data/dbf/PROD/redo03.log to "/data/scratch/dbf/PROD/redo03.log"';
9> set until sequence 22; (I get this from archive logs)
10> set newname for datafile 1 to '/data/scratch/dbf/PROD/system01.dbf';
11> set newname for datafile 2 to '/data/scratch/dbf/PROD/undotbs01.dbf';
12> set newname for datafile 3 to '/data/scratch/dbf/PROD/sysaux01.dbf';
13> set newname for datafile 4 to '/data/scratch/dbf/PROD/users01.dbf';
14> restore database;
15> switch datafile all;
16> recover database;
17> alter database open resetlogs;
18> }
connected to target database: PROD (not mounted)
executing command: SET DBID
using target database control file instead of recovery catalog
allocated channel: t1
channel t1: sid=152 devtype=SBT_TAPE
channel t1: NMO v4.5.0.0
Starting restore at 27-FEB-09
channel t1: looking for autobackup on day: 20090227
channel t1: looking for autobackup on day: 20090226
channel t1: looking for autobackup on day: 20090225
It looks like it cannot find the autbackup of controlfile? But when I list backup while connected to the target db and rman catalog, I see that autobackup is included in every hot backup that we do:
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4639 Full 7.00M SBT_TAPE 00:00:04 27-FEB-09
BP Key: 4641 Status: AVAILABLE Compressed: NO Tag: TAG20090227T150141
Handle: /NMO_c-466048808-20090227-01/ Media:
Control File Included: Ckp SCN: 23352682865 Ckp time: 27-FEB-09
SPFILE Included: Modification time: 26-FEB-09
I am stuck What I am doing wrong? Thank you!
|
|
|
Re: RMAN recovery to a different node using Networker [message #389284 is a reply to message #389263] |
Sat, 28 February 2009 01:37 |
vivekv_dba
Messages: 3 Registered: February 2009
|
Junior Member |
|
|
Hi,
Hope you are restoring RMAN backup taken to TAPE on a different server.
To access the backup taken in original server/node - configuration needs to be made by your backup administrator to identify your new server/node as the original sever/node.
This needs to be done to recognize the tape drive through RMAN from new server.
regards
Vivek
|
|
|
|
Re: RMAN recovery to a different node using Networker [message #389399 is a reply to message #389263] |
Sun, 01 March 2009 20:50 |
alexzeng
Messages: 133 Registered: August 2005 Location: alexzeng.wordpress.com
|
Senior Member |
|
|
I suggest you restore the controlfile first by usying:
set dbid=466048808
run {
allocate channel t1 type 'SBT_TAPE'
send 'NSR_ENV=(NSR_SERVER="***",NSR_CLIENT="********")';
restore controlfile from tag='TAG20090227T150141';
}
Also make sure the channel is correctly configured.
Regards,
Alex
|
|
|
Re: RMAN recovery to a different node using Networker [message #389755 is a reply to message #389399] |
Tue, 03 March 2009 08:08 |
lotusdeva
Messages: 201 Registered: March 2005
|
Senior Member |
|
|
No luck
Recovery Manager: Release 10.2.0.3.0 - Production on Tue Mar 3 09:03:10 2009
Copyright (c) 1982, 2005, Oracle. All rights reserved.
RMAN> connect target
2> set dbid=466048808
3> run {
4> allocate channel t1 type 'SBT_TAPE'
5> send 'NSR_ENV=(NSR_SERVER="******",NSR_CLIENT="*******")';
6> restore controlfile from tag='TAG20090227T150141';
7> release channel t1;
8> }
9>
10>
connected to target database: PROD (not mounted)
executing command: SET DBID
using target database control file instead of recovery catalog
allocated channel: t1
channel t1: sid=152 devtype=SBT_TAPE
channel t1: NMO v4.5.0.0
Starting restore at 03-MAR-09
released channel: t1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 03/03/2009 09:03:16
RMAN-06563: control file or SPFILE must be restored using FROM AUTOBACKUP
Recovery Manager complete
I have this autobackup:
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4639 Full 7.00M SBT_TAPE 00:00:04 27-FEB-09
BP Key: 4641 Status: AVAILABLE Compressed: NO Tag: TAG20090227T150141
Handle: /NMO_c-466048808-20090227-01/ Media:
Control File Included: Ckp SCN: 23352682865 Ckp time: 27-FEB-09
SPFILE Included: Modification time: 26-FEB-09
[Updated on: Tue, 03 March 2009 08:10] Report message to a moderator
|
|
|
Re: RMAN recovery to a different node using Networker [message #390329 is a reply to message #389263] |
Fri, 06 March 2009 00:18 |
alexzeng
Messages: 133 Registered: August 2005 Location: alexzeng.wordpress.com
|
Senior Member |
|
|
It seems you don't conenct to rman catalog. You need to connect to the catalog as well.
If it still doesn't work, try this
rman connect targer / connect catalog ../..@..
set dbid=466048808
run {
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '/NMO_%F/';
allocate channel t1 type 'SBT_TAPE'
send 'NSR_ENV=(NSR_SERVER="***",NSR_CLIENT="********")';
restore controlfile from autobackup;
}
Regards,
Alex
[Updated on: Fri, 06 March 2009 00:28] Report message to a moderator
|
|
|
|
Re: RMAN recovery to a different node using Networker [message #390560 is a reply to message #390481] |
Sat, 07 March 2009 08:45 |
alexzeng
Messages: 133 Registered: August 2005 Location: alexzeng.wordpress.com
|
Senior Member |
|
|
lotusdeva wrote on Fri, 06 March 2009 09:22 |
SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE 'SBT_TAPE' TO '/NMO_%F/';
This is exactly what I was missing. Which is weird because I already have this setting globally in rman. Anyway, thank you!
|
Glad to hear it works!
This information is stored in controlfile. For the new db, there is no controlfile before you restore it, that's why you need to set it.
Regards,
Alex
|
|
|
Re: RMAN recovery to a different node using Networker [message #421798 is a reply to message #390560] |
Thu, 10 September 2009 11:25 |
draganradosav
Messages: 1 Registered: September 2009
|
Junior Member |
|
|
Hi,
I have the same problem with restoring oracle backups from tape (EMC Networker) to different node.
I must tell that I haven't used recovery catolog only control file when I have created oracle backups on the tape.
Is it possible to restore oracle backups to new node and how to do that?
Thanks and best regards,
Dragan
|
|
|