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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cloning a db

Status
Not open for further replies.

230173

MIS
Jun 22, 2001
208
SG
Hi,

I'm trying to clone a db.
Here is what I did so far:
1. create all necessary directories
2. copy the datafiles from the backup of the original DB to the new directories or copy the datafiles from a hot db. (Put the datafiles in backup mode before copying)
3. alter database backup controlfile to trace;
4. if necesarry, rename datafiles to new sid (example: test_data_01.dbf)
5. create init<SID>.ora for the new database
6. add the new SID to the /etc/oratab
7. edit the create_controlfile.sql
8. change the environment using . oraenv to the new one
9 sqlplus internal
10. run create_controlfile.sql

11.recover database using backup controlfile;

So then I aply the archivelogs from the old db. But he keeps on asking me these archivelogs. Even ones who don't exist right now.

So what did I do wrong?
 
Are you changing NORESETLOGS to RESETLOGS on the line that starts CREATE CONTROLFILE? You need to do this, and also add RESETLOGS after the ALTER DATABASE OPEN. Delete the RECOVER DATABASE line.

HTH.
 
Yes, done that.

I did a recovery until time and know I the media recovery is complete.
Thanks for your help.

 
recover database using backup controlfile until cancel;

go through the logs until you get to the last one that you have. apply this log then 'cancel'.
'alter database open restlogs;'

Alex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top