Home » RDBMS Server » Backup & Recovery » RMAN restore database from another backup of different database name (Window)
RMAN restore database from another backup of different database name [message #326753] Thu, 12 June 2008 08:59 Go to next message
supportx2008
Messages: 13
Registered: May 2008
Junior Member
In our environment, we have
PRODA and PRODB which is in isolated environment. The database name cannot be changed. We need to use the backup of PRODA to restore into PRODB. We try to restore the control file backup to PRODB but failed. The error is different database name.

We then try to recreate the control file in PRODB with the trace in PRODA. We then try to catalog the backup of PRODA to PRODB and received another error which is also different in database name.

I searched the internet and try different solution but it doesn't work. With the criteria of not able to change the database name from PRODB, how can we restore the backup using RMAN and run as PRODB ?

Thanks !
Re: RMAN restore database from another backup of different database name [message #326758 is a reply to message #326753] Thu, 12 June 2008 09:05 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10708
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
No oracle versions or OS versions mentioned.
No useful screen shots, error messages or any proof is provided.
We cannot guess everything.
>>We need to use the backup of PRODA to restore into PRODB.
It is possible.
You can just restore the database in another node using RMAN
or
Use RMAN duplication.
All the methods are exactly described in documentation.
Re: RMAN restore database from another backup of different database name [message #327263 is a reply to message #326758] Sun, 15 June 2008 21:19 Go to previous messageGo to next message
supportx2008
Messages: 13
Registered: May 2008
Junior Member
The Oracle is 10gr2 RAC running on windows 2003. We perform a backup using enterprise manager from PRODA:

Afer that,we list the backupset using rman as follows:

Recovery Manager: Release 10.2.0.3.0 - Production on Mon Jun 16 10:08:20 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database: PRODA (DBID=498038284)

RMAN> list backupset;


List of Backup Sets
===================

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
7 Full 250.34M DISK 00:03:50 10-JUN-08
BP Key: 7 Status: AVAILABLE Compressed: YES Tag: BACKUP_PRODA
Piece Name: G:\ORACLE_BACKUP\PRODA\09JIJ955_1_1
List of Datafiles in backup set 7
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 18660997 10-JUN-08 G:\ORADATA\PRODA\SYSTEM01.DBF
2 Full 18660997 10-JUN-08 G:\ORADATA\PRODA\UNDOTBS01.DBF
3 Full 18660997 10-JUN-08 G:\ORADATA\PRODA\SYSAUX01.DBF
4 Full 18660997 10-JUN-08 G:\ORADATA\PRODA\UNDOTBS02.DBF
5 Full 18660997 10-JUN-08 G:\ORADATA\PRODA\USERS01.DBF
6 Full 18660997 10-JUN-08 G:\ORADATA\PRODA\PRODA01.DBF

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
8 Full 14.92M DISK 00:00:03 10-JUN-08
BP Key: 8 Status: AVAILABLE Compressed: NO Tag: TAG20080610T153411
Piece Name: G:\ORACLE_BACKUP\PRODA\C-498038284-20080610-01
Control File Included: Ckp SCN: 18660997 Ckp time: 10-JUN-08
SPFILE Included: Modification time: 10-JUN-08

RMAN>

We then copy those file into PRODB Server. We try to restore the control file backup in PRODA into PRODB (D:\oracle_backup\PRODAOffline\) but it's failed to mount (ORA-01103).

Recovery Manager: Release 10.2.0.3.0 - Production on Mon Jun 16 09:35:36 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

connected to target database (not started)

RMAN> startup nomount;

Oracle instance started

Total System Global Area 612368384 bytes

Fixed Size 1292036 bytes
Variable Size 205523196 bytes
Database Buffers 398458880 bytes
Redo Buffers 7094272 bytes

RMAN> restore controlfile from 'D:\oracle_backup\PRODAOffline\C-498038284-20080610-00';

Starting restore at 16-JUN-08
using channel ORA_DISK_1

channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:07
output filename=G:\ORADATA\PRODB\CONTROL01.CTL
output filename=G:\ORADATA\PRODB\CONTROL02.CTL
output filename=G:\ORADATA\PRODB\CONTROL03.CTL
Finished restore at 16-JUN-08

RMAN> startup mount;

database is already started
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of startup command at 06/16/2008 09:39:06
ORA-01103: database name 'PRODA' in control file is not 'PRODB'


We then try to manual create the control file in PRODB. Of course, the database name is PRODB.
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Jun 16 09:46:24 2008

Copyright (c) 1982, 2006, Oracle. All Rights Reserved.

SQL> connect sys/xxxxxxxx as sysdba
Connected.

SQL> CREATE CONTROLFILE REUSE DATABASE "PRODB" RESETLOGS ARCHIVELOG
2 MAXLOGFILES 192
3 MAXLOGMEMBERS 3
4 MAXDATAFILES 1024
5 MAXINSTANCES 32
6 MAXLOGHISTORY 292
7 LOGFILE
8 GROUP 1 (
9 'G:\ORADATA\PRODB\REDO0101A.LOG',
10 'G:\ORADATA\PRODB\REDO0101B.LOG'
11 ) SIZE 50M,
12 GROUP 2 (
13 'G:\ORADATA\PRODB\REDO0102A.LOG',
14 'G:\ORADATA\PRODB\REDO0102B.LOG'
15 ) SIZE 50M,
16 GROUP 3 (
17 'G:\ORADATA\PRODB\REDO0103A.LOG',
18 'G:\ORADATA\PRODB\REDO0103B.LOG'
19 ) SIZE 50M
20 -- STANDBY LOGFILE
21 DATAFILE
22 'G:\ORADATA\PRODB\SYSTEM01.DBF',
23 'G:\ORADATA\PRODB\UNDOTBS01.DBF',
24 'G:\ORADATA\PRODB\SYSAUX01.DBF',
28 'G:\ORADATA\PRODB\UNDOTBS02.DBF',
29 'G:\ORADATA\PRODB\USERS01.DBF',
39 'G:\ORADATA\PRODB\PROD01.DBF',
48 CHARACTER SET AL32UTF8
49 ;

Control file created.

SQL>

We then try to catalog an offline backup (taken from PRODA database) in PRODB database.

RMAN> catalog backuppiece 'D:\oracle_backup\PRODAoffline\09JIJ955_1_1';

ORA-19870: error reading backup piece D:\oracle_backup\PRODAoffline\09JIJ955_1_1
ORA-19691: d:\oracle_backup\PRODAoffline\09JIJ955_1_1 is from different database: id=498038284, name=PRODA
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of catalog command at 06/16/2008 09:27:21
RMAN-06209: List of failed objects
RMAN-06211: ==========================
RMAN-06212: Object Type Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Backup Piece D:\oracle_backup\PRODAoffline\09JIJ955_1_1

Given that the database name in PRODB cannot be changed, is there any way to restore the backup taken in PRODA into PRODB database ? Thanks !
Re: RMAN restore database from another backup of different database name [message #327266 is a reply to message #327263] Sun, 15 June 2008 22:01 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
If you aren't going to use RMAN's duplication feature, then you should restore & recover the database as PRODA and then use the nid utility to rename the database to PRODB.
Re: RMAN restore database from another backup of different database name [message #327271 is a reply to message #327266] Sun, 15 June 2008 22:26 Go to previous messageGo to next message
supportx2008
Messages: 13
Registered: May 2008
Junior Member
Thanks for your response. We already read the nid utility. But it can do the rename only when the database can be mount. We got some limitation on this restore because the machine already have another instance holding the database name of PRODA. Will it cause any problem if we just restore as PRODA in instance 2 ? Thanks !

Instance->Database
(Instance 1) PRODA->PRODA
(Instance 2) PRODB->PRODB

Re: RMAN restore database from another backup of different database name [message #327392 is a reply to message #327271] Mon, 16 June 2008 05:07 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
supportx2008 wrote on Sun, 15 June 2008 23:26
We got some limitation on this restore because the machine already have another instance holding the database name of PRODA.


OK, that explains the "already started" message you were receiving.

If you have access to these two machines at the same time (ie. there is connectivity between the two nodes), you can consider RMAN's DUPLICATE DATABASE procedure. If so, can the PRODA instance be stopped temporarily while the PRODB database is being built? Or, you can do image copy backups from PRODA and then copy the files to PRODB and follow this process (Renaming an Oracle database).

supportx2008 wrote on Sun, 15 June 2008 23:26


Instance->Database
(Instance 1) PRODA->PRODA
(Instance 2) PRODB->PRODB


That doesn't really explain much.

Re: RMAN restore database from another backup of different database name [message #329394 is a reply to message #326753] Wed, 25 June 2008 05:45 Go to previous messageGo to next message
sidkolar
Messages: 5
Registered: June 2008
Junior Member
You you should use "DUPLICATE TARGET DATABASE TO PRODB" after restiring all the datafiles and then restore the online redo logs. Then open the database with resetlogs option.
Re: RMAN restore database from another backup of different database name [message #329466 is a reply to message #329394] Wed, 25 June 2008 08:50 Go to previous message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
sidkolar wrote on Wed, 25 June 2008 06:45
You you should use "DUPLICATE TARGET DATABASE TO PRODB" after restiring all the datafiles and then restore the online redo logs. Then open the database with resetlogs option.

You obviously didn't read the thread !
Previous Topic: media failure
Next Topic: RMAN-04015: error setting target database character set to US7ASCII
Goto Forum:
  


Current Time: Mon Nov 25 20:44:49 CST 2024