- Take a control file backup to trace after connecting sys as sysdba. The trace file will get generated in user_dump_dest location and file will be with latest time stamp. Try ls –ltr |tail command to locate the trace file easily.
- Edit the trace file to prepare the create control file script
- Shutdown the SOURCE database with normal or immediate option. Don’t use abort option
- Set the environment variables for TARGET database (export ORACLE_SID=TARGET)
- As mentioned in pre requisites create the new parameter file with initTARGET.ora in $ORACLE_HOME/dbs directory with db_name as TARGET
- Connect to sqlplus with sys as sysdba
- Run the createctrl.sql script in sql prompt to rename the database name to TARGET
- Open the database with RESETLOGS option.
- Add temp file to the temp tablespace.
- Select db_name from v$database to confirm the changes.
- Update the tnsnames.ora, listener.ora files with new TARGET database details
- Take a full backup of new TARGET database immediately as the previous SOURCE databases are not valid.