1748062 Members
5630 Online
108758 Solutions
New Discussion юеВ

Re: Cloning a database

 
SOLVED
Go to solution
Brendan McDonald
Frequent Advisor

Re: Cloning a database

Thanks for the RMAN recovery details but if you look back, i've got PROD RMAN backups and I need to import these into the DEV RMAN backup catalog. I need to do this before I can recover my database.

Any help to import different backup details into the recovery catlog would be much appreciated.

thanks
William Lai
New Member

Re: Cloning a database

Hi,

Have you try the following:

on PROD env
a) copy the backupset to DEV env
b) alter database backup controlfile to '/tmp/PRODcntl.bin'
c) copy PRODcntl.bin to DEV env

on DEV env
a) use PRODcntl.bin as the DEV instance control file
b) startup DEV insntace mounted
f) rman connect to DEV instance
g) list bakcupset (if you can see the backupset created in PROD, then proceed with an incomplete recovery)

NOTE: you will not be able to perform COMPLETE recovery WITHOUT shutting down PROD instance. As the most current redo entries are still in the CURRENT ONLINE REDO.

Regards,
William
Yogeeraj_1
Honored Contributor

Re: Cloning a database

hi,

Quite odd that you are keeping the RMAN catalog in the same database that is being backed up!!

If you go through the documentation, you will see that they recommend you that the catalog should be another database.

Anyway, to do what you want to do, just do an export/import

e.g.
exp rman/rman@catalogdb file=rman_db log=rman_dbexp.log

then
imp system/manager@othercatalogdb file=rman_db log=rman_dbimp.log fromuser=rman touser=rman


hope this helps!

kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
TwoProc
Honored Contributor

Re: Cloning a database

In your recovery step, did you...

"recover database using backup controlfile until cancel;" ???

If not, when the thing keeps asking for another file, you can try "recover cancel";

And, it should let you open the database.

If it doesn't, you'll probably have to do the whole backup and recover anyways. I don't know what causes it, but I've seen what you're talking about(can't seem to recover enough), and it happens rarely. I've seen it happen to where back at the production box I've tried spitting out new redos to give to the cloned database. Still didn't work.

We are the people our parents warned us about --Jimmy Buffett
Brendan McDonald
Frequent Advisor

Re: Cloning a database

Ok, i'll be testing some of these solutions over the coming few days. I'll wait until I have it done before assigning points.

Thanks.
Brendan McDonald
Frequent Advisor

Re: Cloning a database

Hi Yogeeraj, I tried you're idea yesterday but what when trying to recover the controlfile -

#!/usr/bin/ksh
rman target system/manager rcvcat rman/rman@catalogdb <run{
allocate channel c1 type disk;
restore controlfile;
}
exit;
EOF

It looks for the controlfile in the flash_recovery area. I've tried setting the disk location to my backup area but won't allow me unless the database is mounted.

I'm running my catalog in the control files. Could this be the reason why it's only looking int he flash recovery area. If I had a recovery catalog in a smaller instance would this method work ???

I'm going to try using the clone database option within EM to the same server and see if this works.

Thanks.
Brendan McDonald
Frequent Advisor

Re: Cloning a database

Ok, what i'm doing as I don't havae a catalog db to be able to use Yogi's solution is to clone the database (from the EM console).

I clone the db to the same server, shutdown the database once it's done and then include it as part of my tape backup. On my DEV server, i simply copy the files into place and recreate my control files and it's all ok.

The best bet about this solution is that i can schedule the clone to run in the early hours of the morning (as it does slow th server down for a period) when I need it to run (I definately won't be running this every day).

Thanks