SlideShare a Scribd company logo
Memo

     Aan
       cc
     Van    Gino D’Alfonso

Onderwerp   Create database through active duplicate
   Datum    17/04/2012



            Preperation

            As example we will create database ASM453D1 from
            source database ASM451D1.

            The new database will run on the ota5045
            the source database runs on the ota5026

            First we create the audit directory on the ota5045
            $ mkdir /oracle/home/admin/ASM453D/adump
            put new database in /etc/oratab
            $vi /etc/oratab
            ASM453D1:/oracle/home/11.2.0.3.0:N

            Then make a pfile with only 1 entry in it.
            $ vi $ORACLE_HOME/DBS/initASM453D1.ora
            db_name=ASM453D

            In our enviroment the listenerer runs under grid user
            login as grid user and go to $ORACLE_HOME/network/admin
            $ vi listener.ora

            LISTENER =
             (DESCRIPTION_LIST =
               (DESCRIPTION =
                 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
                 (ADDRESS = (PROTOCOL = TCP)(HOST =
            ota5045.business.finl.fortis)(PORT = 1521))
               )
             )
SID_LIST_LISTENER =
 (SID_LIST =
 ( SID_DESC =
   (GLOBAL_DBNAME = ASM453D)
   (ORACLE_HOME = /oracle/home/11.2.0.3.0)
   (SID_NAME = ASM453D1)
 )
)

Log on as oracle user op de ota5045 an put the following entry's in the tnsnames.ora

ASM451D1 =
(DESCRIPTION =
   (ADDRESS_LIST =
     (LOAD_BALANCE=ON)
     (ADDRESS = (Protocol = TCP)(Host = ota5026)(Port = 1521))
   )
   (CONNECT_DATA =
   (SERVICE_NAME = ASM451D)
   )
 )
ASM453D1 =
 (DESCRIPTION =
   (ADDRESS_LIST =
     (LOAD_BALANCE=ON)
     (ADDRESS = (Protocol = TCP)(Host = ota5045)(Port = 1521))
   )
   (CONNECT_DATA =
   (SERVICE_NAME = ASM453D)
   )
 )

Do the same for the tnsnames.ora on the ota5025 where the source database is
running.

copy password file from source database to target database and change name of the
file on the ota5026 as user oracle

$ scp $ORCLE_HOME/dbs/orapwASM451D1 ota5045:$ORACLE_HOME/dbs
$ mv orapwASM451D1 orapwASM453D1
$ chmod 650 orapwASM453D1

start the new database ASM453D1 in nomount fase
SQL> startup nomount

On the ota5026 where the target database ASM451D1 runs start rman and login

connect target sys/password@asm451d
connect auxiliary sys/password@asm453d
Note *
Passwords MUST be the same otherwise the active duplicate fails
Start the duplicate from active database.
duplicate target database
TO ASM453D
from active database
spfile
SET db_file_name_convert 'ASM451D','ASM453D'
SET log_file_name_convert 'ASM451D','ASM453D'
SET control_files
'+DATA/asm453d/controlfile/control1.ctl','+FRA/asm453d/controlfile/control2.ctl'
SET audit_file_dest '/oracle/home/admin/SVM453D/adump';

This are the last lines of the active duplicate.

datafile 10 switched to datafile copy
input datafile copy RECID=9 STAMP=780764632 file
name=+DATA/asm453d/datafile/svm4_dwa_i.303.780764577
datafile 11 switched to datafile copy
input datafile copy RECID=10 STAMP=780764632 file
name=+DATA/asm453d/datafile/svm4_dwa_l.304.780764581
datafile 12 switched to datafile copy
input datafile copy RECID=11 STAMP=780764632 file
name=+DATA/asm453d/datafile/svm4_dwh_d.305.780764583
datafile 13 switched to datafile copy
input datafile copy RECID=12 STAMP=780764632 file
name=+DATA/asm453d/datafile/svm4_dwh_i.306.780764587
datafile 14 switched to datafile copy
input datafile copy RECID=13 STAMP=780764632 file
name=+DATA/asm453d/datafile/svm4_dwh_l.307.780764589
contents of Memory Script:
{
  Alter clone database open resetlogs;
}
executing Memory Script
database opened
Finished Duplicate Db at 16-APR-12

You have an exact clone of the source database ASM451D1

More Related Content

What's hot

What's new in PHP 5.5
What's new in PHP 5.5What's new in PHP 5.5
What's new in PHP 5.5
Tom Corrigan
 
Jose dossantos.doc
Jose dossantos.docJose dossantos.doc
Jose dossantos.doc
josedossantos0512
 
4 sesame
4 sesame4 sesame
ZeroMQ Is The Answer
ZeroMQ Is The AnswerZeroMQ Is The Answer
ZeroMQ Is The Answer
Ian Barber
 
tarea 2 parcial robotica .pdf
tarea 2 parcial robotica .pdftarea 2 parcial robotica .pdf
tarea 2 parcial robotica .pdf
luisgabielnavarro
 
Fail Fast. Into User's Face.
Fail Fast. Into User's Face.Fail Fast. Into User's Face.
Fail Fast. Into User's Face.
Yegor Bugayenko
 
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
I Goo Lee
 
Cis 216 – shell scripting
Cis 216 – shell scriptingCis 216 – shell scripting
Cis 216 – shell scripting
Dan Morrill
 
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made Simple
Ian Barber
 
File include
File includeFile include
File include
Roy
 
The promise of asynchronous PHP
The promise of asynchronous PHPThe promise of asynchronous PHP
The promise of asynchronous PHP
Wim Godden
 
Mise en place d'un client VPN l2tp IPsec sous docker
Mise en place d'un client VPN l2tp IPsec sous dockerMise en place d'un client VPN l2tp IPsec sous docker
Mise en place d'un client VPN l2tp IPsec sous docker
Nicolas Trauwaen
 
C99
C99C99
C99
sifo12
 
Unit testing powershell
Unit testing powershellUnit testing powershell
Unit testing powershell
Matt Wrock
 
Qnap01
Qnap01Qnap01
2010 Smith Scripting101
2010 Smith Scripting1012010 Smith Scripting101
2010 Smith Scripting101
bokonen
 
Пишем для asyncio - Андрей Светлов, PyCon RU 2014
Пишем для asyncio - Андрей Светлов, PyCon RU 2014Пишем для asyncio - Андрей Светлов, PyCon RU 2014
Пишем для asyncio - Андрей Светлов, PyCon RU 2014
it-people
 
Asyncio
AsyncioAsyncio
Php arduino
Php arduinoPhp arduino
Php arduino
Jonadri Bundo
 

What's hot (19)

What's new in PHP 5.5
What's new in PHP 5.5What's new in PHP 5.5
What's new in PHP 5.5
 
Jose dossantos.doc
Jose dossantos.docJose dossantos.doc
Jose dossantos.doc
 
4 sesame
4 sesame4 sesame
4 sesame
 
ZeroMQ Is The Answer
ZeroMQ Is The AnswerZeroMQ Is The Answer
ZeroMQ Is The Answer
 
tarea 2 parcial robotica .pdf
tarea 2 parcial robotica .pdftarea 2 parcial robotica .pdf
tarea 2 parcial robotica .pdf
 
Fail Fast. Into User's Face.
Fail Fast. Into User's Face.Fail Fast. Into User's Face.
Fail Fast. Into User's Face.
 
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
Intro KaKao MRTE (MySQL Realtime Traffic Emulator)
 
Cis 216 – shell scripting
Cis 216 – shell scriptingCis 216 – shell scripting
Cis 216 – shell scripting
 
ZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made SimpleZeroMQ: Messaging Made Simple
ZeroMQ: Messaging Made Simple
 
File include
File includeFile include
File include
 
The promise of asynchronous PHP
The promise of asynchronous PHPThe promise of asynchronous PHP
The promise of asynchronous PHP
 
Mise en place d'un client VPN l2tp IPsec sous docker
Mise en place d'un client VPN l2tp IPsec sous dockerMise en place d'un client VPN l2tp IPsec sous docker
Mise en place d'un client VPN l2tp IPsec sous docker
 
C99
C99C99
C99
 
Unit testing powershell
Unit testing powershellUnit testing powershell
Unit testing powershell
 
Qnap01
Qnap01Qnap01
Qnap01
 
2010 Smith Scripting101
2010 Smith Scripting1012010 Smith Scripting101
2010 Smith Scripting101
 
Пишем для asyncio - Андрей Светлов, PyCon RU 2014
Пишем для asyncio - Андрей Светлов, PyCon RU 2014Пишем для asyncio - Андрей Светлов, PyCon RU 2014
Пишем для asyncio - Андрей Светлов, PyCon RU 2014
 
Asyncio
AsyncioAsyncio
Asyncio
 
Php arduino
Php arduinoPhp arduino
Php arduino
 

Viewers also liked

Revised q3
Revised q3Revised q3
Revised q3
giaamarie
 
Truly rich club bo sanchez
Truly rich club bo sanchezTruly rich club bo sanchez
Truly rich club bo sanchez
Richard Macalintal
 
Greenbeard
GreenbeardGreenbeard
Q3 powerpoint
Q3 powerpointQ3 powerpoint
Q3 powerpoint
giaamarie
 
Oracle Connection Manager
Oracle Connection ManagerOracle Connection Manager
Oracle Connection Manager
Viaggio Italia
 
Evaluation Q4 powerpoint
Evaluation Q4 powerpointEvaluation Q4 powerpoint
Evaluation Q4 powerpoint
giaamarie
 
Q2 powerpoint
Q2 powerpointQ2 powerpoint
Q2 powerpoint
giaamarie
 
Evaluation Q3 powerpoint
Evaluation Q3 powerpointEvaluation Q3 powerpoint
Evaluation Q3 powerpoint
giaamarie
 
rtsp
rtsprtsp
Create guaranteed restore point
Create guaranteed restore pointCreate guaranteed restore point
Create guaranteed restore point
Viaggio Italia
 
Truly rich club
Truly rich clubTruly rich club
Truly rich club
Richard Macalintal
 
Powerpoint
PowerpointPowerpoint
Powerpoint
Poppy Reader
 
Ofw guide in investing for newbies
Ofw guide in investing for newbiesOfw guide in investing for newbies
Ofw guide in investing for newbies
Richard Macalintal
 
Odv oracle customer_demo
Odv oracle customer_demoOdv oracle customer_demo
Odv oracle customer_demo
Viaggio Italia
 
Tde oracle customer_demo
Tde oracle customer_demoTde oracle customer_demo
Tde oracle customer_demo
Viaggio Italia
 

Viewers also liked (17)

Revised q3
Revised q3Revised q3
Revised q3
 
Truly rich club bo sanchez
Truly rich club bo sanchezTruly rich club bo sanchez
Truly rich club bo sanchez
 
Greenbeard
GreenbeardGreenbeard
Greenbeard
 
Q3 powerpoint
Q3 powerpointQ3 powerpoint
Q3 powerpoint
 
Greenbeard backstage
Greenbeard backstageGreenbeard backstage
Greenbeard backstage
 
Oracle Connection Manager
Oracle Connection ManagerOracle Connection Manager
Oracle Connection Manager
 
Evaluation Q4 powerpoint
Evaluation Q4 powerpointEvaluation Q4 powerpoint
Evaluation Q4 powerpoint
 
Q2 powerpoint
Q2 powerpointQ2 powerpoint
Q2 powerpoint
 
Evaluation Q3 powerpoint
Evaluation Q3 powerpointEvaluation Q3 powerpoint
Evaluation Q3 powerpoint
 
rtsp
rtsprtsp
rtsp
 
Create guaranteed restore point
Create guaranteed restore pointCreate guaranteed restore point
Create guaranteed restore point
 
Truly rich club
Truly rich clubTruly rich club
Truly rich club
 
Powerpoint
PowerpointPowerpoint
Powerpoint
 
Ofw guide in investing for newbies
Ofw guide in investing for newbiesOfw guide in investing for newbies
Ofw guide in investing for newbies
 
Odv oracle customer_demo
Odv oracle customer_demoOdv oracle customer_demo
Odv oracle customer_demo
 
Kritikal book metopel for merge123
Kritikal book metopel   for merge123Kritikal book metopel   for merge123
Kritikal book metopel for merge123
 
Tde oracle customer_demo
Tde oracle customer_demoTde oracle customer_demo
Tde oracle customer_demo
 

Similar to Clone database using_active_duplicate

Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4
mohammed shahnawaz ahmed
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby database
Jorge Batista
 
Pontos para criar_instancia_data guard_11g
Pontos para criar_instancia_data guard_11gPontos para criar_instancia_data guard_11g
Pontos para criar_instancia_data guard_11g
Leandro Santos
 
Rac nonrac clone
Rac nonrac cloneRac nonrac clone
Rac nonrac clone
stevejones167
 
oracle dba
oracle dbaoracle dba
oracle dba
uday jampani
 
Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!
Guatemala User Group
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12c
uzzal basak
 
Oracle 18c installation on Oracle Enterprise Linux 7.4
Oracle 18c installation on Oracle Enterprise Linux 7.4Oracle 18c installation on Oracle Enterprise Linux 7.4
Oracle 18c installation on Oracle Enterprise Linux 7.4
Mahamudul Hasan
 
Cloning 2
Cloning 2Cloning 2
Cloning 2
Deepti Singh
 
Ora static and-dynamic-listener
Ora static and-dynamic-listenerOra static and-dynamic-listener
Ora static and-dynamic-listener
liu yulin
 
Cloning 2
Cloning 2Cloning 2
Cloning 2
Deepti Singh
 
Distrubuted database connection with oracle
Distrubuted database connection with oracleDistrubuted database connection with oracle
Distrubuted database connection with oracle
ashrafulais
 
Linux configer
Linux configerLinux configer
Linux configer
MD. AL AMIN
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon Export
Anar Godjaev
 
Upgrade Oracle Database to 12c
Upgrade Oracle Database to 12c Upgrade Oracle Database to 12c
Upgrade Oracle Database to 12c
Osama Mustafa
 
Create manula and automaticly database
Create manula and automaticly databaseCreate manula and automaticly database
Create manula and automaticly database
Anar Godjaev
 
Oracle ORA Errors
Oracle ORA ErrorsOracle ORA Errors
Oracle ORA Errors
Manish Mudhliyar
 
Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014
Özgür Umut Vurgun
 
Sql for dbaspresentation
Sql for dbaspresentationSql for dbaspresentation
Sql for dbaspresentation
oracle documents
 
Oracle Cloud As Services
Oracle Cloud As ServicesOracle Cloud As Services
Oracle Cloud As Services
Özgür Umut Vurgun
 

Similar to Clone database using_active_duplicate (20)

Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4
 
How to create a non managed standby database
How to create a non managed  standby databaseHow to create a non managed  standby database
How to create a non managed standby database
 
Pontos para criar_instancia_data guard_11g
Pontos para criar_instancia_data guard_11gPontos para criar_instancia_data guard_11g
Pontos para criar_instancia_data guard_11g
 
Rac nonrac clone
Rac nonrac cloneRac nonrac clone
Rac nonrac clone
 
oracle dba
oracle dbaoracle dba
oracle dba
 
Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!Pluggable Databases: What they will break and why you should use them anyway!
Pluggable Databases: What they will break and why you should use them anyway!
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12c
 
Oracle 18c installation on Oracle Enterprise Linux 7.4
Oracle 18c installation on Oracle Enterprise Linux 7.4Oracle 18c installation on Oracle Enterprise Linux 7.4
Oracle 18c installation on Oracle Enterprise Linux 7.4
 
Cloning 2
Cloning 2Cloning 2
Cloning 2
 
Ora static and-dynamic-listener
Ora static and-dynamic-listenerOra static and-dynamic-listener
Ora static and-dynamic-listener
 
Cloning 2
Cloning 2Cloning 2
Cloning 2
 
Distrubuted database connection with oracle
Distrubuted database connection with oracleDistrubuted database connection with oracle
Distrubuted database connection with oracle
 
Linux configer
Linux configerLinux configer
Linux configer
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon Export
 
Upgrade Oracle Database to 12c
Upgrade Oracle Database to 12c Upgrade Oracle Database to 12c
Upgrade Oracle Database to 12c
 
Create manula and automaticly database
Create manula and automaticly databaseCreate manula and automaticly database
Create manula and automaticly database
 
Oracle ORA Errors
Oracle ORA ErrorsOracle ORA Errors
Oracle ORA Errors
 
Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014
 
Sql for dbaspresentation
Sql for dbaspresentationSql for dbaspresentation
Sql for dbaspresentation
 
Oracle Cloud As Services
Oracle Cloud As ServicesOracle Cloud As Services
Oracle Cloud As Services
 

Clone database using_active_duplicate

  • 1. Memo Aan cc Van Gino D’Alfonso Onderwerp Create database through active duplicate Datum 17/04/2012 Preperation As example we will create database ASM453D1 from source database ASM451D1. The new database will run on the ota5045 the source database runs on the ota5026 First we create the audit directory on the ota5045 $ mkdir /oracle/home/admin/ASM453D/adump put new database in /etc/oratab $vi /etc/oratab ASM453D1:/oracle/home/11.2.0.3.0:N Then make a pfile with only 1 entry in it. $ vi $ORACLE_HOME/DBS/initASM453D1.ora db_name=ASM453D In our enviroment the listenerer runs under grid user login as grid user and go to $ORACLE_HOME/network/admin $ vi listener.ora LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = ota5045.business.finl.fortis)(PORT = 1521)) ) )
  • 2. SID_LIST_LISTENER = (SID_LIST = ( SID_DESC = (GLOBAL_DBNAME = ASM453D) (ORACLE_HOME = /oracle/home/11.2.0.3.0) (SID_NAME = ASM453D1) ) ) Log on as oracle user op de ota5045 an put the following entry's in the tnsnames.ora ASM451D1 = (DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE=ON) (ADDRESS = (Protocol = TCP)(Host = ota5026)(Port = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ASM451D) ) ) ASM453D1 = (DESCRIPTION = (ADDRESS_LIST = (LOAD_BALANCE=ON) (ADDRESS = (Protocol = TCP)(Host = ota5045)(Port = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = ASM453D) ) ) Do the same for the tnsnames.ora on the ota5025 where the source database is running. copy password file from source database to target database and change name of the file on the ota5026 as user oracle $ scp $ORCLE_HOME/dbs/orapwASM451D1 ota5045:$ORACLE_HOME/dbs $ mv orapwASM451D1 orapwASM453D1 $ chmod 650 orapwASM453D1 start the new database ASM453D1 in nomount fase SQL> startup nomount On the ota5026 where the target database ASM451D1 runs start rman and login connect target sys/password@asm451d connect auxiliary sys/password@asm453d Note * Passwords MUST be the same otherwise the active duplicate fails Start the duplicate from active database.
  • 3. duplicate target database TO ASM453D from active database spfile SET db_file_name_convert 'ASM451D','ASM453D' SET log_file_name_convert 'ASM451D','ASM453D' SET control_files '+DATA/asm453d/controlfile/control1.ctl','+FRA/asm453d/controlfile/control2.ctl' SET audit_file_dest '/oracle/home/admin/SVM453D/adump'; This are the last lines of the active duplicate. datafile 10 switched to datafile copy input datafile copy RECID=9 STAMP=780764632 file name=+DATA/asm453d/datafile/svm4_dwa_i.303.780764577 datafile 11 switched to datafile copy input datafile copy RECID=10 STAMP=780764632 file name=+DATA/asm453d/datafile/svm4_dwa_l.304.780764581 datafile 12 switched to datafile copy input datafile copy RECID=11 STAMP=780764632 file name=+DATA/asm453d/datafile/svm4_dwh_d.305.780764583 datafile 13 switched to datafile copy input datafile copy RECID=12 STAMP=780764632 file name=+DATA/asm453d/datafile/svm4_dwh_i.306.780764587 datafile 14 switched to datafile copy input datafile copy RECID=13 STAMP=780764632 file name=+DATA/asm453d/datafile/svm4_dwh_l.307.780764589 contents of Memory Script: { Alter clone database open resetlogs; } executing Memory Script database opened Finished Duplicate Db at 16-APR-12 You have an exact clone of the source database ASM451D1