Use the following steps to create a standby database on a different host with a configured instance.
Setting up a Standby Database
-
Perform an online full backup with the current control file.
-
Set the following initialization parameters in the primary initialization parameter file init<standbydb>.ora (startup PFile) on the source (primary) host.
LOG_ARCHIVE_DEST_1='LOCATION=C:\Oracle\Oradata\TSH1\Archive MANDATORY REOPEN=30'``LOG_ARCHIVE_DEST_2='SERVICE=stby1 LGWR SYNC AFFIRM' -
Create an initialization parameter file, init<standbydb>.ora for the standby database and set the following initialization parameters on the standby host:
*.log_archive_dest_1='LOCATION=/ LOCATION_OF_DESTINATION_DB_ARCHIVELOG /arch'*.STANDBY_ARCHIVE_DEST='/ LOCATION_OF_STANDBY_DB_ARCHIVELOG /stdbyarch'*.STANDBY_FILE_MANAGEMENT=autoDB_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/') -
Perform any Oracle Net setup and configuration required to connect to the standby database.
For example, set up the listener and configure the destination computer's $TNS_ADMIN/tnsnames.ora file for the standby database.
On the 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 the 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>))) -
Use a connect string to connect to the auxiliary database when the instance is not configured. Make sure to use the password
change_on_installwhen you create the password file for the auxiliary channel while creating the password file for the standby database on the destination host. -
Start up the standby database instance in
NOMOUNTmode. Configure the Oracle instance for the destination host in the CommCell Browser. -
Run the Ora_install.sh script on the auxiliary client.
-
Create the Oracle RAC client and configure it as a client on the destination host.
-
Ensure that you set the Standby Role Initialization parameter,
DB_FILE_NAME_CONVERT, to add all the temp datafiles from the primary database location to the standby database location.DB_FILE_NAME_CONVERT='<primary_database_temp_datafile_old _location>','<standby_database_temp_datafile_new_location>'
Creating a Standby Database
-
From the CommCell Browser, go to Client Computers > RAC client.
-
Right-click the instance, then go to All Tasks > Browse and Restore.
The Browse and Restore Options dialog box appears.
-
Select Latest Backup, and then click the View Content button.
-
Select the database, and then click the Recover All Selected button.
The Oracle Restore Options dialog box appears.
-
Click RMAN Duplicate DB, and then click Next.
The Oracle RMAN Duplicate DB Options dialog box appears.
-
Select Duplicate For Standby.
-
Select the Recover check box to recover the standby database.
-
If you want the system to refer to the target database's control files rather than the Recovery Catalog database select NO CATALOG (already selected by default).
-
If you want the system to refer to the Recovery Catalog database unselect NO CATALOG. In the Catalog Connect box enter the Oracle catalog connect string credentials.
-
Enter the catalog user name.
-
Enter the catalog user password.
-
Enter the Oracle service name.
-
-
On the Stream tab, double click the number of streams to use for each Oracle RAC instance in the Stream column, and enter the number of streams.
-
On the Stream tab, click Refresh All to verify that the status of the standby database is STARTED.
-
Click OK to start the restore.