Pavan DBA's Blog

The DBA Knowledge Store

Posts Tagged ‘oracle database cloning’

Database cloning using hot backup (if directory structure is different)

Posted by Pavan DBA on March 26, 2010


Below steps helps you in performing database cloning using hot backup
Assumptions:
1. directory structure is different in both source and target servers
2. Oracle version : 10.2.0.4
3. OS version : Linux 5
4. target database name is same as source database name

step 1 :Ā  Take the hotĀ backup of source database
sql> alter database begin backup;
$ copy datafiles to backup location
sql> alter database end backup;

step 2 : TakeĀ controlfile trace and pfile or spfile (that was using by the source database)

step 3 : Install Oracle software on another machine (choose ā€œInstall onlyā€ option in OUI). Donā€™t create any database

step 4 :Ā Copy all the files (including trace file and pfile or spfile) from source server to target server either using FTP or rcp
Note: Not necessary in copying control files and redologfiles

step 5 :Ā Place pfile or spfile in ā€œdbsā€ directory on target

step 6 :Ā Copy the remaining files to their respective locations (If any directories are missing, do create them)

step 7 :Ā Connect as sysdba and Startup the database in nomount stage

step 8 :Ā Edit the trace file (that was copied) and generate a create controlfile script from it. Modify theĀ script andĀ specify the new locations ofĀ  the files.

step 9 : Execute the controlfile script which will create controlfiles in the location specified in CONTROL_FILES parameter. Once control files are created, database will be forwarded to MOUNT state.
sql> @create_controlfile.sql

step 10 : Finally, Open the database with resetlogs option
sql> alter database open resetlogs;

Posted in cloning | Tagged: , , | 5 Comments »

Database cloning using cold backup

Posted by Pavan DBA on November 13, 2009


The following are the steps for performing database cloning using cold backup

Assumptions : You are using Linux flavour OS and following same directory structure

1. Take the cold backup of source database

2. TakeĀ controlfile trace and pfile or spfile (that was using by the source database)

3. Install Oracle software on another machine (choose “Install only” option in OUI). Don’t create any database

4. Copy all the files (including trace file and pfile or spfile) from source server to target server either using FTP or rcp

5. Place pfile or spfile in “dbs” directory on target

6. Copy the remaining files to their respective locations (If any directories are missing, do create them)

7. Open bash_profile file and set ORACLE_HOME and ORACLE_SID

8. Connect as sysdba and Startup the database

Posted in cloning | Tagged: , , , | 2 Comments »

 
%d bloggers like this: