Welcome Guest ( Log In | Register )


 
 
 
 
 
 

 
 
Oracle 

Performance Tuning Reference poster
 
Oracle training in Linux 

commands
 
Oracle training Weblogic Book
 
Easy Oracle Jumpstart
 
Oracle training & performance tuning books
 
Burleson Consulting Remote DB Administration
 
 
 
Reply to this topicStart new topic
> Cloning database from hotbackup, Cannot find datafiles
VA.
post Mar 7 2010, 12:30 PM
Post #1


Newbie
*

Group: Members
Posts: 7
Joined: 11-August 09
Member No.: 41,523



Hi, I'm on Oracle 10g with Solaris 10

I had successfully cloned a prod database to a new server but the underlying SAN had to be reconfigured, so I am trying to clone it down again.

To backup, I am using:

backup database tag='SBX_PROD_DBNAME' format '/archive/stage/PROD_DBNAME/%U';
backup archivelog all format '/archive/stage/PROD_DBNAME/%U';
sql "alter system archive log current";
backup current controlfile format '/archive/stage/PROD_DBNAME/%U';

Then to clone:
set until time ...
duplicate taget database to "SBX"
logfile etc....


Nothing too complex, and we have successfully run it before. I look at the backup log and it ran successfully with all of the same information as the one that worked previously.

However, when I run the clone script I recieve:
ORA-19870 error reading backup piece /archive/flash_recovery_area <-- This should be /archive/stage
ORA-19505 failed to identify (same as above, wrong location)

The strange thing is, the only thing I have changed in the scripts is the set until time. Everything else is the same as what ran successfully before as far as I can tell.

If anyone could tell me what I should be looking at, I would really appreciate it. I apologize if it's something obvious but I am stumped/at a loss. A direction would really help me out because right now I have none.

Thanks!
Va.
Go to the top of the page
 
+Quote Post
VNK
post Mar 8 2010, 06:39 AM
Post #2


Advanced Member
***

Group: Members
Posts: 67
Joined: 26-July 07
Member No.: 10,576



QUOTE (VA. @ Mar 7 2010, 06:31 PM) *
Hi, I'm on Oracle 10g with Solaris 10

I had successfully cloned a prod database to a new server but the underlying SAN had to be reconfigured, so I am trying to clone it down again.

To backup, I am using:

backup database tag='SBX_PROD_DBNAME' format '/archive/stage/PROD_DBNAME/%U';
backup archivelog all format '/archive/stage/PROD_DBNAME/%U';
sql "alter system archive log current";
backup current controlfile format '/archive/stage/PROD_DBNAME/%U';

Then to clone:
set until time ...
duplicate taget database to "SBX"
logfile etc....


Nothing too complex, and we have successfully run it before. I look at the backup log and it ran successfully with all of the same information as the one that worked previously.

However, when I run the clone script I recieve:
ORA-19870 error reading backup piece /archive/flash_recovery_area <-- This should be /archive/stage
ORA-19505 failed to identify (same as above, wrong location)

The strange thing is, the only thing I have changed in the scripts is the set until time. Everything else is the same as what ran successfully before as far as I can tell.

If anyone could tell me what I should be looking at, I would really appreciate it. I apologize if it's something obvious but I am stumped/at a loss. A direction would really help me out because right now I have none.

Thanks!
Va.


Could be please post the restoration script which you have used for restoration ?

Please try cataloging the backup peice manually and try from there ?
The error message shows it is not able to recognize the backup peice.

Rgrds,
VNK
Go to the top of the page
 
+Quote Post
burleson
post Mar 8 2010, 07:55 AM
Post #3


Advanced Member
***

Group: Members
Posts: 11,472
Joined: 26-January 04
Member No.: 13



Hi Va,

>> ORA-19505 failed to identify

Did you run an RMAN crosscheck?

See here: http://www.dba-oracle.com/bk_ora_19505_tips.htm

***************************************
>> Then to clone:

If you want to clone a database with RMAN, see here:

http://www.dba-oracle.com/t_rman_clone+copy_database.htm


--------------------
Hope this helps. . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post
VA.
post Mar 8 2010, 08:50 AM
Post #4


Newbie
*

Group: Members
Posts: 7
Joined: 11-August 09
Member No.: 41,523



Thanks!

I'll try the crosscheck. I'm not connecting to the catalog so I wouldn't need to update there but maybe crosscheck so the control file is aware.

VNK, I typed up a shortened version of my duplicate script but here is more:

connect target username@sid
connect auxiliary /

CONFIGURE CHANNEL DEVICE TYPE disk CLEAR;
CONFIGURE DEFAULT DEVICE TYPE TO disk;
CONFIGURE DEVICE TYPE disk PARALLELISM 3;

@set decryption identified by "password";

run {
set until time "to_date('05-mar-2010 09:30:00' , 'dd-mon-yyyy hh24:mi:ss');
duplicate target database to "SBX'\:
logfile
group 1 ...
group 2 ...
group 3 ...
}

All of this worked so, I am thinking what Mr. Burleson said about the crosscheck makes sense.

Thanks a bunch, appreciate the replies!
Va. ohmy.gif)
Go to the top of the page
 
+Quote Post
VA.
post Mar 8 2010, 11:05 AM
Post #5


Newbie
*

Group: Members
Posts: 7
Joined: 11-August 09
Member No.: 41,523



Ok, I did a crosscheck backup and it showed the backup I was targeting as available. Then I tried doing a crosscheck backup of each individual piece, controlfile, datafiles, spfile and all showed available in the /archive/stage/dbname

However, it still keeps looking for my backup in the flash recovery area.

Also, another person is doing the exact same backup and recovery with copies of the scripts that only have slight modifications for the different prod db and clone name and is using a subdirectory of the /archive/stage so it's definitely not permissions.

It would be nice if I could specify the backup tag but I don't see a way to do this with a duplicate?

I was at a loss before but now even more, any ideas of what I might look at next?

Thanks for the time and knowledge!
Va.
Go to the top of the page
 
+Quote Post
burleson
post Mar 8 2010, 06:56 PM
Post #6


Advanced Member
***

Group: Members
Posts: 11,472
Joined: 26-January 04
Member No.: 13



Hi Va,

>> I was at a loss before but now even more, any ideas of what I might look at next?

A production recovery is no time to be learning RMAN!

Recoveries are tricky, and it's easy to corrupt data if you do not have experience . . .

You need to open an emergency (sev1) SR on MIS:

http://metalink.oracle.com

If you want to clone a database with RMAN, see here:

http://www.dba-oracle.com/t_rman_clone+copy_database.htm


--------------------
Hope this helps. . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post
VA.
post Mar 8 2010, 10:45 PM
Post #7


Newbie
*

Group: Members
Posts: 7
Joined: 11-August 09
Member No.: 41,523



Good thing I am not learning RMAN while trying to recover a production database. I am cloning production down to a sandbox using the duplicate function. I appreciate the suggestions to this point, sorry to bother.

Thanks,
Va.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 16th September 2014 - 06:26 PM