Set up an auxiliary instance when you want to:
-
Duplicate a database
-
Restore tables to an auxiliary instance to a specific failure point
-
Use replication
Note
If this instance is for the replication feature, the auxiliary host is the replication destination host and the auxiliary instance is the replication destination instance.
You must have a configured instance for the replication feature.
For the replication feature, the db_name parameter value must be the same value on the source and destination databases. The db_unique_name parameter value can be different on the source and destination databases.
Before You Begin
-
Install the Oracle RAC Agent on Windows or UNIX on the auxiliary instance database host. See Getting Started for Oracle RAC.
-
When you duplicate a database without a configured instance on the duplicate database host, use change_on_install as the password for the auxiliary database.
Procedure
-
On the auxiliary database instance host, copy the init<SID>.ora file from the source database host to the auxiliary database instance host.
-
Compare the value of the db_files parameter that is in the init<SID>.ora file on the production and auxiliary databases. If the value on the production database is greater than the Oracle default value of 200, and it does not match the value in the auxiliary database, set the db_files parameter on the auxiliary database to the production database value. On the SQL command line, type the following to view the db_files parameter value:
sql> show parameter db_files;
After you set the parameter, shut down and then restart all of the database instances that access the database so that the new value takes effect. This includes all primary and auxiliary databases.
-
On the auxiliary database instance host, edit the init<SID>.ora file and modify the following entries:
Note: This step is optional when you configure an auxiliary instance for the replication feature.
-
The database name, and database file locations.
These parameters redirect the datafiles, temp files, and log files to the auxiliary database instance.
DB_FILE_NAME_CONVERT=('source_of_df_path','dup_of_df_path','source_of_temp_path','dup_of_temp_path',...) LOG_FILE_NAME_CONVERT=('source_of_log_path','dup_of_log_path')
Note: You must restart the Oracle Services on Windows clients.
-
-
Optional: To use the TNS connect string instead of "/" to connect the auxiliary instance. Create a password file.
UNIX
On the command line, go the ORACLE_HOME/dbs directory, and then type the following command:
orapwd file=orapw<SID> password= <password for sys user> entries=<Number of user accounts to permit in the file>
Example
The auxiliary database name is dupdb.
orapwd file=orapwdupdb password= <password for sys user> entries=100
Windows
On the command line, go the ORACLE_HOME\database directory, and then type the following command:
orapwd file=PWD<SID> password= <password for sys user> entries=<Number of user accounts to permit in the file>
Example
The auxiliary database name is testdb1.
orapwd file= PWDtestdb1 password= <password for sys user > entries=100
-
For Windows configurations, create a new Windows service on the auxiliary database host by using the oradim command.
In the example, the PFILE is "C:\app\admin\product\11.2.0\dbhome_1\database\INIThostdb.ORA".
C:> oradim -NEW -SID hostdb -STARTMODE manual -PFILE "C:\app\admin\product\11.2.0\dbhome_1\database\INIThostdb.ORA"
-
Add the auxiliary database instance name in the listener.ora and tnsnames.ora files.
-
Add the production source database name in the tnsnames.ora file on the auxiliary database instance host.
Note: This step is not required when you configure an auxiliary instance for the replication feature.
If the auxiliary database instance host is different from the production database host, add the auxiliary database instance name in the listener.ora file on the auxiliary database instance host and in the tnsnames.ora files on both the auxiliary database instance and production source database hosts.
Example
DUPDB = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = powerpc02)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = dupdb) (UR=A) ) )
-
On the auxiliary database instance host command line, type the command to restart the listener.
$lsnrctl reload
-
On the auxiliary database instance host command line, type the command to put the auxiliary database instance in NOMOUNT mode.
sql> startup nomount;
Example
The following code snippet is an example of a auxiliary server init.<SID>.ora file.
oradb1.__db_cache_size=1426063360
oradb1.__java_pool_size=16777216
oradb1.__large_pool_size=33554432
oradb1.__oracle_base='/home/oracle/oracle'#ORACLE_BASE set from environment
oradb1.__pga_aggregate_target=637534208 oradb1.__sga_target=1895825408
oradb1.__shared_io_pool_size=0
oradb1.__shared_pool_size=402653184
oradb1.__streams_pool_size=0
*.audit_file_dest='/home/oracle/oracle/admin/oradb1/adump'
*.audit_trail='db'
*.compatible='11.2.0.4.0'
*.control_files='/home/oracle/oradb/oradb1/control01.ctl','/home/oracle/oracle/fast_recovery_area/oradb1/control02.ctl'#Restore Controlfile
*.db_block_size=8192
*.db_domain=''
*.db_name='oradb1'
*.db_recovery_file_dest='/home/oracle/oracle/fast_recovery_area'
*.db_recovery_file_dest_size=4385144832
*.diagnostic_dest='/home/oracle/oracle'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=oradb1XDB)'
*.log_archive_format='%t_%s_%r.dbf'
*.open_cursors=300
*.pga_aggregate_target=627048448
*.processes=150
*.remote_login_passwordfile='EXCLUSIVE'
*.sga_target=1881145344
*.undo_tablespace='UNDOTBS1'