Description
Need to create a duplicate database on the same machine ? Database too big to use Export/Import ?
This is the easiest way to do it
Assume the original database is called PROD and you want to create a CLONE duplicate database
Procedure
Find some disk space and create appropriate directories / file systems for you cloned database (conforming to the OFA guidelines)
Connect to the PROD 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 PROD database
Perform an operating system copy of PROD to the new location where CLONE will reside
Startup the PROD instance
Edit the controlfile you created and change all the path names of the database to the new location
Set your environment to the CLONE instance and run Server Manager (svrmgrl)
CONNECT INTERNAL
STARTUP NOMOUNT
CREATE CONTROLFILE REUSE SET DATABASE CLONE RESETLOGS NOARCHIVELOG
MAXLOGFILES
MAXLOGMEMBERS
MAXDATAFILES
MAXINSTANCES
MAXLOGHISTORY
LOGFILE
GROUP /oracle/data/CLONE/redos/logCLONEdbf SIZE K
GROUP /oracle/data/CLONE/redos/logCLONEdbf SIZE K
GROUP /oracle/data/CLONE/redos/logCLONEdbf SIZE K
DATAFILE
/oracle/data/CLONE/system_ts/systCLONEdbf SIZE M
/oracle/data/CLONE/data_ts/data_CLONEdbf SIZE M
/oracle/data/CLONE/index_ts/index_CLONEdbf SIZE M
/oracle/data/CLONE/rbs_ts/rbs_CLONEdbf SIZE M
/oracle/data/CLONE/temp_ts/temp_CLONEdbf SIZE M
/oracle/data/CLONE/tools_ts/ts_tools_CLONE_dbf SIZE M
/oracle/data/CLONE/users_ts/ts_users_CLONEdbf SIZE M
;
ALTER DATABASE OPEN RESETLOGS;
Thats it an exact duplicate of PROD and a painless procedure