clone a RMAN backup [message #396446] |
Mon, 06 April 2009 14:30 |
ankush_chawla
Messages: 136 Registered: November 2006
|
Senior Member |
|
|
I have a rman full database production backup.
I dont have any access to the the production machine.
i want to create a clone (or duplicate) of the production database .
Please help how to do it
|
|
|
|
Re: clone a RMAN backup [message #396692 is a reply to message #396447] |
Tue, 07 April 2009 14:06 |
ankush_chawla
Messages: 136 Registered: November 2006
|
Senior Member |
|
|
i avhe search through many documents.
However i dont have any access to the production system .
i just have the rman backup of the production system and the archive logs.Can i do it ?
If catalog the backup into the new database it doesnot recognize and gives us the error of invalid dbid
is there any way to change the dbid to that of the production database please help?
|
|
|
|
|
|
|
Re: clone a RMAN backup [message #396715 is a reply to message #396702] |
Tue, 07 April 2009 16:40 |
ankush_chawla
Messages: 136 Registered: November 2006
|
Senior Member |
|
|
i am not able to change the datafile paths with the setnewname
its was very suprising
the command succeed. But when i acess the database and query v$datafile
it showed me some other path which i never specified.
i was not able to restore for the same reason.
i tried again but with same results . is there any bug
i m on 10.1.0.3
|
|
|
|
|
|
Re: clone a RMAN backup [message #396888 is a reply to message #396723] |
Wed, 08 April 2009 05:31 |
ankush_chawla
Messages: 136 Registered: November 2006
|
Senior Member |
|
|
thanks a lot for your help.
i used the below command
rman target sys/oracle@qdms
rman>
RUN
{
ALLOCATE CHANNEL c1 DEVICE TYPE disk
SET NEWNAME FOR DATAFILE 1 TO '?/oradata/test/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO '?/oradata/test/undotbs01.dbf';
SQL "ALTER DATABASE RENAME FILE ''/dev3/oracle/dbs/redo01.log''
TO ''?/oradata/test/redo01.log'' ";
SQL "ALTER DATABASE RENAME FILE ''/dev3/oracle/dbs/redo02.log''
TO ''?/oradata/test/redo02.log'' ";
# Do a SET UNTIL to prevent recovery of the online logs
SET UNTIL SCN 123456;
# restore the database and switch the datafile names
RESTORE DATABASE;
SWITCH DATAFILE ALL;
# recover the database
RECOVER DATABASE;
}
EXIT
now it executed the new name successfully but at the time of resore it gaves error : cannot restore at the location '<production path>'
it still shows the production path for the datafiles .i even checked in the v$datafile. path are not correct.
log file path is changed
[Updated on: Wed, 08 April 2009 06:20] by Moderator Report message to a moderator
|
|
|
|
Re: clone a RMAN backup [message #396907 is a reply to message #396888] |
Wed, 08 April 2009 06:24 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
>> SET UNTIL SCN 123456;
Are you kidding?
That was an example in document.
You used the same? Or just posting some other code here?
And your code shows set newname for only 2 datafiles.
What happens to the rest?
First please read some literature that is precisely given in documentation before continuing to do any harm to your environment.
[Updated on: Wed, 08 April 2009 06:35] Report message to a moderator
|
|
|
Re: clone a RMAN backup [message #396913 is a reply to message #396907] |
Wed, 08 April 2009 06:47 |
ankush_chawla
Messages: 136 Registered: November 2006
|
Senior Member |
|
|
hello sir,
i want to say i used the the same code as specifiedf in the document. i had 48 datafiles very difficult to specify here .
when the restore command executes it gives me error :
RMAN-03002: failure of restore command at 04/08/2009 12:40:19
ORA-01180: can not create datafile 1
ORA-01110: data file 1: 'F:\DATABASE\QDMS\SYS1QDMS.OR
|
|
|
Re: clone a RMAN backup [message #396915 is a reply to message #396913] |
Wed, 08 April 2009 06:55 |
ankush_chawla
Messages: 136 Registered: November 2006
|
Senior Member |
|
|
i used below steps
1. startup nomount pfile=
2. rman target sys/oracle
3. restore control from 'path'
4. alter database mount
5. rman catalog backup piece 'a 'a
6. list backup - it shows the correct path
7.
run
{
allocate channedl
set newname 1 to ''
sql "alter database rename file " "
set until scn ''
restore database;
switch datafile all;
recover database;
}
- it gives error at the restore command.
its very urgent on my neck please help
|
|
|
|
|
Re: clone a RMAN backup [message #396920 is a reply to message #396918] |
Wed, 08 April 2009 07:03 |
ankush_chawla
Messages: 136 Registered: November 2006
|
Senior Member |
|
|
code i used
RUN
{
ALLOCATE CHANNEL C1 DEVICE TYPE DISK;
set newname for datafile 2 to 'C:\database\oradata\qdms\DMB4QDMS.ORA';
set newname for datafile 3 to 'C:\database\oradata\qdms\USR1QDMS.ORA';
set newname for datafile 4 to 'C:\database\oradata\qdms\TOL1QDMS.ORA';
set newname for datafile 5 to 'C:\database\oradata\qdms\TMP1QDMS.ORA';
set newname for datafile 6 to 'C:\database\oradata\qdms\TMP2QDMS.ORA';
set newname for datafile 7 to 'C:\database\oradata\qdms\TMP3QDMS.ORA';
set newname for datafile 8 to 'C:\database\oradata\qdms\TMP4QDMS.ORA';
set newname for datafile 9 to 'C:\database\oradata\qdms\TMP5QDMS.ORA';
set newname for datafile 10 to 'C:\database\oradata\qdms\DMI1QDMS.ORA';
set newname for datafile 11 to 'C:\database\oradata\qdms\DMI2QDMS.ORA';
set newname for datafile 12 to 'C:\database\oradata\qdms\DMI3QDMS.ORA';
set newname for datafile 13 to 'C:\database\oradata\qdms\DMI4QDMS.ORA';
set newname for datafile 14 to 'C:\database\oradata\qdms\DMI5QDMS.ORA';
set newname for datafile 15 to 'C:\database\oradata\qdms\DMI6QDMS.ORA';
set newname for datafile 16 to 'C:\database\oradata\qdms\DMI7QDMS.ORA';
set newname for datafile 17 to 'C:\database\oradata\qdms\DJI1QDMS.ORA';
set newname for datafile 18 to 'C:\database\oradata\qdms\DJI2QDMS.ORA';
set newname for datafile 19 to 'C:\database\oradata\qdms\DCI1QDMS.ORA';
set newname for datafile 20 to 'C:\database\oradata\qdms\DCI2QDMS.ORA';
set newname for datafile 21 to 'C:\database\oradata\qdms\DMD1QDMS.ORA';
set newname for datafile 22 to 'C:\database\oradata\qdms\DMD2QDMS.ORA';
set newname for datafile 23 to 'C:\database\oradata\qdms\DMD3QDMS.ORA';
set newname for datafile 24 to 'C:\database\oradata\qdms\DMD4QDMS.ORA';
set newname for datafile 25 to 'C:\database\oradata\qdms\DMD5QDMS.ORA';
set newname for datafile 26 to 'C:\database\oradata\qdms\DJD1QDMS.ORA';
set newname for datafile 27 to 'C:\database\oradata\qdms\DJD2QDMS.ORA';
set newname for datafile 28 to 'C:\database\oradata\qdms\DCD1QDMS.ORA';
set newname for datafile 29 to 'C:\database\oradata\qdms\DCD2QDMS.ORA';
set newname for datafile 30 to 'C:\database\oradata\qdms\DMB1QDMS.ORA';
set newname for datafile 31 to 'C:\database\oradata\qdms\DMB2QDMS.ORA';
set newname for datafile 32 to 'C:\database\oradata\qdms\DMB3QDMS.ORA';
set newname for datafile 33 to 'C:\database\oradata\qdms\CTX1QDMS.ORA';
set newname for datafile 34 to 'C:\database\oradata\qdms\DMI8QDMS.ORA';
set newname for datafile 35 to 'C:\database\oradata\qdms\DJI3QDMS.ORA';
set newname for datafile 36 to 'C:\database\oradata\qdms\DMI9QDMS.ORA';
set newname for datafile 37 to 'C:\database\oradata\qdms\SYS2QDMS.ORA';
set newname for datafile 38 to 'C:\database\oradata\qdms\UND1QDMS.ORA';
set newname for datafile 39 to 'C:\database\oradata\qdms\DMB5QDMS.ORA';
set newname for datafile 40 to 'C:\database\oradata\qdms\DMB6QDMS.ORA';
set newname for datafile 41 to 'C:\database\oradata\qdms\PERFSTAT_UD01.DBF';
set newname for datafile 42 to 'C:\database\oradata\qdms\DJD3QDMS.ORA';
set newname for datafile 43 to 'C:\database\oradata\qdms\DMB7QDMS.ORA';
set newname for datafile 44 to 'C:\database\oradata\qdms\DJI4QDMS.ORA';
set newname for datafile 45 to 'C:\database\oradata\qdms\TMP6QDMS.ORA';
set newname for datafile 46 to 'C:\database\oradata\qdms\SYS3QDMS.ORA';
set newname for datafile 47 to 'C:\database\oradata\qdms\DMB8QDMS.ORA';
set newname for datafile 48 to 'C:\database\oradata\qdms\SYS4QDMS.ORA';
set newname for datafile 49 to 'C:\database\oradata\qdms\SYSAUX1QDMS.ORA';
set newname for datafile 50 to 'C:\database\oradata\qdms\DJI5QDMS.ORA';
set newname for datafile 51 to 'C:\database\oradata\qdms\DMB9QDMS.ORA';
set newname for datafile 52 to 'C:\database\oradata\qdms\DJI6QDMS.ORA';
set newname for datafile 53 to 'C:\database\oradata\qdms\DCD3QDMS.ORA';
set newname for datafile 54 to 'C:\database\oradata\qdms\TMP7QDMS.ORA';
set until scn 1386031839;
restore database;
switch datafile all;
recover database;
}
if possible can i contact u?
|
|
|
|
|
Re: clone a RMAN backup [message #396940 is a reply to message #396932] |
Wed, 08 April 2009 07:39 |
ankush_chawla
Messages: 136 Registered: November 2006
|
Senior Member |
|
|
List of Backup Sets
===================
BS Key Type LV Size Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4440 Full 146G DISK 01:28:49 03-APR-09
BP Key: 4668 Status: AVAILABLE Compressed: NO Tag: TAG20090403T16445
4
Piece Name: E:\RMAN_BACKUPS\RESTORE
Controlfile Included: Ckp SCN: 1386031839 Ckp time: 03-APR-09
List of Datafiles in backup set 4440
File LV Type Ckp SCN Ckp Time Name
---- -- ---- ---------- --------- ----
1 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\SYS1QDMS.ORA
2 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMB4QDMS.ORA
3 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\USR1QDMS.ORA
4 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\TOL1QDMS.ORA
5 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\TMP1QDMS.ORA
6 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\TMP2QDMS.ORA
7 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\TMP3QDMS.ORA
8 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\TMP4QDMS.ORA
9 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\TMP5QDMS.ORA
10 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMI1QDMS.ORA
11 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMI2QDMS.ORA
12 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMI3QDMS.ORA
13 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMI4QDMS.ORA
14 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMI5QDMS.ORA
15 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMI6QDMS.ORA
16 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMI7QDMS.ORA
17 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DJI1QDMS.ORA
18 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DJI2QDMS.ORA
19 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DCI1QDMS.ORA
20 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DCI2QDMS.ORA
21 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMD1QDMS.ORA
22 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMD2QDMS.ORA
23 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMD3QDMS.ORA
24 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMD4QDMS.ORA
25 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMD5QDMS.ORA
26 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DJD1QDMS.ORA
27 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DJD2QDMS.ORA
28 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DCD1QDMS.ORA
29 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DCD2QDMS.ORA
30 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMB1QDMS.ORA
31 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMB2QDMS.ORA
32 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMB3QDMS.ORA
33 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\CTX1QDMS.ORA
34 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMI8QDMS.ORA
35 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DJI3QDMS.ORA
36 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMI9QDMS.ORA
37 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\SYS2QDMS.ORA
38 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\UND1QDMS.ORA
39 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMB5QDMS.ORA
40 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMB6QDMS.ORA
41 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\PERFSTAT_UD01.DBF
42 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DJD3QDMS.ORA
43 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMB7QDMS.ORA
44 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DJI4QDMS.ORA
45 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\TMP6QDMS.ORA
46 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\SYS3QDMS.ORA
47 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMB8QDMS.ORA
48 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\SYS4QDMS.ORA
49 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\SYSAUX1QDMS.ORA
50 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DJI5QDMS.ORA
51 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DMB9QDMS.ORA
52 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DJI6QDMS.ORA
53 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\DCD3QDMS.ORA
54 Full 1386031860 03-APR-09 F:\DATABASE\QDMS\TMP7QDMS.ORA
[Updated on: Wed, 08 April 2009 08:02] by Moderator Report message to a moderator
|
|
|
|
Re: clone a RMAN backup [message #396942 is a reply to message #396940] |
Wed, 08 April 2009 07:47 |
ankush_chawla
Messages: 136 Registered: November 2006
|
Senior Member |
|
|
RMAN> crosscheck backup;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=1097 devtype=DISK
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=E:\RMAN_BACKUPS\RESTORE recid=4668 stamp=683590847
Crosschecked 1 objects
|
|
|
|
Re: clone a RMAN backup [message #396948 is a reply to message #396943] |
Wed, 08 April 2009 08:07 |
ankush_chawla
Messages: 136 Registered: November 2006
|
Senior Member |
|
|
RMAN> list incarnation;
List of Database Incarnations
DB Key Inc Key DB Name DB ID STATUS Reset SCN Reset Time
------- ------- -------- ---------------- --- ---------- ----------
1 1 QDMS 1393969434 CURRENT 1 26-NOV-04
|
|
|
|
Re: clone a RMAN backup [message #396967 is a reply to message #396949] |
Wed, 08 April 2009 09:10 |
|
Mahesh Rajendran
Messages: 10708 Registered: March 2002 Location: oracleDocoVille
|
Senior Member Account Moderator |
|
|
>>3. restore control from 'path'
Not sure what exactly happened here.
Seems you need to recreate the control file.
Start from scratch.
Post your session and output.
|
|
|