Professional Documents
Culture Documents
10 steps for cloning a database.
Step 4. Copy /FTP init parameter file ,control file script and all the
database file on the destination server/location, once all the files
are successfully copied, you may startup the database normally.
Step 10. Take the cold backup and start the database in archive/non
archive mode.
Step 1 – 3 on the Source Server ( Server A)
SQLPLUS> connect sys/password
Connected.
SQLPLUS> shutdown ;
Database closed.
Database dismounted.
ORACLE instance shut down.
Step 4: Copy all the parameter files (initsid.ora, configsid.ora ), Control files,
Ctrlprod.sql ( created as above) and all data files to clone server . It is good to
follow the OFA. If you are cloning a database on the same machine then create
a different directory structure ( as OFA) for cloning instance and copied all the
required files of primary instance here.
Step 4a : On Unix ( Let us say your cloning instance name is clone)
If you had followed OFA , your initsid.ora parameters files would be
in $ORACLE_BASE/admin/clone/pfile/initclone.ora
and configsid.ora would be in
$ORACLE_BASE/admin/clone/pfile/configclone.ora.
Change the following parameter in the initsid.ora of the cloning
instance/server
InitSid.ora (initora816.ora) of the InitSid.ora (initclone.ora) of the
Source/production server. destination/clone server.
db_name = "ora816" Db_name= “clone”
instance_name = ora816 Instance_name= clone
service_names = ora816 Service_name = clone
control_files = Control_file =
("e:\ora816\oradata\ora816\contro (“C:\clone\control01.ctl”,”D:\clone\control
l01.ctl", 02.ctl”)
"f:\ora816\oradata\ora816\control
02.ctl",
"g:\ora816\oradata\ora816\control
03.ctl")
Oraxxxx.trc is copied from source/production instance to destination/clone
instance and renamed it as ctrlclone.sql .
STEP 6 :-
ON NT :- You have to create a windows NT services as follows.
C:\>oradim -new -sid clone -srvc oracleserviceClone -intpwd oracle
-startmode auto -pfile f:\clone\initclone.ora
ON Unix :-
(A) Change the working directory to /etc and edit the oratab file to put the
entry for CLOBE instance.
(B) Setup login profile for the Oracle user having dba group.
ORACLE_SID=CLONE
Export ORACLE_SID
Or .oraenv
STEP 7 :- Create controlfile as follows :-
Check in the initclone.ora REMOTE_LOGIN_PASSWORDFILE is set to
exclusive or shared. If this is set, then a valid passwordfile
should exist in ORACLE_HOME/dbs or created using orapwd as
orapwd file=/u01/oracle/V816/dbs/orapwV722 password=oracle entries=1
SQLPLUS> alter database open resetlogs;
Statement processed.
STEP 9 :- Shutdown the database in Normal mode
SQLPLUS> connect internal/oracle
Connected.
SQLPLUS> shutdown ;
Database closed.
Database dismounted.
ORACLE instance shut down.
STEP 10 :- Take the cold backup and start the database in archive/non
archive mode.
Note :-
You cannot move datafiles from one operating system and use them on a different
operating system. Therefore, it is not possible to clone a database running on SUN
on an HP machine. You would have to use export/import.