You should probably be using the Data Guard Broker to configure and manage your standby database, as described. • • • • • • • • • • • • • • • • • • • • • • • • • Related articles. In short, the failover is the deformation of the production (primary) database and activating standby database as the primary. Read-Only Standby Database. Managed recovery. Remote archiving redo log files. “Zero Data Loss” Integration. Data Guard Broker and Data Guard Manager GUI. Standby Database - Activating. Oracle 11g Standby Database. Then you must activate the standby database without recovering the transactions from the. Oct 02, 2011 Active Standby Database In Oracle. Here we will setup the standby database with active duplicate database. Ranging from 9i,10g,11g on various. • • • • Assumptions • You have two servers (physical or VMs) with an operating system and Oracle installed on them. In this case I've used Oracle Linux 5.6 and Oracle Database 11.2.0.2. • The primary server has a running instance. • The standby server has a software only installation. Primary Server Setup Logging Check that the primary database is in archivelog mode. SELECT log_mode FROM v$database; LOG_MODE ------------ NOARCHIVELOG SQL> If it is noarchivelog mode, switch is to archivelog mode. SHUTDOWN IMMEDIATE; STARTUP MOUNT; ALTER DATABASE ARCHIVELOG; ALTER DATABASE OPEN; Enabled forced logging by issuing the following command. ALTER DATABASE FORCE LOGGING; Initialization Parameters Check the setting for the DB_NAME and DB_UNIQUE_NAME parameters. In this case they are both set to 'DB11G' on the primary database. SQL> show parameter db_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_name string DB11G SQL> show parameter db_unique_name NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ db_unique_name string DB11G SQL> The DB_NAME of the standby database will be the same as that of the primary, but it must have a different DB_UNIQUE_NAME value. The DB_UNIQUE_NAME values of the primary and standby database should be used in the DG_CONFIG setting of the LOG_ARCHIVE_CONFIG parameter. For this example, the standby database will have the value 'DB11G_STBY'. ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(DB11G,DB11G_STBY)'; Set suitable remote archive log destinations. In this case I'm using the fast recovery area for the local location, but you could specify an location explicitly if you prefer. Notice the SERVICE and the DB_UNIQUE_NAME for the remote location reference the standby location. ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=db11g_stby NOAFFIRM ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=DB11G_STBY'; ALTER SYSTEM SET LOG_ARCHIVE_DEST_STATE_2=ENABLE; The LOG_ARCHIVE_FORMAT and LOG_ARCHIVE_MAX_PROCESSES parameters must be set to appropriate values and the REMOTE_LOGIN_PASSWORDFILE must be set to exclusive. ALTER SYSTEM SET LOG_ARCHIVE_FORMAT='%t_%s_%r.arc' SCOPE=SPFILE; ALTER SYSTEM SET LOG_ARCHIVE_MAX_PROCESSES=30; ALTER SYSTEM SET REMOTE_LOGIN_PASSWORDFILE=EXCLUSIVE SCOPE=SPFILE; In addition to the previous setting, it is recommended to make sure the primary is ready to switch roles to become a standby. For that to work properly we need to set the following parameters. Adjust the *_CONVERT parameters to account for your filename and path differences between the servers. ALTER SYSTEM SET FAL_SERVER=DB11G_STBY; --ALTER SYSTEM SET DB_FILE_NAME_CONVERT='DB11G_STBY','DB11G' SCOPE=SPFILE; --ALTER SYSTEM SET LOG_FILE_NAME_CONVERT='DB11G_STBY','DB11G' SCOPE=SPFILE; ALTER SYSTEM SET STANDBY_FILE_MANAGEMENT=AUTO; Remember, some of the parameters are not modifiable, so the database will need to be restarted before they take effect. Service Setup Entries for the primary and standby databases are needed in the '$ORACLE_HOME/network/admin/tnsnames.ora' files on both servers. You can create these using the Network Configuration Utility (netca) or manually. The following entries were used during this setup. DB11G = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ol5-112-dga1)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DB11G.WORLD) ) ) DB11G_STBY = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = ol5-112-dga2)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = DB11G.WORLD) ) ) Backup Primary Database If you are planning to use an active duplicate to create the standby database, then this step is unnecessary. For a backup-based duplicate, or a manual restore, take a backup of the primary database. $ rman target=/ RMAN> BACKUP DATABASE PLUS ARCHIVELOG; Create Standby Controlfile and PFILE Create a controlfile for the standby database by issuing the following command on the primary database. ALTER DATABASE CREATE STANDBY CONTROLFILE AS '/tmp/db11g_stby.ctl'; Create a parameter file for the standby database. ![]() ![]() ![]() ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2018
Categories |