The following procedure describes the steps involved in creating a standby database on a different host with the instance configured.
Before You Begin
*.log_archive_dest_1='location=/LOCATION_OF_SOURCE_DB_ARCHIVELOG/arch'
*.log_archive_dest_2='service=<standbydb1_connection_name_on_destination> LGWR SYNC AFFIRM'
*.log_archive_dest_1='LOCATION=/ LOCATION_OF_DESTINATION_DB_ARCHIVELOG /arch'
*.STANDBY_ARCHIVE_DEST='/ LOCATION_OF_STANDBY_DB_ARCHIVELOG /stdbyarch'
*.STANDBY_FILE_MANAGEMENT=auto
DB_FILE_NAME_CONVERT=('/DATA_FILE_PATH_ON_SOURCE_MACHINE/stdby', '/ORACLE_DATA_FILE_PATH_ON_STANDBY_MACHINE/stdby/')
LOG_FILE_NAME_CONVERT=('/ DATA_FILE_PATH_ON_SOURCE_MACHINE /stdby', '/ ORACLE_DATA_FILE_PATH_ON_STANDBY_MACHINE /stdby/')
For example, set up the listener and configure the destination computer's $TNS_ADMIN/tnsnames.ora file for the standby database.
On Source computer:
<Standbydb1_use_diff_connection_string> =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = destination_host_name)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = <standbydb_use_same_db_name_as_primary>)
(UR = A)
)
)
<Standbydb_primary> =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = primary_host_name)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = <standbydb_same_as_destination><)
)
)
On standby computer:
<standbydb1_destination_connection_string> =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = destination_standby_host_name)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = <standbydb_destination_db_name_same_as_primary>)
(UR = A)
)
)
<standbydb_primary_connection> =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = primary_host_name)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = <standbydb_primary_db>)
)
)
For Oracle 10g or higher, ensure that you set the Standby Role Initialization parameter,
DB_FILE_NAME_CONVERT,to add all the temp data files from the primary database
location to the standby database location, as follows:
DB_FILE_NAME_CONVERT='<primary_database_temp_datafile_old _location>','<standby_database_temp_datafile_new_location>' If this parameter is not set, restore will fail with the following error message: temporary file TEMP01.DBF conflicts with file used by target database |
Required Capability: See Capabilities and Permitted Actions
To create a standby database on a different host with the instance configured:
Alter database recover managed standby database disconnect;