Example

This chapter presents an example of duplicate between a Windows server with ASM and a Linux Server without ASM.

Requirement

  1. Create the spfile for the auxiliary database

  2. Start the auxiliary database on the level nomount

  3. Add the parameter db_create_file_dest , db_create_online_log_dest_1 and db_create_online_log_dest_2 in the spfile of the new database

  4. Create the directories in oradata

  5. Configure the Listener and the Tnsnames on the both sides

Listener

On the target database

# listener.ora Network Configuration File:
D:\\oracle\\grid\\network\\admin\\listener.ora
# Generated by Oracle configuration tools.
LISTENER =
 (DESCRIPTION_LIST =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = srvoraclewinasm)(PORT = 1521))
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
 )
 )

ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
VALID_NODE_CHECKING_REGISTRATION_LISTENER=SUBNET # line added by Agent

On the auxiliary database

# listener.ora Network Configuration File:
/u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.
SUBSCRIBE_FOR_NODE_DOWN_EVENT_LISTENER=OFF
LISTENER =
 (DESCRIPTION_LIST =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = srvoracle)(PORT = 1521))
 (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
 )
 )
SID_LIST_LISTENER =

Tnsnames

On the target database

DB1 =
(DESCRIPTION =
 (ADDRESS= (PROTOCOL = TCP)(HOST = srvoraclewinasm )(PORT = 1521))
 (CONNECT_DATA =
 (SID = DB1)
 )
)
DBTEST =
 (DESCRIPTION =
 (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.102)(PORT = 1521))
 (CONNECT_DATA =
 (SID = DBTEST)
 )
)

On the auxiliary database

DBTEST =
(DESCRIPTION =
 (ADDRESS= (PROTOCOL = TCP)(HOST = srvoracle )(PORT = 1521))
 (CONNECT_DATA =
 (SID = DBTEST)
 )
)
DB1 =
(DESCRIPTION =
 (ADDRESS= (PROTOCOL = TCP)(HOST = 192.168.56.109 )(PORT = 1521))
 (CONNECT_DATA =
 (SERVICE_NAME = DB1_SITE1.it.dbi-services.com)
 )
)

Configuration File

# the SID of the source database (the database to clone from)
SSID=DB1
# the SID of the target/auxiliary database (the database to clone to)
TSID=DBTEST
# database connect string to clone from
SSID_CONNECT=sys/manager@DB1
# database connect string to clone to
TSID_CONNECT=sys/manager@DBTEST
# Connect string to the rman catalog, if any
RMAN_CATALOG_CONNECT=
# CLONE_MODE mode can be either ACTIVE or BACKUP
CLONE_MODE=ACTIVE
# the backup location for duplicates from backup
# this must be accessible from the host where
# the auxiliary instance is hosted
BACKUP_LOCATION=
# the type of backup which is used for backing up the databases
# can be either DISK or TAPE
BACKUP_TYPE=
# when the backup_type is tape we need to know the sbt
# parameters
SBT_TAPE_PARMS='SBT_LIBRARY=oracle.disksbt
ENV=(BACKUP_DIR=/u90/backup/DB122/)'
# specifiy the nofilenamecheck parameter for the duplicate
# <http://docs.oracle.com/database/121/RCMRF/rcmsynta020.htm#RCMRF126>
# The value of this parameter can be either YES or NO
NOFILENAMECHECK=YES
# a post script to run on the auxiliary database
# after the duplicate completed
# this can e.g. be useful for disabling archive log
# once the duplicate completed
POSTSCRIPT=

Execution

dbdupli.cmd -f D:\oracle\local\dmk_dbduplicate\etc\refresh_DBTEST.cfg

Last updated