You need to follow the "pre-requisite" and "preparation" steps from section 1 and 2 of the cloning note applicable to your EBS Version:
Release 11i : Note 230672.1 - 'Cloning Oracle Applications Release 11i with Rapid Clone'
Release 12 : Note 406982.1 - 'Cloning Oracle Applications Release 12 with Rapid Clone'
This Note helps you to implement the steps mentioned in "Appendix B: Recreating database control files manually in Rapid Clone" as per above Clone Note.
Step 1: Ensure adpreclone.pl has been run
Step 2: Obtain a trace file script to recreate the controlfile. On the source database issue the following
command:
SQL> ALTER DATABASE BACKUP CONTROLFILE TO TRACE;
The trace file script will be put into the user_dump_dest directory. The name of the trace file script will be something like PRODUCTION_ora_99999.trc.
Compare the date and time of the new trace file script to the time in which you entered the ALTER DATABASE BACKUP CONTROLFILE TO TRACE command.
This will ensure you will be using the most recent trace file script, the one you created in this step
Step 3: In the create controlfile script just created in step 2 change:
CREATE CONTROLFILE REUSE DATABASE "PRODUCTION" NORESETLOGS
to:
CREATE CONTROLFILE DATABASE "PRODUCTION" RESETLOGS ARCHIVELOG
If you want to change the Database Name , You need to use the clause SET DATABASE
You must specify RESETLOGS.
The ARCHIVELOG mode may be changed to NOARCHIVELOG if you wish to run the copied database in noarchive log mode. Change all directories in the create controlfile clause to point to the correct directories for the new target database, if necessary.
Leave "only" the CREATE CONTROLFILE clause. The other statements, like the recover command, will be done manually. Be sure you also remove the STARTUP NOMOUNT command.
Note: Please ensure that there is no new datafile/tablespace added to Database after you generate controlfile script as above
Step 4: On the source database make an online copy of all datafiles using:
SQL> ALTER TABLESPACE
Copy all datafiles within tablespace
Then do:
SQL> ALTER TABLESPACE
Do NOT copy the controlfiles and redo log files as they will be recreated. You must copy the datafiles only after the ALTER .. BEGIN BACKUP command has been executed, otherwise the datafiles may be corrupted.
The names of the datafiles and tablespaces to which the datafiles belong can be obtained using the following command:
SQL> SELECT FILE_NAME, TABLESPACE_NAME FROM DBA_DATA_FILES;
Note: Instead of performing step 4 and step 5 to create a new online backup, you may instead use a previously taken online backup of your database.If you choose to use a previous online backup be sure to copy the required archived redo logs taken with the the previous online backup.
Step 5: After all datafiles have been copied and the tablespaces taken out of backup mode issue the following command:
SQL> ALTER SYSTEM ARCHIVE LOG CURRENT;
You will need all of the archivelog files from the start of datafile copy commands including the one just created with the command ALTER SYSTEM ARCHIVE LOG CURRENT.
Step 6: Copy the database (DBF) files,controlfile script and archive log files from the source to the target
system
Step 7: So, As mentioned in 230672.1 (Appendix B), Replace section 2.2a (Configure the target system database server) with the following steps:
Execute the following commands to configure the target system. You will be prompted for the target system specific values (SID, Paths, Ports, etc)
· Log on to the target system as the ORACLE user
· Configure the
Step 7: On the target system issue STARTUP NOMOUNT command. For example:
SQL> startup nomount pfile=initTESTING.ora
Step 8: Run the prepared script created in step 3 to create the new controlfile. For example:
SQL> @PRODUCTION_ora_99999.trc
Step 9: Issue the command:
SQL> RECOVER DATABASE UNTIL CANCEL USING BACKUP CONTROLFILE
You will be prompted to apply all of the archived redo logs from the source database including
the last archive redo log file created with the ALTER DATABASE ARCHIVE LOG CURRENT
command from step 5.
After applying all of these archive log files issue the CANCEL command.
Step 10: Open the database with resetlogs:
SQL>ALTER DATABASE OPEN RESETLOGS
At this point the target database will have been successfully cloned and opened.
Step 11: Create Temporary Tablespace if not created in Source, else you shall add Temporary tablespace
You can check if tablespace TEMP has tempfiles or datafiles using the following SQL:
SQL> SELECT FILE_NAME,TABLESPACE_NAME,STATUS,AUTOEXTENSIBLE from DBA_TEMP_FILES where TABLESPACE_NAME like 'TEMP';
SQL> SELECT FILE_NAME,TABLESPACE_NAME, STATUS,AUTOEXTENSIBLE FROM DBA_DATA_FILES WHERE TABLESPACE_NAME LIKE 'TEMP';
If Temporary Tablespace is not created from above query,
SQL> create temporary tablespace temp add tempfile 'xxxx.dbf' size xx
Or
SQL> alter tablespace TEMP add tempfile 'xxxx.dbf' size xx
Step 12: Run the library update script against the database
· cd
Step 13: Configure the target database (the database must be open)
· cd
Finally, refer back to cloning notes and the following sections:
· Copy the Application Tier File System
· Configure the Target System Application Tier Server Nodes
· Finishing Tasks
Release 11i : Note 230672.1 - 'Cloning Oracle Applications Release 11i with Rapid Clone'
Release 12 : Note 406982.1 - 'Cloning Oracle Applications Release 12 with Rapid Clone'
No comments:
Post a Comment