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/log
CLONE
dbf
SIZE
K
GROUP
/oracle/data/CLONE
/redos/log
CLONE
dbf
SIZE
K
GROUP
/oracle/data/CLONE
/redos/log
CLONE
dbf
SIZE
K
DATAFILE
/oracle/data/CLONE
/system_ts/systCLONE
dbf
SIZE
M
/oracle/data/CLONE
/data_ts/data_CLONE
dbf
SIZE
M
/oracle/data/CLONE
/index_ts/index_CLONE
dbf
SIZE
M
/oracle/data/CLONE
/rbs_ts/rbs_CLONE
dbf
SIZE
M
/oracle/data/CLONE
/temp_ts/temp_CLONE
dbf
SIZE
M
/oracle/data/CLONE
/tools_ts/ts_tools_CLONE
_
dbf
SIZE
M
/oracle/data/CLONE
/users_ts/ts_users_CLONE
dbf
SIZE
M
;
ALTER DATABASE OPEN RESETLOGS;
That
s it
an exact duplicate of PROD
and a painless procedure
From:http://tw.wingwit.com/Article/program/Oracle/201311/17821.html