Home » RDBMS Server » Backup & Recovery » Having problem in changing the location of data files and temp files from autobackup of controlfile (Oracle 10g (10.2.0.1))
Having problem in changing the location of data files and temp files from autobackup of controlfile [message #540967] Thu, 26 January 2012 15:54 Go to next message
kumudini09
Messages: 10
Registered: January 2012
Location: Canada
Junior Member
Hi,

I am new to Oracle Administration. I have an oracle autoback of controlfile and spfile. I am trying to restore the production database using this backup, into a new server with a different directory structure.

I have completed the following steps in the restore process.

1. Creating a pfile from spfile
2. Changing the the location of cdump, udump, bdump and the control files ( there are three )
3. Then creating a spfile from this pfile

I am stuck on the next step where to rename all the datafiles and tempfile and restore the database. Following is what I did.

After mounting the database in RMAN, tried to run the following.

RMAN> run
2> {
3> allocate channel c1 device type disk
4> ;
5> @/home/oracle/rman_scripts/newloc.rman
6> SET NEWNAME FOR DATAFILE 1 TO '/u02/oradata/dorian/system01.dbf';
7> SET NEWNAME FOR DATAFILE 2 TO '/u02/oradata/dorian/undotbs01.dbf';
8> SET NEWNAME FOR DATAFILE 3 TO '/u02/oradata/dorian/sysaux01.dbf';
9> SET NEWNAME FOR DATAFILE 4 TO '/u02/oradata/dorian/users01.dbf';
10> SET NEWNAME FOR DATAFILE 5 TO '/u02/oradata/dorian/users02.dbf';
11> SET NEWNAME FOR DATAFILE 6 TO '/u02/oradata/dorian/users03.dbf';
12> SET NEWNAME FOR DATAFILE 7 TO '/u02/oradata/dorian/tools01.dbf';
13> SET NEWNAME FOR DATAFILE 8 TO '/u02/oradata/dorian/xdb01.dbf';
14> SET NEWNAME FOR DATAFILE 9 TO '/u02/oradata/dorian/cwmlite01.dbf';
15> SET NEWNAME FOR DATAFILE 10 TO '/u02/oradata/dorian/drsys01.dbf';
16> SET NEWNAME FOR DATAFILE 11 TO '/u02/oradata/dorian/example01.dbf';
17> SET NEWNAME FOR DATAFILE 12 TO '/u02/oradata/dorian/indx01.dbf';
18> SET NEWNAME FOR DATAFILE 13 TO '/u02/oradata/dorian/odm01.dbf';
19> SET NEWNAME FOR DATAFILE 14 TO '/u02/oradata/dorian/users04.dbf';
20> SET NEWNAME FOR DATAFILE 15 TO '/u02/oradata/dorian/users05.dbf';
21> SET NEWNAME FOR DATAFILE 16 TO '/u02/oradata/dorian/users06.dbf';
22> SET NEWNAME FOR DATAFILE 17 TO '/u02/oradata/dorian/users07.dbf';
23> SET NEWNAME FOR DATAFILE 18 TO '/u02/oradata/dorian/users08.dbf';
24> SET NEWNAME FOR DATAFILE 19 TO '/u02/oradata/dorian/users09.dbf';
25> SET NEWNAME FOR DATAFILE 20 TO '/u02/oradata/dorian/users10.dbf';
26> SET NEWNAME FOR DATAFILE 21 TO '/u02/oradata/dorian/users11.dbf';
27> SET NEWNAME FOR DATAFILE 22 TO '/u02/oradata/dorian/users12.dbf';
28> SET NEWNAME FOR DATAFILE 23 TO '/u02/oradata/dorian/users13.dbf';
29> SET NEWNAME FOR DATAFILE 24 TO '/u02/oradata/dorian/users14.dbf';
30> SET NEWNAME FOR DATAFILE 25 TO '/u02/oradata/dorian/users15.dbf';
31> SET NEWNAME FOR DATAFILE 26 TO '/u02/oradata/dorian/users16.dbf';
32> SET NEWNAME FOR DATAFILE 27 TO '/u02/oradata/dorian/users17.dbf';
33> SET NEWNAME FOR DATAFILE 28 TO '/u02/oradata/dorian/users18.dbf';
34> SET NEWNAME FOR DATAFILE 29 TO '/u02/oradata/dorian/users19.dbf';
35> SET NEWNAME FOR DATAFILE 30 TO '/u02/oradata/dorian/users20.dbf';
36> SET NEWNAME FOR TEMPFILE 1 TO '/u02/oradata/dorian/temp01.dbf';
37> **end-of-file**
38> restore database;
39> switch datafile all;
40> switch tempfile all;
41> release channel c1;
42> }

I am getting the following error message.

Starting restore at 25-JAN-2012 21:26:48

released channel: c1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/25/2012 21:26:49
RMAN-06026: some targets not found - aborting restore
RMAN-06100: no channel to restore a backup or copy of datafile 30
RMAN-06100: no channel to restore a backup or copy of datafile 29
RMAN-06100: no channel to restore a backup or copy of datafile 28
RMAN-06100: no channel to restore a backup or copy of datafile 27
RMAN-06100: no channel to restore a backup or copy of datafile 26
RMAN-06100: no channel to restore a backup or copy of datafile 25
RMAN-06100: no channel to restore a backup or copy of datafile 24
RMAN-06100: no channel to restore a backup or copy of datafile 23
RMAN-06100: no channel to restore a backup or copy of datafile 22
RMAN-06100: no channel to restore a backup or copy of datafile 21
RMAN-06100: no channel to restore a backup or copy of datafile 20
RMAN-06100: no channel to restore a backup or copy of datafile 19
RMAN-06100: no channel to restore a backup or copy of datafile 18
RMAN-06100: no channel to restore a backup or copy of datafile 17
RMAN-06100: no channel to restore a backup or copy of datafile 16
RMAN-06100: no channel to restore a backup or copy of datafile 15
RMAN-06100: no channel to restore a backup or copy of datafile 14
RMAN-06100: no channel to restore a backup or copy of datafile 13
RMAN-06100: no channel to restore a backup or copy of datafile 12
RMAN-06100: no channel to restore a backup or copy of datafile 11
RMAN-06100: no channel to restore a backup or copy of datafile 10
RMAN-06100: no channel to restore a backup or copy of datafile 9
RMAN-06100: no channel to restore a backup or copy of datafile 8
RMAN-06100: no channel to restore a backup or copy of datafile 7
RMAN-06100: no channel to restore a backup or copy of datafile 6
RMAN-06100: no channel to restore a backup or copy of datafile 5
RMAN-06100: no channel to restore a backup or copy of datafile 4
RMAN-06100: no channel to restore a backup or copy of datafile 3
RMAN-06100: no channel to restore a backup or copy of datafile 2
RMAN-06100: no channel to restore a backup or copy of datafile 1
Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #540969 is a reply to message #540967] Thu, 26 January 2012 16:38 Go to previous messageGo to next message
kumudini09
Messages: 10
Registered: January 2012
Location: Canada
Junior Member
In the error message, I am always getting the same list of the datafiles, even if I remove an entry and try again. Does RMAN store this information of SET NEWNAME that need to be reset, before trying a updated list? Thanks.

Kumudini
Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #540975 is a reply to message #540969] Thu, 26 January 2012 17:01 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
SQL> show parameter convert

NAME				     TYPE	 VALUE
------------------------------------ ----------- ------------------------------
db_file_name_convert		     string
log_file_name_convert		     string


research the parameters shown above

It would be helpful if you followed Posting Guidelines - http://www.orafaq.com/forum/t/88153/0/
Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #540976 is a reply to message #540975] Thu, 26 January 2012 17:04 Go to previous messageGo to next message
kumudini09
Messages: 10
Registered: January 2012
Location: Canada
Junior Member
Thank you for the reply. I will check those parameters you mentioned. Thanks again.

Kumudini
Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #540978 is a reply to message #540976] Thu, 26 January 2012 17:21 Go to previous messageGo to next message
kumudini09
Messages: 10
Registered: January 2012
Location: Canada
Junior Member
Hi,

I added two lines of entries in the initDEVDB.ora file for db_file_name_convert and log_file_name_convert.

Following are the lines I added to the initDEVDB.ora file.

db_file_name_convert=('/data/u01/oradata/dorian' '/u02/oradata/dorian')
log_file_name_convert=('/data/u01/oradata/dorian' '/u02/oradata/dorian')

I will create a SPFILE with these changes and recreate the control files again.

Because I added these two lines, I don't have to use the SET NEWNAME to change the location of the datafiles and tempfiles? Thanks.

Kumudini
Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #540980 is a reply to message #540978] Thu, 26 January 2012 17:34 Go to previous messageGo to next message
kumudini09
Messages: 10
Registered: January 2012
Location: Canada
Junior Member
I am still getting the same errors, after making this change and recreating the spfile and controlfiles before restoring the database.


RMAN> alter database mount;

database mounted
released channel: ORA_DISK_1

RMAN> run
2> {
3> allocate channel d1 type disk;
4> restore database;
5> }

allocated channel: d1
channel d1: sid=156 devtype=DISK

Starting restore at 26-JAN-2012 01:37:06

released channel: d1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/26/2012 01:37:06
RMAN-06026: some targets not found - aborting restore
RMAN-06100: no channel to restore a backup or copy of datafile 30
RMAN-06100: no channel to restore a backup or copy of datafile 29
Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #541025 is a reply to message #540980] Fri, 27 January 2012 02:28 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
It doesn't sound to me as though you are following the procedure to duplicate a database to a new server with a different directory structure, which is here:

http://docs.oracle.com/cd/B19306_01/backup.102/b14191/rcmdupdb.htm#i1008564
Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #541069 is a reply to message #541025] Fri, 27 January 2012 08:07 Go to previous messageGo to next message
himabija
Messages: 33
Registered: December 2011
Location: San Francisco
Member
Out of curiosity just wanted to know after mounting the database with newly restored control file have you checked through RMAN what backups are available for restore? (using "list backup of database")

[Updated on: Fri, 27 January 2012 08:10]

Report message to a moderator

Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #541106 is a reply to message #541069] Fri, 27 January 2012 11:21 Go to previous messageGo to next message
kumudini09
Messages: 10
Registered: January 2012
Location: Canada
Junior Member
I checked with list backup.

Here is the last group of listing for list backup of database.

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
5441 Incr 1 4.33G SBT_TAPE 03:30:53 10-JAN-2012 01:07:01
BP Key: 5441 Status: AVAILABLE Compressed: NO Tag: TAG20120109T213607
Handle: k0n0c2u8_1_1 Media:
List of Datafiles in backup set 5441
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- -------------------- ----
1 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/system01.dbf
2 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/undotbs01.dbf
3 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/sysaux01.dbf
4 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users01.dbf
5 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users02.dbf
6 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users03.dbf
7 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/tools01.dbf
8 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/xdb01.dbf
9 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/cwmlite01.dbf
10 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/drsys01.dbf
11 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/example01.dbf
12 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/indx01.dbf
13 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/odm01.dbf
14 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users04.dbf
15 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users05.dbf
16 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users06.dbf
17 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users07.dbf
18 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users08.dbf
19 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users09.dbf
20 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users10.dbf
21 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users11.dbf
22 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users12.dbf
23 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users13.dbf
24 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users14.dbf
25 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users15.dbf
26 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users16.dbf
27 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users17.dbf
28 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users18.dbf
29 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users19.dbf
30 1 Incr 6250988183 09-JAN-2012 21:36:09 /data/u01/oradata/dorian/users20.dbf
Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #541107 is a reply to message #541025] Fri, 27 January 2012 11:25 Go to previous messageGo to next message
kumudini09
Messages: 10
Registered: January 2012
Location: Canada
Junior Member
Hi John,

The backup I have is a autobackup of spfile and controlfile.

I installed same version of oracle 10.2.0.1 in a new server with different directory structure and trying to install this backup. I will go through the link you gave me.

Thanks.

Kumudini
Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #541109 is a reply to message #541107] Fri, 27 January 2012 11:51 Go to previous messageGo to next message
himabija
Messages: 33
Registered: December 2011
Location: San Francisco
Member
It does not seem like any level 0 backup is available with you .As
per my understanding you need to have level 0 database backup to restore command work properly.

[Updated on: Fri, 27 January 2012 11:51]

Report message to a moderator

Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #541111 is a reply to message #541109] Fri, 27 January 2012 12:01 Go to previous messageGo to next message
kumudini09
Messages: 10
Registered: January 2012
Location: Canada
Junior Member
Hi himabija,

I don't understand what is level 0 backup. I got this backup from our hosting service. It was an autobackup of controlfile.

I was able to restore the control files off of this backup. The size of this backup is close the size of the database we have in production.

Here is the beginning of the output from list backup of database.

[oracle@dorian ~]$ rman target / nocatalog

Recovery Manager: Release 10.2.0.1.0 - Production on Thu Jan 26 20:05:04 2012

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

connected to target database: DORIAN (DBID=3830615863, not open)
using target database control file instead of recovery catalog

RMAN> list backup of database;


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

BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ --------------------
5309 Incr 1 5.04G SBT_TAPE 03:33:04 27-DEC-2011 00:38:24
BP Key: 5309 Status: UNAVAILABLE Compressed: NO Tag: TAG20111226T210520
Handle: fsmv73sg_1_1 Media:
List of Datafiles in backup set 5309
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- -------------------- ----
1 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/system01.dbf
2 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/undotbs01.dbf
3 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/sysaux01.dbf
7 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/tools01.dbf
8 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/xdb01.dbf
9 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/cwmlite01.dbf
10 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/drsys01.dbf
11 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/example01.dbf
12 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/indx01.dbf
13 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/odm01.dbf
18 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/users08.dbf
19 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/users09.dbf


Kumudini
Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #541113 is a reply to message #541111] Fri, 27 January 2012 12:26 Go to previous messageGo to next message
himabija
Messages: 33
Registered: December 2011
Location: San Francisco
Member
You need to read about the concept of incremental backup for this.

Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #541116 is a reply to message #541113] Fri, 27 January 2012 12:41 Go to previous messageGo to next message
kumudini09
Messages: 10
Registered: January 2012
Location: Canada
Junior Member
Hi himabija,

Thank you for the link. I understand level 0 incremental backup is the base to apply all the incr backups afterwards. From the output fot "list backup of database", all the groups starting from 26 of Dec to Jan 09, says Incr. However how do I check the Incr backup of Dec. 26 is the level 0 incremental backup? Thanks.

Kumudini
Re: Having problem in changing the location of data files and temp files from autobackup of controlf [message #541133 is a reply to message #541116] Fri, 27 January 2012 16:15 Go to previous message
kumudini09
Messages: 10
Registered: January 2012
Location: Canada
Junior Member
Hi himabija,

I can see where the level (LV) information is.

I do not see either a FULL (type column in "list backup") or level o (in "list backup of database") for the datafiles. I will check with the hosting service. Thank you for your help in checking on this. That was very helpful. Given, first time working on this, I wouldn't have thought of checking this. Thanks again.

Kumudini


File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- -------------------- ----
1 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/system01.dbf
2 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/undotbs01.dbf
3 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/sysaux01.dbf
7 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/tools01.dbf
8 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/xdb01.dbf
9 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/cwmlite01.dbf
10 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/drsys01.dbf
11 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/example01.dbf
12 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/indx01.dbf
13 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/odm01.dbf
18 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/users08.dbf
19 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/users09.dbf
20 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/users10.dbf
29 1 Incr 6082446871 26-DEC-2011 21:05:21 /data/u01/oradata/dorian/users19.dbf
Previous Topic: How to recover unarchived data in case of media failure
Next Topic: AWR to be created on a local Machine.
Goto Forum:
  


Current Time: Fri Mar 29 05:34:30 CDT 2024