Error in COLD CLONE ORA-01503: CREATE CONTROLFILE failed
Dear All DBA Genius ,
I am in the first stage of Cloning.
i am Trying to Make a Clone of Current DB which is Created by Universal Installer.
i carefully followed the following Steps:
1) "ALTER DATABASE BACKUP CONTROLFILE TO TRACE;"
2) Then i Edited the Pfile and kept in Oracle_home location
3) I create adump,bdump,cdump,dpdump* & udump folders Under the Folder where i wanted to keep the CLONE Database
4) I Shut downed the DB and copied the DATAFILE's Except CONTROLFILE and move it to created folder for clone.
5) Now i create a new SID for this Clone DB
6) I Started the DB in NOMOUNT with Pfile.
It started well. But while i try to Run the Control file script which i taken before in first step, am getting this error
SQL> @'D:\UTI\UTI.sql';
ORA-01081: cannot start already-running ORACLE - shut it down first
CREATE CONTROLFILE SET DATABASE "UTI" RESETLOGS NOARCHIVELOG
*
ERROR at line 1:
ORA-01503: CREATE CONTROLFILE failed
ORA-01565: error in identifying file 'D:\UTI\SYSTEM01.DBF'
ORA-27041: unable to open file
OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
I think a basic over view of cloning is helpful. I have spent the better part of the last year scripting rman backups and a cloning script, so I feel well versed in the subject area.
In order to clone to another database you need an rman backup. It can be a hot or warm backup, or an incremental hot or warm backup, You should also have whatever archive logs are available from around the time of the backup. You need to create an init file for the new clone. Since the sid name and directory structure will likely be different, you can tell Oracle how to rename the data and log files by putting the following two lines in your init file for the new database.
You need to create the admin, data, archive directories. You need a backup of the control file from the source database, which rman refers to as the target database. You need to copy the control file to the places mentioned in the new init file and do a startup mount. rman can't restore a database unless the database you are restoring to is in mount mode. It helps if you have an rman repository, because rman will then know exactly where to look for the backup.
rman << EOF
connect catalog $DBPASS;
connect target sys/${SYSPW}@${SOURCE_SID}
connect auxiliary /
spool log to /oracle/log/clone_${SOURCE_SID}_${ORACLE_SID}.log;
run {
set command id to 'clone';
duplicate target database to "${TARGET_SID}";
}
EOF
This script will restore the files, do the necessary recovery, rename the database and do the open database resetlogs. You can also doin all of that manually without having the repository. Just point rman to the right backup.
RUN {
ALLOCATE CHANNEL C1 DEVICE TYPE
DISK format '/oracle/rman/sidname/bck_20100415';
RESTORE DATABASE;
RECOVER DATABASE;
}
If you go the manual route rman will leave the database in mounted mode. You will need to rename the database yourself. This is the kind of thing where you need to practice in advance, and make sure that your backup process is giving you everything you need for recovery and cloning.
Bookmarks