Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to clone DB using RMAN ?

Status
Not open for further replies.

suhaimi

Technical User
Aug 3, 2001
71
US
Hi all,
I wish to clone a database and keep it synch with primary.
I've tried to use EXP/IMP incremental. The problem is whenever there is a change in a table, it'll export the whole table instead of the changed bit. As a result, I've to import the whole table again so that it'll synch with my primary DB. Futhermore, it takes hours to re-synch since the dump file size is 2GB or more. I've heard that we could do this using RMAN. How do I update merely the changes to my clone DB ???

Rgds,
Suhaimi
 
What is the purpose of your clone database? Do you need to read from it or also update?

Regards, Dima
 
you can use the duplicate target database for standby command. This creates a new dbid for your db so you can register in recovery catalogue.


RUN
{
allocate auxiliary channel ch1 type disk;

set until SCN 83426411; #get this by issuing a list backup of database and choose the latest one (highest number from backup set/piece)
set newname for datafile '/user10/oracle/proddata/system01.dbf' to '/user10/oracle/testdata/system01.dbf';
set newname for datafile '/user03/oracle/proddata/az01.dbf' to '/user03/oracle/testdata/az01.dbf';
set newname for datafile '/user06/oracle/proddata/ax01.dbf' to '/user06/oracle/testdata/ax01.dbf';
set newname for datafile '/user03/oracle/proddata/ak01.dbf' to '/user03/oracle/testdata/ak01.dbf';
DUPLICATE TARGET DATABASE TO PROD
logfile
GROUP 1 (
'/user03/oracle/testdata/redo01a.log',
'/user05/oracle/testdata/redo01b.log'
) SIZE 8M,
GROUP 2 (
'/user03/oracle/testdata/redo02a.log',
'/user05/oracle/testdata/redo02b.log'
) SIZE 8M,
GROUP 3 (
'/user03/oracle/testdata/redo03a.log',
'/user05/oracle/testdata/redo03b.log'
) SIZE 8M;
}


HTH

Sy UK
 
Hi,
For your info, the clone database acts as a historical db.
We don't want people (mainly report users) to tap into our prod db. We have experienced the worst performance on our prod db server whenever we let them use it. That's the reason we need this historical db badly. We have limited resources ($$). So the cheapest way is to do EXP/IMP, but the drawback is it takes hours. Futhermore, we are using 8.0.4. I believe the "DUPLICATE" option is not available in this version.

Rgds,
Suhaimi
 
Do you find it to be cheaper to purchase more Oracle licenses instead of upgrading your hardware? Arguably at least...
Maybe you should optimize your reports by builting agregates in batch mode during idle time. Creating a number of snapshots may resolve an issue. But in any case you should at least catch the biggest resource consumers and try to optimize the most greedy queries.


Regards, Dima
 
Hi Dima,
Your suggestions are accepted BUT how do I use RMAN to simulate the EXP/IMP ??????

Rgds,
Suhaimi
 
Do you need to resolve an issue or to use RMAN? :)
AFAIK you may use RMAN to create stanby database, that is always in the state of recovery using logs from master database. Sometimes you may switch it to read-only mode, but the changes are not applied during that time, so you may see data fixed at the moment it has been opened for reading.

Regards, Dima
 
Sorry....we are using 8.0.4. Opening stdby db in read only mode is available ONLY in 9i if I'm not mistaken.

Rgds,
Suhaimi
 
In 8.0.4 snapshots is definitely a good alternative to copying the whole database. You may even create them on another database.

Regards, Dima
 
I've tried to use snapshots b4. It seemed not updating after snapshot refresh. Could you give me the details how I could run the snapshot correctly ?

Rdgs,
Suhaimi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top