-
Trying to CLONE an 8.0.5 oracle/nt database.... I've done it many times in UNIX....
Problem: Cannot OPEN database after CREATE CONTROLFILE
stage... Issue: ORacle Server MOUNTS INstance and CREATES CONTROLFILE successfully but when I issue ALTER DATABASE OPEN USING BACKUP CONTROLFILE the server ssays that one of the SYSTEM tablespaces' datafiles needs recovery... ??? Even more curious it wants to apply an archive log (the original database IS NOT in ARCHIVELOG mode).
I DID shutdown the original db before copying the files....
I DID th file-copy through Windows explorer... should I do it
@ command level with some file-attribute preserving flag?
Why would this matter if Oracle Server checks datafile/controlfile consistenct with internal SCN#s?
Perplexed in NT land....
-
Th eprocedure I would've followed would've been
Copy the initSID.ora parameter and rename it to reflect the clone name.
Altered the controlfile to point to the new area for datafiles etc
Alter the file to say CREATE CONTROLFILE SET DATABASE "clone name" RESETLOGS NOARCHIVELOG
Remove the RECOVER DATABASE command at the last line
create a service for the clone using oradim
Shutdown original
Copy the file sand ensure you are copying and not moving
Ensure listener.ora is editted correctly
Ensure tnsnames.ora entry correct
Ensure set oracle_sid = clone is done
svrmgr30 / svrmgr23 / svrmgrl (whichever)
connectinternal
run the recreate_controlfile script
I hope this helps.
Cheers
Slaine
-
Are you trying to have both instances running at the same time?
Have you created a new service?
If it is a direct replica of the db you are after why not copy the control file/s also.
Startup mount.....
Then issue a bunch of alter database rename datafile statements to point to the new location??
Or would this not do what you want?
-
I have seen the rename command work just as effectively to clone a DB
Slaine
-
there is a thread about cloning database, it should work with NT as well, I am wondering why you use alter database open using backup controlfile?
If you used an old controlfile add reuse clause when u recreate the control file
Procedure
- Find some disk space and create appropriate directories / file systems for you cloned database (conforming to the OFA guidelines)
- Connect to the PROD1 instance and dump the controlfile using the SQL command
ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
This will put a text copy of the controlfile in the USER_DUMP_DEST
- Shutdown Normal PROD1 database
- Perform an operating system copy of PROD1 to the new location where CLONE1 will reside.
- Startup the PROD1 instance
- Edit the controlfile you created and change all the path names of the database to the new location.
- Set your environment to the CLONE1 instance and run Server Manager (svrmgrl)
CONNECT INTERNAL
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE SET DATABASE "CLONE1" RESETLOGS NOARCHIVELOG
MAXLOGFILES 32
MAXLOGMEMBERS 2
MAXDATAFILES 64
MAXINSTANCES 8
MAXLOGHISTORY 800
LOGFILE
GROUP 1 '/oracle/data/CLONE1/redos/log1CLONE1.dbf' SIZE 512K,
GROUP 2 '/oracle/data/CLONE1/redos/log2CLONE1.dbf' SIZE 512K,
GROUP 3 '/oracle/data/CLONE1/redos/log3CLONE1.dbf' SIZE 512K
DATAFILE
'/oracle/data/CLONE1/system_ts/systCLONE1.dbf' SIZE 25M,
'/oracle/data/CLONE1/data_ts/data_CLONE1.dbf' SIZE 230M,
'/oracle/data/CLONE1/index_ts/index_CLONE1.dbf' SIZE 230M,
'/oracle/data/CLONE1/rbs_ts/rbs_CLONE1.dbf' SIZE 10M,
'/oracle/data/CLONE1/temp_ts/temp_CLONE1.dbf' SIZE 10M,
'/oracle/data/CLONE1/tools_ts/ts_tools_CLONE1_02.dbf' SIZE 15M,
'/oracle/data/CLONE1/users_ts/ts_users_CLONE1.dbf' SIZE 1M,
;
ALTER DATABASE OPEN RESETLOGS;