Restore backups to new host

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Restore backups to new host

satish
Hi erman,

Our dbversion:12.1.0.2

We are trying to restore our PROD backups to new host.

PROD database name:PRODDB

TEST database name:TEST

[test@erpsupportdb archives]$ export ORACLE_SID=TEST

 
[test@erpsupportdb archives]$ sqlplus "/as sysdba";

 
SQL*Plus: Release 12.1.0.2.0 Production on Wed Jul 21 11:36:21 2021

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

 
Connected to an idle instance.

 
SQL> startup nomount;

ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance

ORACLE instance started.

 
Total System Global Area 2.6844E+10 bytes

Fixed Size         2939560 bytes

Variable Size       738198872 bytes

Database Buffers     2.6038E+10 bytes

Redo Buffers        64167936 bytes

 
 
[test@erpsupportdb archives]$ rman target /

 
Recovery Manager: Release 12.1.0.2.0 - Production on Wed Jul 21 11:39:36 2021

 
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.

 
connected to target database: TEST (not mounted)

 
RMAN> restore controlfile from '/ERPShareddrive/ERP/opm/archives/ora_df1078276005_s286837_s1';

 
Starting restore at 21-JUL-21

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=921 device type=DISK

 
channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

output file name=/u02/TEST_DATA/data/cntrl01.dbf

output file name=/u02/TEST_DATA/data/cntrl02.dbf

output file name=/u02/TEST_DATA/data/cntrl03.dbf

Finished restore at 21-JUL-21

 
RMAN> alter database mount;

 
RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of sql statement command at 07/21/2021 11:40:32

ORA-01103: database name 'PRODDB' in control file is not 'TEST'

 
RMAN>

 
 
Our pfile:

[test@erpsupportdb archives]$ cd $ORACLE_HOME/dbs

[test@erpsupportdb dbs]$ cat initTEST.ora

*.compatible='12.1.0'

*.control_files='/u02/TEST_DATA/data/cntrl01.dbf','/u02/TEST_DATA/data/cntrl02.dbf','/u02/TEST_DATA/data/cntrl03.dbf'#Restore Controlfile

*.db_create_file_dest='/u02/TEST_DATA/data'

*.db_name='TEST'

*.local_listener='TEST_LOCAL'

*.log_archive_dest_1='LOCATION=/u02/TEST_DATA/data/archive'

*.undo_management='AUTO'# Required 11i setting

*.undo_tablespace='APPS_UNDOTS1'# Required 11i setting

*.utl_file_dir='/usr/tmp','/usr/tmp','/u02/TEST_DATA/12.1.0/appsutil/outbound/TEST_erpsupportdb','/usr/tmp'

*.workarea_size_policy='AUTO'# Required 11i setting

[test@erpsupportdb dbs]$

 
Please let us know how to avoid this error:

ORA-01103: database name 'PRODDB' in control file is not 'TEST'

Thanks,

SG
Reply | Threaded
Open this post in threaded view
|

Re: Restore backups to new host

dlfy
Hi Satish,

Try using rman duplicate connecting to TEST as auxiliary database.
Be sure to remove the control file line from your parameter file as you won't need it if the backup you are using to restore from contains the control file.

i.e.

duplicate target database to TEST from active database using backupset;

Dfly
D-Fly
Reply | Threaded
Open this post in threaded view
|

Re: Restore backups to new host

ErmanArslansOracleBlog
Administrator
Yes, you can do a backup based rman duplicate.
or for a quick win; you can restore your db with the same name to the new host and then change the sid/db_name using the proper method (by using nid or by recreating the controlfile)..