Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: RMAN restore on another server

RE: RMAN restore on another server

From: Josh Collier <Josh.Collier_at_Banfield.net>
Date: Mon, 08 Dec 2003 11:24:26 -0800
Message-ID: <F001.005D9321.20031208112426@fatcity.com>


why not use the RMAN duplicate database process. that sounds like what you are trying to do. Have you ever let the script run to completion? Maybe its slow for another reason. I have used duplicate database on Solaris many times with great success.

Josh

-----Original Message-----
Sent: Monday, December 08, 2003 8:20 AM
To: Multiple recipients of list ORACLE-L

Dennis and all,

 I have no problem getting the controlfile... I just comment out the SET commands to change the directories of the dbfs...and I replicate the control according to the init file specifications.. So This operation actually extract the controlfile out of the backup piece so I know the location and connections are working fine.

But since the controlfile is backup and I am restoring it with the same RMan command I think I should have no problem.. I know other DBAs.. run this same script and restore the database on another server with no problem if the controlfile is restored before the database is restored and recovered.

Here is the restore controlfile script and resulting log file



Controlfile restore Script

connect catalog rman81740/pw_at_ltsprcat

connect target /

run

{

allocate channel d1 type disk ;

sql 'alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"'; set until time = '2003-12-02 05:50:00';

#restore controlfile to '/u02/vssppln/restored_cf.ctl';

replicate controlfile from '/u02/vssppln/restored_cf.ctl';

release channel d1;
}



Successful Controlfile restore log

Recovery Manager: Release 8.1.7.4.0 - Production

RMAN>
RMAN> connect catalog rman81740/pw_at_ltsprcat

2>
3> connect target /
4>
5>
6> run
7>
8> {
9>
10> allocate channel d1 type disk ;
11>
12> sql 'alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"';
13> set until time = '2003-12-02 05:50:00';
14>
15>
16> restore controlfile to '/u02/vssppln/restored_cf.ctl';
17>
18> replicate controlfile from '/u02/vssppln/restored_cf.ctl';
19>
20> release channel d1;
21> }

22>
23>
RMAN-06008: connected to recovery catalog database

RMAN-06006: connected to target database: vssppln (not mounted)

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: d1
RMAN-08500: channel d1: sid=12 devtype=DISK

RMAN-03022: compiling command: sql
RMAN-06162: sql statement: alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
RMAN-03023: executing command: sql

RMAN-03022: compiling command: set

RMAN-03022: compiling command: replicate
RMAN-03023: executing command: replicate
RMAN-08058: replicating controlfile
RMAN-08506: input filename=/u02/vssppln/restored_cf.ctl
RMAN-08505: output filename=/u02/vssppln/vsspplncntl01.ctl
RMAN-08505: output filename=/u02/vssppln/vsspplncntl02.ctl
RMAN-08505: output filename=/u02/vssppln/vsspplncntl03.ctl
RMAN-08505: output filename=/u02/vssppln/vsspplncntl04.ctl
RMAN-08505: output filename=/u02/vssppln/vsspplncntl05.ctl

RMAN-03022: compiling command: release

RMAN-03023: executing command: release
RMAN-08031: released channel: d1

Recovery Manager complete.



Here is the orignal entire script to restore controlfile and database but it just hangs on the set commands..

==> rman cmdfile=restore_dbsid.rman trace=restore_dbsid.nohup_log  

Recovery Manager: Release 8.1.7.4.0 - Production  

RMAN>
RMAN> connect catalog rman81740/pw_at_ltsprcat

2> 
3> connect target /
4> 
5> 
6> 
7> run
8> 
9> {
10> 
11> allocate channel disk_channel1 type disk ;
12> 
13> sql 'alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"';
14> set until time = '2003-12-02 05:50:00';
15> 
16>  set newname for datafile 1 to
17> '/u02/vssppln/system01.dbf';
18> 
19>  set newname for datafile 2 to
20> '/u02/vssppln/rbs01.dbf';
21> 
22>  set newname for datafile 3 to
23> '/u02/vssppln/rbs02.dbf';
24> 
25>  set newname for datafile 4 to
26> '/u02/vssppln/AIMFACT01.dbf';
27> 
28>  set newname for datafile 5 to
29> '/u02/vssppln/AIMFACT_INDEX01.dbf';
30> 
31>  set newname for datafile 6 to
32> '/u02/vssppln/AIMFACT101.dbf';
33> 
34>  set newname for datafile 7 to
35> '/u02/vssppln/AIMFACT102.dbf';
36> 
37>  set newname for datafile 8 to
38> '/u02/vssppln/aimfact1_index01.dbf';
39> 
40>  set newname for datafile 9 to
41> '/u02/vssppln/aimfact1_index02.dbf';
42> 
43>  set newname for datafile 10 to
44> '/u02/vssppln/aimfact1_index03.dbf';
45> 
46>  set newname for datafile 11 to
47> '/u02/vssppln/aimfact1_index04.dbf';
48> 
49>  set newname for datafile 12 to
50> '/u02/vssppln/aimfact201.dbf';
51> 
52>  set newname for datafile 13 to
53> '/u02/vssppln/aimfact202.dbf';
54> 
55>  set newname for datafile 14 to
56> '/u02/vssppln/aimfact2_index01.dbf';
57> 
58>  set newname for datafile 15 to
59> '/u02/vssppln/aimfact2_index02.dbf';
60> 
61>  set newname for datafile 16 to
62> '/u02/vssppln/aimfact2_index03.dbf';
63> 
64>  set newname for datafile 17 to
65> '/u02/vssppln/aimfact2_index04.dbf';
66> 
67>  set newname for datafile 18 to
68> '/u02/vssppln/aimstruct01.dbf';
69> 
70>  set newname for datafile 19 to
71> '/u02/vssppln/aimstruct_index01.dbf';
72> 
73>  set newname for datafile 20 to
74> '/u02/vssppln/aimstruct101.dbf';
75> 
76>  set newname for datafile 21 to
77> '/u02/vssppln/aimstruct1_index01.dbf';
78> 
79>  set newname for datafile 22 to
80> '/u02/vssppln/aimwork01.dbf';
81> 
82>  set newname for datafile 23 to
83> '/u02/vssppln/mipsdata01.dbf';
84> 
85>  set newname for datafile 24 to
86> '/u02/vssppln/mipsindex01.dbf';
87> 
88>  set newname for datafile 25 to
89> '/u02/vssppln/mipsdata101.dbf';
90> 
91>  set newname for datafile 26 to
92> '/u02/vssppln/mipsdata1_index01.dbf';
93> 
94>  set newname for datafile 27 to
95> '/u02/vssppln/mipsdata201.dbf';
96> 
97>  set newname for datafile 28 to

98> '/u02/vssppln/nipsdata2_index01.dbf'; 99>
100>  set newname for datafile 29 to
101> '/u02/vssppln/tools01.dbf';
102> 
103>  set newname for datafile 30 to
104> '/u02/vssppln/users01.dbf';
105> 
106>  set newname for datafile 31 to
107> '/u02/vssppln/AIMINDEX01.dbf';
108> 
109>  set newname for datafile 32 to
110> '/u02/vssppln/aimfact1_index05.dbf';
111> 
112>  set newname for datafile 33 to
113> '/u02/vssppln/aimfact2_index05.dbf';
114> 
115> 
116> restore database;
117> 
118> restore controlfile to '/u02/vssppln/restored_cf.ctl';
119> 
120> mount database;
121> 
122> switch datafile all;
123> 
124> release channel disk_channel1;
125> }
126> 
127> 

RMAN-06008: connected to recovery catalog database  

RMAN-06006: connected to target database: vssppln (not mounted)  

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: disk_channel1
RMAN-08500: channel disk_channel1: sid=10 devtype=DISK
 

RMAN-03022: compiling command: sql
RMAN-06162: sql statement: alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
RMAN-03023: executing command: sql  

RMAN-03022: compiling command: set  

RMAN-03022: compiling command: set  

RMAN-03022: compiling command: set  

RMAN-03022: compiling command: set  

RMAN-03022: compiling command: set  

(and it slowly keeps spitting out these "RMAN-03022: compiling command: set
" )

Brian Spears
Database Services
bspears_at_limitedbrands.com

> Limitedbrands
> TECHNOLOGY SERVICES
> 
> 




-----Original Message-----
DENNIS WILLIAMS
Sent: Monday, December 08, 2003 9:59 AM
To: Multiple recipients of list ORACLE-L

Brian - I think that is the problem -- you can't tell RMAN you are on a different server. The part I'm not getting a clear picture on is your control file. For this specific recovery, how is it getting a control file? Did you move one over from production, or are you waiting for RMAN to cough it up from the backup pieces? On 8i this tends to be a problem.

Dennis Williams
DBA
Lifetouch, Inc.
dwilliams_at_lifetouch.com

-----Original Message-----
Sent: Monday, December 08, 2003 8:39 AM
To: Multiple recipients of list ORACLE-L

I have ftp'd the backup pieces into the identical backup location as the orignal server so I have all the stuff available... Im just wondering if I have to do something to tell it that I am on a different server...

I've restored the controlfile mannually before but on the same server. I backup the controlfile and wrap in the backup piece with the normal backup.

Brian

-----Original Message-----
DENNIS WILLIAMS
Sent: Friday, December 05, 2003 8:19 PM
To: Multiple recipients of list ORACLE-L

Janardhana - That's a good point.
Brian - were you expecting RMAN to extract your controlfile from the RMAN backup pieces? You are on Oracle8i, and RMAN isn't so good at doing that in 8i. I couldn't get that to work myself.

Dennis Williams
DBA
Lifetouch, Inc.
dwilliams_at_lifetouch.com

-----Original Message-----
Sent: Friday, December 05, 2003 6:49 PM
To: Multiple recipients of list ORACLE-L

May be you try the following:  

If you get errors restoring controlfile, You may ftp the controlfiles manually to the new server and startup mount the database first. Then, Try your restore database.  

-----Original Message-----
Sent: Friday, December 05, 2003 2:14 PM
To: Multiple recipients of list ORACLE-L  

Goal: To restore the database from RMAN backup on a different server by means of moving the backup pieces and logs over to the new machine and use Rman to unpack the database files.

Strategy: To restore the database from the RMAN backup pieces into a new directory locations on the machine and extract the control file and startup the database.  

Some of the steps to setup the new machine.

  1. Install oracle 8i
  2. install the patch 4.0
  3. copy .profile over
  4. duplicated the Admin directories for the database to be restored
  5. created a big mount /u02/vssppln/ point for all the datafiles and controlfiles and so on
  6. Created a backup mount point to store the RMAN backup pieces and archivelogs
  7. moved the backup pieces and archivelogs to the new machine
  8. Setup and confirm connectivity to Rman catalog
  9. No mount the database to be on the new machine
  10. Launch the Rman command

rman cmdfile=restore_dbsid.rman trace=restore_dbsid.log  

Problem... I run this restore from Rman backup...but it gets to processing the command and gets to the "RMAN-03022: compiling command: set " and just hangs...adding another line every 1/2 hour or so...  

Anybody seen this or have ideas? I talked to one guy who did have this but couldn't remember the solution. This is the first time doing this so I might be missing something simple..        

Here is the command in operation    

==> rman cmdfile=restore_dbsid.rman trace=restore_dbsid.nohup_log  

Recovery Manager: Release 8.1.7.4.0 - Production  

RMAN>
RMAN> connect catalog rman81740/depart_at_ltsprcat <mailto:rman81740/depart_at_ltsprcat>

2> 
3> connect target /
4> 
5> 
6> 
7> run
8> 
9> {
10> 
11> allocate channel disk_channel1 type disk ;
12> 
13> sql 'alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"';
14> set until time = '2003-12-02 05:50:00';
15> 
16>  set newname for datafile 1 to
17> '/u02/vssppln/system01.dbf';
18> 
19>  set newname for datafile 2 to
20> '/u02/vssppln/rbs01.dbf';
21> 
22>  set newname for datafile 3 to
23> '/u02/vssppln/rbs02.dbf';
24> 
25>  set newname for datafile 4 to
26> '/u02/vssppln/AIMFACT01.dbf';
27> 
28>  set newname for datafile 5 to
29> '/u02/vssppln/AIMFACT_INDEX01.dbf';
30> 
31>  set newname for datafile 6 to
32> '/u02/vssppln/AIMFACT101.dbf';
33> 
34>  set newname for datafile 7 to
35> '/u02/vssppln/AIMFACT102.dbf';
36> 
37>  set newname for datafile 8 to
38> '/u02/vssppln/aimfact1_index01.dbf';
39> 
40>  set newname for datafile 9 to
41> '/u02/vssppln/aimfact1_index02.dbf';
42> 
43>  set newname for datafile 10 to
44> '/u02/vssppln/aimfact1_index03.dbf';
45> 
46>  set newname for datafile 11 to
47> '/u02/vssppln/aimfact1_index04.dbf';
48> 
49>  set newname for datafile 12 to
50> '/u02/vssppln/aimfact201.dbf';
51> 
52>  set newname for datafile 13 to
53> '/u02/vssppln/aimfact202.dbf';
54> 
55>  set newname for datafile 14 to
56> '/u02/vssppln/aimfact2_index01.dbf';
57> 
58>  set newname for datafile 15 to
59> '/u02/vssppln/aimfact2_index02.dbf';
60> 
61>  set newname for datafile 16 to
62> '/u02/vssppln/aimfact2_index03.dbf';
63> 
64>  set newname for datafile 17 to
65> '/u02/vssppln/aimfact2_index04.dbf';
66> 
67>  set newname for datafile 18 to
68> '/u02/vssppln/aimstruct01.dbf';
69> 
70>  set newname for datafile 19 to
71> '/u02/vssppln/aimstruct_index01.dbf';
72> 
73>  set newname for datafile 20 to
74> '/u02/vssppln/aimstruct101.dbf';
75> 
76>  set newname for datafile 21 to
77> '/u02/vssppln/aimstruct1_index01.dbf';
78> 
79>  set newname for datafile 22 to
80> '/u02/vssppln/aimwork01.dbf';
81> 
82>  set newname for datafile 23 to
83> '/u02/vssppln/mipsdata01.dbf';
84> 
85>  set newname for datafile 24 to
86> '/u02/vssppln/mipsindex01.dbf';
87> 
88>  set newname for datafile 25 to
89> '/u02/vssppln/mipsdata101.dbf';
90> 
91>  set newname for datafile 26 to
92> '/u02/vssppln/mipsdata1_index01.dbf';
93> 
94>  set newname for datafile 27 to
95> '/u02/vssppln/mipsdata201.dbf';
96> 
97>  set newname for datafile 28 to

98> '/u02/vssppln/nipsdata2_index01.dbf'; 99>
100>  set newname for datafile 29 to
101> '/u02/vssppln/tools01.dbf';
102> 
103>  set newname for datafile 30 to
104> '/u02/vssppln/users01.dbf';
105> 
106>  set newname for datafile 31 to
107> '/u02/vssppln/AIMINDEX01.dbf';
108> 
109>  set newname for datafile 32 to
110> '/u02/vssppln/aimfact1_index05.dbf';
111> 
112>  set newname for datafile 33 to
113> '/u02/vssppln/aimfact2_index05.dbf';
114> 
115> 
116> restore database;
117> 
118> restore controlfile to '/u02/vssppln/restored_cf.ctl';
119> 
120> mount database;
121> 
122> switch datafile all;
123> 
124> release channel disk_channel1;
125> }
126> 
127> 

RMAN-06008: connected to recovery catalog database  

RMAN-06006: connected to target database: vssppln (not mounted)  

RMAN-03022: compiling command: allocate
RMAN-03023: executing command: allocate
RMAN-08030: allocated channel: disk_channel1
RMAN-08500: channel disk_channel1: sid=10 devtype=DISK

 

RMAN-03022: compiling command: sql
RMAN-06162: sql statement: alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
RMAN-03023: executing command: sql  

RMAN-03022: compiling command: set  

RMAN-03022: compiling command: set  

RMAN-03022: compiling command: set  

RMAN-03022: compiling command: set  

RMAN-03022: compiling command: set  

(and it slowly keeps spitting out these "RMAN-03022: compiling command: set
" )

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: DENNIS WILLIAMS
  INET: DWILLIAMS_at_LIFETOUCH.COM

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Spears, Brian INET: BSpears_at_Limitedbrands.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: DENNIS WILLIAMS INET: DWILLIAMS_at_LIFETOUCH.COM Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Spears, Brian INET: BSpears_at_Limitedbrands.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Josh Collier INET: Josh.Collier_at_Banfield.net Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).
Received on Mon Dec 08 2003 - 13:24:26 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US