10/24/12

Standby Concepts and Configuration

IMPLEMENTING DATA GUARD (STANDBY)
General Concepts: Components, Roles, Interfaces Architecture Data Guard Protection Modes Physical Standby Implementation with RMAN (Recommended) Physical Standby Implementation Quick Steps for creating the Physical Standby from a Hot backup Logical Standby Implementation with RMAN (Recommended) Logical Standby Implementation Logical Standby Sanity Check Troubleshooting a Logical Standby Logical Standby Database Activation (Role Transition) - Switchover and Failover Suspend Physical Standby Recovery Monitoring Physical Data Guard (Detect Gap) Activate Physical Standby (on Read-Only Mode or PROD Mode) Physical Standby Switchover Steps Physical Standby Failover Steps Implementation Tips Applying Patches with Standby Resolving Problems Synchronize a GAP on the STANDBY when ARCH Logs are lost Improvements in 10g Using Flashback with Data Guard Monitor Data Guard More Information

GENERAL CONCEPTS
Oracle Data Guard is the management, monitoring, and automation software that works with a production database and one or more standby databases to protect data against failures, errors, and corruption that might otherwise destroy your database.

DATA GUARD COMPONENTS
Oracle Data Guard consists of the following components: PRIMARY DATABASE: A primary database is a production database. The primary database is used to create a standby database. Every standby database is associated with one and only one primary database. STANDBY DATABASE: A physical or logical standby database is a database replica created from a backup of a primary database.A Data Guard configuration consists of one production (or primary) database and up to nine standby databases. The databases in a Data Guard configuration are connected by Oracle Net and may be dispersed geographically. There are no restrictions on where the databases are located, provided that they can communicate with each other. A physical standby database is physically identical to the primary database on a block-for-block basis. It's maintained in managed recovery mode to remain current and can be set to read only; archive logs are copied and applied automatically. A logical standby database is logically identical to the primary database. It is updated using SQL statements.The SQL statements are "extracted" from the archive logs and then applied to the Logical Standby. LOG TRANSPORT SERVICES: Enables and controls the automated transfer of redo data within a Data Guard configuration from the primary site to each of its standby sites. Log transport services also controls the level of data protection for your database. The DBA will configure log transport services to balance data protection and availability against database performance. Log transport services will also coordinate with log apply services and role management services for switchover and failover operations. NETWORK CONFIGURATION: The primary database is connected to one or more remote standby database via Oracle Net. LOG APPLY SERVICES: Log apply services apply the archived redo logs to the standby database. DATA GUARD BROKER: Data Guard Broker is the management and monitoring component with which you configure, control, and monitor a fault tolerant system consisting of a primary database protected by one or more standby database. Data Guard can be used in combination with other Oracle High Availability (HA) solutions such as Real Application Clusters (RAC), Oracle Flashback , Oracle Recovery Manager (RMAN), and new database options for Oracle Database 11g that include Oracle Active Data Guard and Oracle Advanced Compression, to provide a high level of data protection,

www.pafumi.net/Standby_Concepts_Configuration.html

1/32

10/24/12

Standby Concepts and Configuration

Fig 1: DATA GUARD GENERAL VIEW

Fig 2: DATA GUARD WITH DETAILS OF PROCESSES

DATA GUARD ROLES
A database can operate in one of the two mutually exclusive roles: primary or standby database. FAILOVER A failover is done when the primary database (all instances of an Oracle RAC primary database) fails or has become unreachable and one of the standby databases is transitioned to take over the primary role. Failover should be performed when the primary database cannot be recovered in a timely manner. Failover may or may not result in data loss depending on the protection mode in effect at the time of the failover. SWITCHOVER A switchover is a role reversal between the primary database and one of its standby databases. A switchover guarantees no data loss and is typically done for planned maintenance of the primary system. During a switchover, the primary database transitions to a standby role, and the standby database transitions to the primary role

DATA GUARD INTERFACES
Oracle provides three ways to manage a Data Guard environment: SQL*PLUS AND SQL STATEMENTS Using SQL*Plus and SQL commands to manage Data Guard environment. The following SQL statement initiates a switchover operation: SQL> alter database commit to switchover to physical standby; DATA GUARD BROKER GUI INTERFACE (DATA GUARD MANAGER) Data Guard Manger is a GUI version of Data Guard broker interface that allows you to automate many of the tasks involved in configuring and monitoring a Data Guard environment. DATA GUARD BROKER COMMAND-LINE INTERFACE (CLI) It is an alternative interface to using the Data Guard Manger. It is useful if you want to use the broker from batch programs or scripts. You can perform most of the activities required to manage and monitor the Data Guard environment using the CLI. The following example lists the available commands:
$dmr ggl Wloet DMR,tp "ep frifrain ecm o GGL ye hl" o nomto.

www.pafumi.net/Standby_Concepts_Configuration.html

2/32

10/24/12

Standby Concepts and Configuration

DMR>hl GGL ep Tefloigcmad aeaalbe h olwn omns r vial: qi ut ei xt so hw Se"epso"frsna e hl hw o ytx eal nbe Se"epeal"frsna e hl nbe o ytx dsbe ial Se"epdsbe frsna e hl ial" o ytx hl ep [cmad] <omn> cnet onc <sr/pswr>[<onc> ue><asod @cnet] atr le Se"epatr frsna e hl le" o ytx cet rae Se"epcet"frsna e hl rae o ytx rmv eoe Se"eprmv"frsna e hl eoe o ytx sicoe wthvr Se"epsicoe"frsna e hl wthvr o ytx fioe alvr Se"epfioe"frsna e hl alvr o ytx satp tru Se"epsatp frsna e hl tru" o ytx sudw hton Se"epsudw"frsna e hl hton o ytx

PROCESS ARCHITECTURE
PHYSICAL STANDBY PROCESSES ARCHITECTURE (APPLY REDO LOGS) A physical standby database is a byte for byte exact copy of the primary database. This also means that rowids stay the same in a physical standby database environment. On the primary database site, the log writer process (LGWR) collects transactions from the log buffer and writes to the online redo logs. The archiver process (ARCH) creates a copy of the online redo logs, and writes to the local archive destination. Depending on the configuration, the archiver process or log writer process can also transmit redo logs to standby database. When using the log writer process, you can specify synchronous or asynchronous network transmission of redo logs to remote destinations. Data Guard achieves asynchronous network I/O using LGWR network server process (LNS). These network severs processes are deployed by LOG_ARCHIVE_DEST_n initialization parameter. Data Guard’s asynchronous log transport (i.e. the Maximum Performance mode) is recommended for a configuration in which the network distance is up to thousands of miles, providing continual maximum performance, while minimizing the risks of transaction loss in the event of a disaster. On the standby database site, the remote file server process (RFS) receives archived redo logs from the primary database. The primary site launches the RFS process during the first log transfer. The redo logs information received by the RFS process can be stored as either standby redo logs or archived redo logs. Data Guard introduces the concept of standby redo logs (separate pool of log file groups). Standby redo logs must be archived by the ARCH process to the standby archived destination before the managed recovery process (MRP) applies redo log information to the standby database. The fetch archive log (FAL) client is the MRP process. The fetch archive log (FAL) server is a foreground process that runs on the primary database and services the fetch archive log requests coming from the FAL client. A separate FAL server is created for each incoming FAL client. FAL_SERVER specifies the FAL (fetch archive log) server for a standby database. The value is an Oracle Net service name, which is assumed to be configured properly on the standby database system to point to the desired FAL server. FAL_CLIENT specifies the FAL (fetch archive log) client name that is used by the FAL service, configured through the FAL_SERVER parameter, to refer to the FAL client. The value is Oracle Net service name, which is assumed to be configured properly on the FAL server system to point to the FAL client (standby database). Thanks to the FAL_CLIENT and FAL_SERVER parameters, the managed-recovery process in the physical database will automatically check and resolve gaps at the time redo is applied. This helps in the sense that you don't need to perform the transfer of those gaps by yourself. FAL_CLIENT and FAL_SERVER only need to be defined in the initialization parameter file for the standby database(s). It is possible; however, to define these two parameters in the initialization parameter for the primary database server to ease the amount of work that would need to be performed if the primary database were required to transition its role. Prior to Oracle 11g, Redo Apply only worked with the standby database in the MOUNT state, preventing queries against the physical standby whilst media recovery was in progress. has changed in Oracle 11g. When using Data Guard Broker (DG_BROKER_START = TRUE), the monitor agent process named Data Guard Broker Monitor (DMON) is running on every site (primary and standby) and maintain a two-way communication.

LOGICAL STANDBY PROCESSES ARCHITECTURE (REDO LOGS CONVERTED TO SQL, CALLED SQL APPLY) The major difference between the logical and physical standby database architectures is in its log apply services. On Logical Standby, you can query it while simultaneously applying transactions from the primary. This is ideal for business that requires a near real-time copy of your production DB for reporting. The key advantage for logical standby databases is that they're opened read/write, even while they're in applied mode. That is, they can be used to generate reports and the like. It is indeed a fully functional database. Also, additional indexes, materialized views and so on can be created. Oracle (or more exactly the log apply services) uses the primary database's redo log, transforms them into SQL statements and replays them on the logical standby database. SQL Apply uses LOGMINER technology to reconstruct DML statements from the redo generated on the primary.
www.pafumi.net/Standby_Concepts_Configuration.html 3/32

10/24/12 Standby Concepts and Configuration The logical standby process (LSP) is the coordinator process for two groups of parallel execution process (PX) that work concurrently to read. The mining and applying process occurs in parallel. for example: log_archive_dest_2='service=testdb_standby LGWR SYNC AFFIRM' Maximum Performance: It is the default protection mode. Logical standby database does not use standby online redo logs. Standby online redo logs are required in this mode. It supports both physical and logical standby databases.pafumi.net/Standby_Concepts_Configuration. the primary database will shut down if a fault prevents it from writing its redo data to at least one remote standby redo log. This protection mode is very similar to maximum protection where a transaction will not commit until the redo data needed to recover that transaction is written to both the local (online) log and to at least one remote standby redo log. can also be used to offload the primary database of the overhead of performing backups. More information HERE . All gaps are resolved by the proactive gap resolution mechanism running on the primary that polls the standby to see if they have a gap. Standby online redo logs required in this mode. while in standby role. This mode is usually configured with at least two standby databases. Redo records are synchronously transmitted from the primary database to the standby database using LGWR process. The log_archive_dest_n parameter needs to have the LGWR ASYNC AFFIRM or NOAFFIRM option. Logical standby database does not have FAL capabilities in Oracle. for example: log_archive_dest_2='service=testdb_standby ARCH NOAFFIRM' or log_archive_dest_2='service=testdb_standby LGWR ASYNC NOAFFIRM' Mode Log Writing Process Network Trans Mode Disk Write Option Redo Log Reception Supported on 4/32 www. the primary database will operate in maximum performance mode until the fault is corrected and all log gaps have been resolved.Snapshot Standby enables a physical standby database to be open read-write for testing or any activity that requires a read-write replica of production data. however. When testing is complete. After all log gaps have been resolved. but not apply. the Snapshot Standby is converted back into a synchronized physical standby database by first discarding the changes made while open read-write. Transaction is not committed on the primary database until it has been confirmed that the transaction data is available on at least one standby database. Specifically: . DATA PROTECTION MODES Maximum Protection: It offers the highest level of data availability for the primary database. for example: log_archive_dest_2='service=testdb_standby LGWR SYNC AFFIRM' Maximum Availability: Provides the highest level of data protection that is possible without affecting the availability of the primary database. backups. It offers slightly less primary database protection than maximum availability mode but with higher performance. The log_archive_dest_n parameter needs to have the LGWR SYNC AFFIRM option.html . prepare. the primary database continues its transaction processing without regard to data availability on any standby databases and there is little or no effect on performance. This protection mode supports both physical and logical standby databases. In addition to data protection and availability. or test activity. Data Guard standby databases deliver high return on investment by supporting ad-hoc queries. reporting.The Active Data Guard option (Oracle Database 11g) enables a physical standby database to be used for read-only applications while simultaneously receiving updates from the primary database. More information HERE . and apply completed SQL transactions from the archived redo logs sent from the primary database. When operating in this mode. In order to guarantee no loss of data can occur. The first group of PX processes read log files and extract the SQL statements by using LogMiner technology. An Active Data Guard standby database is unique compared to other physical replication methods in its ability to guarantee the same level of read consistency as the primary database while replication is active. Therefore. Primary data is protected at all times. Instead. The log_archive_dest_n parameter needs to have the LGWR SYNC AFFIRM option. logical standby database cannot participate in a maximum protection configuration. Redo records are synchronously transmitted from the primary database to the standby database using LGWR process. because it is an exact replica of the primary database. the primary database automatically resumes operating in maximum availability mode.A physical standby database. All recovery operations are interchangeable between primary and Data Guard physical standby databases. the redo data needed to recover each transaction must be written to both the local (online) redo log and to a standby redo log on at least one standby database before the transaction can be committed. and then applying the redo received from the primary database. Redo logs are asynchronously shipped from the primary database to the standby database using either LGWR or ARCH process. updates generated by the primary. In order to provide this level of protection. A Snapshot Standby continues to receive. the second group of PX processes apply these extracted SQL transactions to the logical standby database. the primary database will not shut down if a fault prevents it from writing its redo data to a remote standby redo log. Unlike maximum protection mode. build. Queries executed on an active standby database return up-to-date results.

Signal commit success to the application only after acknowledgement is received from a standby database that redo for that transaction is hardened to disk.net/Standby_Concepts_Configuration. PERFORMANCE is the default. A transaction will commit to the primary before all redo entries are written to any standby database. The protection mode can be found by executing this query.---------SB TY MXMMPROMNE MXMMPROMNE AIU EFRAC AIU EFRAC -No Data Loss Mode. Specifies the maximum number of seconds between each log switch. the performance impact was less than 3% in all synchronous tests. With a single remote archive destination. Unlike PROTECTION mode. this mode simply lowers the protection mode to PERFORMANCE until the error is corrected. protection_mode. probably because I have two standby databases. • The ARCHIVE_LAG_TARGET parameter could be used to increase the frequency of log switches. SYNC transport is required and this option is available to both logical and physical standby type databases. ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY. • AFFIRM assures that archive logs are written to disk. -Minimal Data Loss. • Using ARCH instead of LGWR for the second standby database may help primary database performance but smaller sized log files would probably be required. . SYNC=PARALLEL applies to LGWR only. thus sending less data to the standby databases more often. • DELAY is in minutes and does not stop the copy of an archive log file to a standby server but the application of redo on the standby after copying the archive log to the standby. The default on my machine appears to be 2 and not 1 as stated in the manuals. This should only apply to the primary database. PERFORMANCE mode is the default setting and available for both physical and logical standby type databases. SELECT name. • REOPEN=30 means that there will be a 30 second delay until LGWR process try again on a MANDATORY destination which failed. To ensure that minimal data loss will be encountered execute this command on the primary database. Using ARCH waits for a switch on the primary. Increase the value of the LOG_ARCHIVE_MAX_PROCESSES parameter to start additional archiver processes. The PROTECTION mode applies only to physical standby databases. which shuts down the primary database in the event of failure to redo entries to the standby.------------. • MANDATORY assures that redo logs are not overwritten until archive logs are successfully created. Using Data Guard Redo Apply in a LAN the following is recommended: • Use Maximum Protection or Maximum Availability modes for zero data loss.10/24/12 Standby Concepts and Configuration Option Maximum Protection Zero data loss Double failure protection LGWR SYNC AFFIRM Standby redo logs are required Physical standby databases. protection_level FROM v$database. so it will force a log switch when that number in seconds is reached. Physical and logical standby databases. LGWR copies entries to a standby archive log. The database must be in mounted exclusive mode to execute this command. using LGWR SYNC and will shutdown the primary database if no standby database can be written to. ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE { PROTECTION | AVAILABILITY | PERFORMANCE }. The AVAILABILITY mode prevents a transaction committing on the primary until all redo entries are written to at least one standby database. This will not help primary database performance.pafumi. Terms or Options to know These can be found in the Oracle documentation in Chapter 5 of the Data Guard Concepts and Administration Manual. www. LGWR is more efficient since it writes redo entries to all standby databases at once but a primary and two standby databases could possibly cause a performance issue for the primary database. Used on Physical Implementation Only. NM AE POETO_OE RTCINMD POETO_EE RTCINLVL --------------. ARCH will copy and apply at switch.html 5/32 . Signal commit success to the application only after acknowledgement is received from a standby database or after NET_TIMEOUT threshold period expires – whichever occurs first Physical and logical standby databases. possibly but unlikely! Additionally multiple archiver processes can be created on the primary database. Primary never waits for standby acknowledgment to signal commit success to the application Maximum Availability Zero data loss Single failure protection LGWR SYNC AFFIRM Standby redo logs Maximum Performance Potential for minimal data loss LGWR or ARCH ASYNC NOAFFIRM Standby redo logs Setting the Level of Protection This is achieved by using the following command syntax executed on the primary database.---------. applied only at switch. primary or standby.No Data Divergence.

but we will set dg_broker_start to true. One primary database instance called FGUARD on host server_01. • For very good performance and a minimal risk of transaction loss in the event of a disaster. With the ARCH transport. use remote archiving (i. For RTT’s of 10ms or less. The gain in performance is a result of the reduced number of system calls required to pass the data from Oracle Net buffers to the operating system TCP network layer. the redo log reception option is archived logs. different network RTT’s were simulated during testing to measure the impact of the RTT on the primary database performance.ora file. The 10 MB async buffer outperformed smaller buffer sizes and reduced the chance of network timeout errors in a high latency / low bandwidth network. especially with the ARCH transport. the network RTT overhead over a WAN can impact response time and throughput of the primary database. Listener listener is on host server2. Listener listener is on host server1. 10 ms.e. Metropolitan and Wide Area Network (WAN) Data Guard is used across a metropolitan area networks (MAN) or WANs to get complete disaster recovery protection. 50 ms. only local archive destination (log_archive_dest_1) is set to mandatory. please check the following LINK The following example shows how to set up Data Guard MANUALLY in this given environment: 1. The 10 MB async buffer outperformed smaller buffer sizes and reduced the chance of network timeout errors in a high latency / low bandwidth network. and pointed by TNS entry FGUARD. This also eliminated network timeout errors. the ARCH transport log transfer time was increased when using SSH with compression. and pointed by TNS entry FGUARD 4. with LGWR ASYNC and a 10 MB async buffer (ASYNC=20480). The protection mode is set to best performance. the standby archive destination (log_archive_dest_2) is set to optional for LGWR process. This is specially true for WAN environment. Using SSH port forwarding with compression reduced the network traffic by 23-60% at a 3-6% increase in CPU usage. the ARCH process as the log transport). Therefore. disable the TCP Nagle algorithm by setting TCP. use Maximum Performance mode. For the MAN/WAN tests. 8. and for FAL process to fetch redo logs from the primary site.NODELAY to YES in the SQLNET. Best practices recommendations are: • Use Maximum Protection and Maximum Availability modes over a MAN for zero data loss. 7. Do not use SSH with compression for Maximum Protection and Maximum Availability modes since it adversely affected the primary throughput. or SDU can be set for all Oracle Net connections with the profile parameter DEFAULT_SDU_SIZE in the sqlnet. 3. This can improve transfer time to the standby by as much as 10 times.10/24/12 Standby Concepts and Configuration use the NOPARALLEL option (“lgwr sync=noparallel”). LGWR ASYNC performance degraded no more than 1% as compared to using the ARCH transport. The production database name is FGUARD 2.ora).pafumi. This configuration is best used when network bandwidth is limited and when your applications can risk some transaction loss in the event of a disaster. using SSH also reduced the log transfer time for RTT’s of 50 ms or greater. • For very good performance and a minimal risk of transaction loss in the event of a disaster.html 6/32 . Oracle internal testing of Oracle Data Guard has demonstrated that the maximum setting of 32767 performs best. with LGWR ASYNC and a 10 MB async buffer (ASYNC=20480). The performance impact was less than 6% with a 10 ms network RTT and a high transaction rate. • If you have sufficient memory. We will be implementing the configuration manually. 6. • Use SSH port forwarding with compression for WAN’s with a large RTT when using maximum performance mode. Best Practices for Network Configuration and Highest Network Redo Rates • Set SDU=32768 (32K) for the Oracle Net connections between the primary and standby.net/Standby_Concepts_Configuration. Therefore. • Ensure TCP. tests using Secure Shell (SSH) port forwarding with compression were also done for different RTT’s. The tests were conducted for the following RTT’s: 2 ms (MAN).ora) and the listener configuration file (listener.ORA file on both the primary and standby systems. LGWR ASYNC also bounds the risk of potential transaction loss much better than the ARCH transport. so Data Guard broker can be used later. SDU can be set on a per connection basis with the SDU parameter in the local naming configuration file (tnsnames. For these modes. one physical standby database instance called FGUARD on host server_02. then set the TCP send and receive buffer sizes (these affect the advertised TCP window sizes) to the bandwidth delay product. use Maximum Performance mode. with network transmission method of asynchronous and disk write option of no affirm. PHYSICAL STANDBY IMPLEMENTATION NOTE = If you want to use the new way to setup Data Guard with RMAN. Typically a MAN covers a large metropolitan area and has network Round-Trip-Times (RTT) from 2-10 ms. the bandwidth times the network round trip time. The standby site is not using standby online redo logs. Section 1: Site Information Primary Site: Database Name: FGUARD Primary Server : server_01 Primary Instance Name: FGUARD Primary Listener: LISTENER Recovery Database: DR_FGUARD Standby Site: Database Name: FGUARD Standby Server: server_02 Standby Instance name: FGUARD Standby Listener: LISTENER www. SDU designates the size of the Oracle Net buffer used to collect data before it is delivered to the TCP network layer for transmission across the network. The purpose of TNS entry FGUARD and FGUARD are used for LGWR/ARCH process to ship redo logs to the standby site. and 100 ms (WAN) Additionally.NODELAY is YES To preempt delays in buffer flushing in the TCP protocol stack. Setting the Oracle network services session data unit (SDU) to its maximum setting of 32K resulted in a 5% throughput improvement over the default setting of 2048 (2K) for LGWR ASYNC transport services and a 10% improvement for the LGWR SYNC transport service. • For optimal primary database performance throughput. 5. LGWR SYNC performance degraded no more than 2% as compared to remote archiving.

d_rkrsat gboe_tr =tu re New Ones srienms=GAD evc_ae FUR isac_ae=GAD ntnenm FUR lgaciecni=d_ofg(GADD_GAD" ->hsprmtri rqie b teDt GadBoe o_rhv_ofg"gcni=FUR.\ls_eoeyae\GADACIEO ai_o=ALLGIE.RFUR) -Ti aaee s eurd y h aa ur rkr lgaciemxpoess5 o_rhv_a_rcse= lgacieds_=lcto=:oal\rdc\010fahrcvr_raPIAYACIEO vldfr(L_OFLSALRLS o_rhv_et1'oainD\rcepout1. control is not returned to the executing application or user until the redo information is received by the standby site (this can have impact on the performance as mentioned).2.0:Y FGUARD:/u01/app/oracle/product/11. www.net/Standby_Concepts_Configuration..r ti B sd n nnmsoa lgacieds_ o_rhv_et1 ='OAIN/0/rhPO MNAOY LCTO=u2ac/RD ADTR' #oa Lcto o AcieLgFls Lcl oain f rhv o ie lgacieds_ o_rhv_et2 ='EVC=RFUR roe=0 SRIED_GAD epn6' #eoeSrieNm bsdo tsae.T' lgaciecni=d_ofg(GADD_GAD" ->hsprmtri rqie b teDt GadBoe o_rhv_ofg"gcni=FUR.Specifies the location of datafiles on standby database.2..'/disk1/oracle/oradata/payroll/standby/') or db_file_name_convert=('/PROD2/'.'/PROD') DB_FILE_NAME_CONVERT .\ls_eoeyae\RMR\RHVLG ai_o=ALLGIE.nwycetdtbepcsdtflsms b cetdmnal o tesadyevrnet I uo el rae alsae/aaie ut e rae auly n h tnb niomn.RFUR) -Ti aaee s eurd y h aa ur rkr lgaciemxpoess5 o_rhv_a_rcse= lgacieds_=lcto=:oal\rdc\010fahrcvr_raFUR\RHVLGvldfr(L_OFLSALRLS o_rhv_et1'oainD\rcepout1.r ti B sd n nnmsoa lgacieds_ o_rhv_et1 ='OAIN/rceac MNAOY #hsprmtrsol awy cicd wt tesadyacieds prmtr LCTO=oal/rh ADTR' Ti aaee hud las onie ih h tnb_rhv_et aaee lgacieds_tt_ ='nbe o_rhv_etsae1 eal' #o_rhv_et2 lgacieds_ ='EVC=RDFUR roe=0 SRIEPO_GAD epn6' #o_rhv_etsae2='nbe lgacieds_tt_ eal' lgaciefra o_rhv_omt ='rhttssdf ac_%_%.ora file: d_ae bnm =FUR GAD d_nqenm buiu_ae =D_GAD ->MS B DFEETFO PIAYST RFUR . The NO DATA LOSS situation demands the SYNC mode.'/disk1/oracle/oradata/payroll/standby/') or log_file_name_convert=('/PROD2/'.b' lgaciesat o_rhv_tr =tu re (o ue o 1g nt sd n 0) sadyacieds tnb_rhv_et ='oal/rh /rceac' sadyfl_aaeet =AT' tnb_iemngmn 'UO #fat.pafumi.r RFUR PO B sd n nnmsoa #a_let flcin =FUR GAD #hsD ue o tsae.RMR_OE D_NQENM=GAD o_rhv_et2 srieFUR GR YC FIM ai_o=OLN_OFLSPIAYRL) BUIU_AEFUR' sadyacieds=:oal\rdc\010fahrcvr_raPIAYACIEO tnb_rhv_etD\rcepout1.r Rmt evc ae ae n nnmsoa lgacieds_tt_ ='nbe o_rhv_etsae1 eal' lgacieds_tt_ ='nbe o_rhv_etsae2 eal' lgaciefra o_rhv_omt ='rhttssdf ac_%_%.\ls_eoeyae\RMR\RHVLG Optional parameters: log_archive_dest_2='service=stby lgwr sync affirm mandatory reopen=180' LOG_ARCHIVE_DEST_2 ..'/PROD') log_file_name_convert=('/disk1/oracle/oradata/payroll/'.ora file: acielgtre =10 #pcfe hwotni scnsw wl freasic lg rhv_a_agt 80 seiis o fe n eod e il oc wth o d_ae bnm =FUR GAD d_nqenm buiu_ae =FUR GAD #a_evr flsre =D_GAD #RDD ue o tsae.UT E IFRN RM RMR IE flsre a_evr =PO_GAD #RDD ue o tsae.. due to network traffic it is advised to use LGWR for at most one remote destination.L_OE) d_nqenm=GAD buiu_aeFUR' lgacieds_='evc=tnb LW SN AFR vldfr(NIELGIE.The two arguments that this parameter needs are: location of datafiles on primary database .L_OE) d_nqenm=RFUR' buiu_aeD_GAD lgacieds_='evc=GADLW SN AFR vldfr(NIELGIE.r RDFUR PO B sd n nnmsoa flcin a_let =FUR GAD #hsD ue o tsae.0:N Section 3: Parameter file Primary init.10/24/12 Standby Concepts and Configuration Production DB: PROD_FGUARD Section 2: Oratab /etc/oratab entry: Primary Site: Standby Site: FGUARD:/u01/app/oracle/product/11.ora on primary database). Also the network transmission mode (SYNC or ASYNC) has to be specified in case primary database modifications are propagated by the LGWR.Specifies the net service name of the standby database (check tnsnames.html 7/32 .b' lgaciesat o_rhv_tr =tu re (o ue o 1g nt sd n 0) sadyacieds tnb_rhv_et ='oal/rh /rceac' #Ti prmtrsol awy cicd wt telgacieds_ prmtr #hs aaee hud las onie ih h o_rhv_et1 aaee sadyfl_aaeet =AT' tnb_iemngmn 'UO d_rkrsat gboe_tr =tu re New Ones srienms'RFUR' evc_ae=D_GAD isac_aeD_GAD ntnenm=RFUR cnrlfls':oaaaPIAYSDYCL oto_ie=D\rdt\RMR_TB.RMR_OE D_NQENM=RFUR' o_rhv_et2 sriesady GR YC FIM ai_o=OLN_OFLSPIAYRL) BUIU_AED_GAD sadyacieds=:oal\rdc\010fahrcvr_raPIAYACIEO tnb_rhv_etD\rcepout1.\ls_eoeyae\RMR\RHVLG Optional Parameters: db_file_name_convert=('/disk1/oracle/oradata/payroll/'.You can either per destination use LGWR or ARCH or both. Standby init.

BTS YE --------5480 2280 5480 2280 5480 2280 The following syntax is used to create standby redo logs: SL atrdtbs adsadylgieGOP4sz 5m Q> le aaae d tnb ofl RU ie 0. enable it using the following. even if the standby database is not in ARCHIVELOG mode.1 for the location of the datafiles on the primary database. www.ora file Primary Site: FGUARD = (DESCRIPT ION = (ADDRESS_LIST = (ADDRESS = (PROT OCOL = T CP)(HOST = se rve r1)(PORT = 1521)) ) (CONNECT _DAT A = (SERVER = DEDICAT ED) (SERVICE_NAME = FGUARD) ) ) DR_FGUARD = (DESCRIPT ION = (ADDRESS_LIST = (ADDRESS = (PROT OCOL = T CP)(HOST = se rve r2)(PORT = 1521)) ) (CONNECT _DAT A = (SERVER = DEDICAT ED) (SERVICE_NAME = FGUARD) ) ) Standby Site: FGUARD= (DESCRIPT ION = (ADDRESS_LIST = (ADDRESS = (PROT OCOL = T CP)(HOST = se rve r2)(PORT = 1521)) ) (CONNECT _DAT A = (SERVER = DEDICAT ED) (SERVICE_NAME = FGUARD) ) ) PRO D_FGUARD = (DESCRIPT ION = (ADDRESS_LIST = (ADDRESS = (PROT OCOL = T CP)(HOST = se rve r1)(PORT = 1521)) ) (CONNECT _DAT A = (SERVER = DEDICAT ED) (SID = FGUARD) ) ) STEPS TO SET UP A PHYSICAL DATA GUARD ENVIRONMENT The following steps show how to set up a Physical Data Guard environment: STEP 1: THE PREPARATION . The standby archival operation occurs automatically.pafumi. Instant. See Section 3.--. Used on Physical Implementation ONLY. SL atrdtbs adsadylgieGOP5sz 5m Q> le aaae d tnb ofl RU ie 0. This parameter will convert the filename of the primary database log to the filenames of the standby log.2.net/Standby_Concepts_Configuration. Create standby redo log files (recommended): Standby redo logs are necessary for the higher protection levels such as Guaranteed. le ytm e o_rhv_omt ac_%_%. the archiver process must be started on the standby database. atrdtbs frelgig le aaae oc ogn.Enable Forced Logging.o N O 3 OLN /xothm/rcetm/rcedt/eo3lg NIE epr/oeoal/epoal/aard0. Standby redo logs are not necessary if you are using the delayed protection mode. If the standby database is on the same system as the primary database or if the directory structure where the logs are located on the standby site is different from the primary site then this parameter is required. They must also be exactly the same size. This enables no data loss solutions and reduces the amount of data loss in the event of failure. le ytm e o_rhv_et1 LCTO=oal/rh ADTR' cp=oh atrsse stlgacieds_tt_ ='nbe soebt.--.o N O slc btsfo vlg eet ye rm $o. rhv o it . However. First. le aaae pn acielgls. and Rapid.html 8/32 . location of redo logfiles on standby database. In these protection modes LGWR from the Primary host writes transactions directly to the standby redo logs.The two arguments that this parameter needs are: location of redo logfiles on primary database . you will need to define the following instance variables: atrsse stlgacieds_ ='OAIN/rceac MNAOY soebt. satpmut tru on. GOP RU# SAU TP TTS YE MME EBR I_ S ----.------------------------------------------. Section 4: Listener.Ensure primary database is in ARCHIVELOG mode If Archive Log Mode is not enabled for your primary database. LOG_FILE_NAME_CONVERT . configuring the standby redo logs on the primary database is recommended in preparation for an eventual switchover operation Standby redo logs must be archived before the data can be applied to the standby database.1 OLN /xothm/rcetm/rcedt/eo1lg NIE epr/oeoal/epoal/aard0. le ytm e o_rhv_etsae1 eal' cp=oh atrsse stlgaciefra ='rhttssdf soebt. le aaae rhvlg atrdtbs oe.-----. If the standby database is on the same system as the primary database or if the directory structure where the datafiles are located on the standby site is different from the primary site then this parameter is required.----------------------------------.b' cp=oh sudw imdae hton meit.o N O 2 OLN /xothm/rcetm/rcedt/eo2lg NIE epr/oeoal/epoal/aard0.Specifies the location of redo logfiles on standby database. force logging takes precedence and all operations are logged into the redo logs. This parameter will convert the filename of the primary database datafiles to the filename of the standby datafile filenames. This option ensures that even in the event that a 'nologging' operation is done. Used Physical Implementation ONLY. Even though the standby redo logs are not used when the database is running in the primary role. atrdtbs acieo. Note that the use of the archiver process (performed by the LGWR process) is a requirement for selection of a standby redo log You must have the same number of standby redo logs on the standby as you have online redo logs on production. If you configure standby redo on the standby then you should also configure standby redo logs on the primary database.10/24/12 Standby Concepts and Configuration location of datafiles on standby database. slc *fo vlgie eet rm $ofl.

ora on the standby host to have fal_server and fal_client use the aliases when standby is running on the Primary host. use the ORADIM utility to create a Windows Service and password file. slc *fo vlgie eet rm $ofl. If you need to generate a password file perform the following: c $RCEHM/b d OAL_OEds oaw fl=rpFUR pswr=rcefreyinrcs= rpd ieoawGAD asodoal oc= goeaey If needed perform the following on the other system: chmod 6751 orapwSID · Ptalo te o tecretpae u l f hm n h orc lcs STEP 5: START THE LISTENERS ON BOTH PRIMARY AND STANDBY SITE · If the standby system is running on a Windows-based system.----------------------------------.1 for further information.------------------------------------------. The sys password must be identical on both sites.-. · Setup the tnsnames. or the standby database is on a separate site with a different directory structure the you must rename the primary datafiles in the standby control file after copying them to the standby site.--------------------------------4 UASGE 0 NSIND 0 5480 52 YSUASGE 00 2280 1 E NSIND 5 UASGE 0 NSIND 0 5480 52 YSUASGE 00 2280 1 E NSIND 6 UASGE 0 NSIND 0 5480 52 YSUASGE 00 2280 1 E NSIND · Setup the init. redo log files and archived redo logs to the standby site. $c /0/rdt/rd*/rceBKP p u2oaaapo/ oal/CU or stpgs500lns10ha ofvr offuhoft of e ae 00 ie 2 ed f ei f ls f i f slc 'p'| fl_ae| '/rceBKP fo dadt_ie eet c | ienm | oal/CU' rm b_aafls UIN NO slc 'p'| fl_ae| '/rceBKP fo datm_ie eet c | ienm | oal/CU' rm b_epfls UIN NO slc 'p'| mme | '/rceBKP fo vlgie eet c | ebr | oal/CU' rm $ofl.----.-------------------------------------------. Note here that the Primary init.ora file for both primary and standby databases.net/Standby_Concepts_Configuration. STEP 4: TRANSFER THE DATAFILES AND STANDBY CONTROL FILE TO THE STANDBY SITE · · Transfer the backuped datafiles.ora files. For example: WINNT> oradim -NEW -SID databaseid -INTPWD password -STARTMODE manual Start the the listener on the primary and standby database $lnclsat srt tr · STEP 6: START THE STANDBY DATABASE (PRIMARY DATABASE ALREADY RUNNING) · Set the correct Oracle environment and copy all the files to each location If the standby is on a separate site with the same directory structure as the primary database then you can use the same path names for the standby files as the primary files.o N O 2 OLN /xothm/rcetm/rcedt/eo2lg NIE epr/oeoal/epoal/aard0. If the directory structure is not the same then setting of these parameters is recommended.1 and 47343.1 OLN /xothm/rcetm/rcedt/eo1lg NIE epr/oeoal/epoal/aard0. (see section 3) NOTE: In the above example db_file_name_convert and log_file_name_convert are not needed as the directory structure on the two hosts are the same. This is a key pre requisite in order to be able to ship and apply archived logs from Primary to Standby.--------------.t evr:u1apoal/di/GADclcnrl1cl · Also copy the orapwd file and init. STEP 3: CREATE THE PHYSICAL STANDBY DATABASE CONTROL FILE · Startup the Primary database and issue the following command to create the standby control file (it must be done AFTER the backup): SL atrdtbs cet sadycnrliea 'oal/CU/tnb.o N O 3 OLN /xothm/rcetm/rcedt/eo3lg NIE epr/oeoal/epoal/aard0.--. You must modify the Standby init.b TNB epr/oeoal/epoal/aasadyeo1df N O 5 SADY/xothm/rcetm/rcedt/tnbrd0. $rp /rceBKP*sre2/0/rdt/GAD c oal/CU/ evr:u2oaaaFUR Transfer the standby control file to the standby site $rp /rceBKPsadyclsre2/0/p/rceamnFUR/t/oto0. GOP RU# DI BD TRA#SQEC# BTS HED EUNE YE UE ACSAU FRTCAG#FRTTMLS_HNE LS_IE SD R TTS IS_HNE IS_I ATCAG# ATTM ---.----.ora file for both primary and standby databases.b TNB epr/oeoal/epoal/aasadyeo1df N O slc *fo vsadylg eet rm $tnb_o. This can be done using the db_file_name_convert and log_file_name_convert parameters or by manually using the alter www. A backup of the online redo logs is necessary to facilitate switchover.--.b TNB epr/oeoal/epoal/aasadyeo1df N O 6 SADY/xothm/rcetm/rcedt/tnbrd0.-----. Backup the primary database datafiles and online redo logs.pafumi.t c oal/CU/tnb. (see section 4) STEP 2: BACKUP THE PRIMARY DATABASE DATAFILES · · Shut down the primary database. Please reference ML notes 47325. GOP RU# SAU TP TTS YE MME EBR I_ S ----.ora on the Standby host to have log_archive_dest_2 use the alias that points to the Primary host.---.o N O 4 SADY/xothm/rcetm/rcedt/tnbrd0.html 9/32 .10/24/12 Standby Concepts and Configuration SL atrdtbs adsadylgieGOP6sz 5m Q> le aaae d tnb ofl RU ie 0. NOTE: The controlfile must be created after the last time stamp for the backup datafiles. you do not have to rename the primary datafiles in the standby control file.t' Q> le aaae rae tnb otofl s /rceBKPsadycl. A password file must be created on the Primary and copied over to the Standby site. If the standby is on the same site as the primary database. In this way.ora and listener.--.

SQEC#ACIE APID EUNE RHVD PLE ----.--15YS 1 E YS E 16YS 1 E YS E Quick Steps for Creating the Physical Standby from Hot Backup At PROD Site put proper values on the primary db using "alter system set.arc GAD Monitor the managed recovery. If the directory structure is not the same then reference notes 47325.. you MUST use A T R D T B S R N M F L < l n m > T < e n m >after the standby database is mounted. by default. nm aca28) tae vrhr(0. you MUST use A T R D T B S R N M F L < l n m > T < e n m >after the standby database is mounted to rename the database LE AAAE EAE IE odae O nwae files and redo log files. slc poes sau. when an online redo log becomes full.t · · · Connect as sysdba.net/Standby_Concepts_Configuration.t u5apoaaaFUR/oto0. · Verify that the new archived redo log was applied From the standby database. A log switch occurs.nx_ie eet eune. archiving of redo logs to the remote standby location do not occur until after a log switch. Bring the database in nomount mode first. If you decided to rename them manually.. is_ie ettm fo vacie_o odrb sqec# rm $rhvdlg re y eune. SL atrsse sic lgie Q> le ytm wth ofl. alter system switch logfile. or slc sqec# frttm.tra# sqec# bok. atrdtbs rcvrmngdsadydtbs dsonc fo ssin le aaae eoe aae tnb aaae icnet rm eso..bok eet rcs.10/24/12 Standby Concepts and Configuration database statements. le aaae on tnb aaae If you decided to rename the database files manually.pafumi. Issue a few log switches on the primary database.t u3apoaaaFUR/oto0. cet sfl fo pie rae pie rm fl. rhvd ple fo vacie_o odrb sqec# rm $rhvdlg re y eune.t $c sadycl/0/p/rdt/GADcnrl2cl p tnb.q po obcussl dcae elr fae vrhr(0. tts hed. alter system archive log current. nm aca28) tae vrhr(0. If needed. copy the Standby Controlfile that your created FROM the production DB to the appropiate location on the standby DB according your init..html 10/32 .1 for further information. Maximum Performance. slc sqec# acie.q i uc_o_akpsl stsreotu o e evrupt n sthaigof e edn f stfebc of e edak f Stvrf of e eiy f acp dsiainpop 'ne dsiain(ie/oedaui):' cet etnto rmt Etr etnto lk hm/pfm/ StTrotof e emu f solhtakp.. Mount the standby database. eune.---. atrdtbs mutsadydtbs. perform hot backup v QikHtBcu. lc# lcs fo rm vmngdsady $aae_tnb. Media Recovery Log /u02/arch/F U R /prod_1482. o r SL atrsse acielgcret Q> le ytm rhv o urn. query the V$ARCHIVED_LOG view to verify the archived redo log was applied. " create pfile from spfile. · · · Confirm the log files received on the standby archive destination..-------.apid eet eune. NOTE: The example includes the D S O N C F O S S I Noption so that log apply services run in a background session.ora file $c d $c sadycl/0/p/rdt/GADcnrl1cl p tnb. satpnmut tru oon. nm1 aca28) www.t u4apoaaaFUR/oto0.1 and 47343. Check the standby alert log file to see if the new logs have applied to the standby database.t $c sadycl/0/p/rdt/GADcnrl3cl p tnb. ICNET RM ESO STEP 8: MONITOR THE LOG TRANSPORT SERVICES AND LOG APPLY SERVICES · With the protection mode we are using.---. LE AAAE EAE IE odae O nwae STEP 7: PLACE THE STANDBY DATABASE IN MANAGED RECOVERY MODE · Issue the following command to bring the standby database in managed recover mode (start log apply services).

Z oracle@10.10.If needed. alter system archive log current...) dm_uptptln(atrdtbs bcu cnrliet '|CR3)|'&etnto'| 'cnrl'| bsotu.ora to proper locations .10:/home/oracle/DBA_SCRIPTS/BCKP -.t $c sadycl/0/p/rdt/GADcnrl3cl p tnb.10:/home/oracle/DBA_SCRIPTS/BCKP . .dm_uptptln(!p/rceoal7apoal/di/I/RHV/. ls u1 edi.ctl'.IENM.u_ie'c oal/rce/p/rceamnDEACIE*ac |' &etnto'.r '| &dsiain) . / solof po f sthaigo e edn n stfebc o e edak n stsreotu of e evrupt f . $aaie wee bfl#=dfl# hr .dbf / o e d a u i hm/pfm scp ARCH*.nbe300. eet usrbsau.t u4apoaaaFUR/oto0.10.ie . bsotu... bgn ei dm_upteal(20) bsotu. b_aafls . ls u1 dm_uptptln(atrsse sic lgie'.ora..y.0 aaie fo vbcu b dadt_ie f vdtfl d rm $akp . dm_uptptln(solof) bsotu.bin files to standby DB scp standby.10/24/12 Standby Concepts and Configuration ax u vrhr(0) aca210. hm/pfm/ alter database backup controlfile to trace.x'. . ..t $c sadycl/0/p/rdt/GADcnrl2cl p tnb.10.nm. copy the Standby Controlfile that your created FROM the production DB to the appropiate location on the standby DB according your init.u_ie'le alsae |tae|' n akp'.0 tts sbt(. n op dm_uptptln(atrtbepc '|nm1| edbcu.ienm fo vdtfl. dm_uptptln(atrtbepc '|nm|'bgnbcu. dm_uptptln(atrtbepc '|nm|'bgnbcu.t u3apoaaaFUR/oto0.10.5 T_ae usrfTBEPC_AE11) sNm. wiecr%ON lo hl u1FUD op i tae ! taete f nm1 = nm hn dm_uptptln(atrtbepc '|nm1| edbcu.html 11/32 .transfer LATEST ARCH Log Files alter system switch logfile.AE .. pn u1 fthcr it taefae ec u1 no nm.pafumi. edi.) bsotu.r a e u rm h qpu rmt .sqlplus "/ as sysdba" alter database create standby controlfile as '/ o e d a u i standby.AE15)Dtfl usrdNM.10.u_ie'po obcustt) i cr%SPN f u1IOE te hn coecr.Copy compressed files to standby site scp CC_*. bsotu.htakp @uc_o_akpsl QikHtBcu. bsotu.o cnb rnfo tesllspop. dm_uptptln(solhtakp.neakUcmet h olwn ie o u h cit ..ctl oracle@10.DMYYH2MS'| H(9 |.net/Standby_Concepts_Configuration. tae : tae nm1 = nm.u_ie'le alsae |tae| ei akp'.ALSAENM. .ie ad dNM =fFL_AE n ..ctl and *.transfer init.) dm_uptptln(RM **Cp Ls fl fo uup** ) bsotu. edlo. fthcr it taefae ec u1 no nm.dbf oracle@10. oca(ydt.u_ie'le alsae |tae| ei akp'..t www.10:/home/oracle/DBA_SCRIPTS/BCKP At standby site: .u_ie'E * oy at ie rm dm *' .u_ie'le alsae |tae|' n akp'.@obcus .. n f oe cr.| t_hrssae'DMYYH4IS)|CR3)|''.Copy *..nm. passwd and ctrlfile.) bsotu. tae : tae nm1 = nm.u_ie'le ytm wth ofl.u_ie'le aaae akp otofl o | H(9| &dsiain | /oto.bsotu.b_aafls rm $aaiessdadt_ie weeealdlk 'WIE' hr nbe ie %RT% adfl#=fl_d n ie iei odrb 1 re y . n f dm_uptptln(!p'|nm|'&dsiain) bsotu.tts11)sau. sbt(.t u5apoaaaFUR/oto0. .u_ie'c |fae| &etnto'. cro cr i usr u1 s slc tbepc_aefl_ae eet alsaenm.u_ie'po f'. dm_uptptln(atrdtbs bcu cnrliet tae'.) bsotu.. cd to arch location cp ARCH*..ora file $c d $c sadycl/0/p/rdt/GADcnrl1cl p tnb... ed n. standby.q @obcus htakp -Yucncekyu bcu sau wt: -o a hc or akp tts ih slc sbt(. *log.Urmr/nomn tefloigln t rntesrp ..Compress files .dbf.u_ie'sep 0) . coecr.10.u_ie'le aaae akp otofl o rc.) bsotu. bsotu.) dm_uptptln(!le 1'...

contrl file. log apply services will exclude the tables from the logical standby database: SLC DSIC ONRTBENM FO DALGTB_NUPRE EET ITNT WE. Oracle uses primary-key or unique-key supplemental logging to logically identify a modified row in the logical standby database. then the primary key is logged as part of the UPDATE statement to identify the modified row. you can safely ingore it.'/data/oradata/FGUARD/') . In other words. columns except those with the following types are logged: LONG. Oracle recommends that you add a primary key or a non-null unique index to tables in the primary database. le aaae on tnb aaae rcvrsadydtbs. -. Failure to do so results in full table scans during UPDATE or DELETE statements carried out on the table by SQL Apply.Modify init. to ensure that SQL Apply can efficiently apply redo data updates to the logical standby database. .Test and Monitor Arch Log Files Transfer -. LOGICAL STANDBY IMPLEMENTATION NOTE = If you want to use the new way to setup Data Guard with RMAN. the amount of information added to the redo log is minimal. LONG ROW.If a table has a primary key defined.net/Standby_Concepts_Configuration.TBENM)NTI (EETDSIC ONR TBENM HR ONR AL_AE O N SLC ITNT WE.0/db_1/oradata/FGUARD/'. you can move on. If the table has a primary key or a unique index with a non-null column.SRS$ Table. TSMSYS is created by rdbms/admin/cattsm. add an index to the columns that uniquely identify the row on the logical standby database. then SQL Apply will not correctly maintain the table.1. ROWIDs contained in the redo records generated by the primary database cannot be used to identify the corresponding row in the logical standby database. On STANDBY database www. atrdtbs mutsadydtbs.On PROD atrsse sic lgie le ytm wth ofl. satpnmut tru oon.Create a Physical Standby Database For more information about how to create a physical standby database click HERE.html 12/32 .In the absence of both a primary key and a non-null unique key. you must be careful to select columns for the disabled RELY constraint that will uniquely identify each row in the table.Add a primary key to the tables that do not have to improve performance. This avoids the overhead of maintaining a primary key on the primary database.'/data/oradata/FGUARD/') log_file_name_convert=('/opt/oracle/product/10. RE Y WE. If the primary database contains tables that were unsupported. .10/24/12 Standby Concepts and Configuration If needed perform the following on the other system: cmd65 oawI ho 71 rpSD . Find tables without unique logical identifier in the primary database: SLC ONR TBENM FO DALGTB_O_NQE EET WE. the shortest non-null unique key is logged as part of the UPDATE statement to identify the modified row.pafumi. Because you are telling the system to rely on the information. object type.slls" a ssb" qpu / s yda cet sfl fo pie rae pie rm fl.In the absence of a primary key. If on the previous command you get a reference over the TSMSYS. If such uniqueness is not present.Ensure that table rows in the primary database can be uniquely identified. AL_AE RM B_OSDYNTUIU WEE(WE.AL_AE RM B_OSDYUSPOTD ODRB ONRTBENM. Thus. etc) Use if needed db_file_name_convert=('/opt/oracle/product/10. please check the following LINK Prior to creating the Logical Standby ensure the following: The physical organization in a logical standby database is different from that of the primary database. LOB.sql for transparent session migration. It’s expired & locked by default .0/db_1/oradata/FGUARD/'. but are not validating it on every modification done to the table. If your application ensures the rows in a table are unique.AL_AE To view the column names and data types which are not supported for one of the tables listed in the previous query. and collections. run the following select: clDT_YEfra a0 o AATP omt 2 clCLM_AEfra a0 o OUNNM omt 2 SLC CLM_AEDT_YEFO DALGTB_NUPRE WEEONR'X'ADTBENM ='Y' EET OUNNM. Once the Physical Standby is created. the system will assume that rows are unique.Determine if the primary database contains tables and datatypes that were not supported by a logical stand by database. ae EY IAL. . each UPDATE statement also writes the column values necessary in the redo log to uniquely identify the modified row in the logical standby database. whenever possible.ora file containing correct information (like udump.AATP RM B_OSDYUSPOTD HR WE=XX N AL_AE YY.1.Ensure that Primary database is in archivelog mode. even though the logical standby database is created from a backup copy of the primary database. all columns of bounded size are logged as part of the UPDATE statement to identify the modified row. . Q> rhv o it . When database-wide primary-key and unique-key supplemental logging is enabled. you can create a disabled primary key RELY constraint on the table. When you specify the RELY constraint. eoe tnb aaae atrdtbs rcvrmngdsadydtbs dsonc fo ssin le aaae eoe aae tnb aaae icnet rm eso. . ATRTBE Tbe ADPIAYKY(d nm) RL DSBE LE AL alA D RMR E i. AL_AE FO DALGTB_NUPRE) RM B_OSDYUSPOTD ADBDCLM ='' N A_OUN Y. . To improve the performance of SQL Apply. SL acielgls.

le ytm e O_RHV_ETSAE3'nbe cp=oh 4. If you do.AC. Cancel the recovery on standby database ATRDTBS RCVRMNGDSADYDTBS CNE.EUNE "atSqec Apid EET RHTRA# Tra" RHSQEC# Ls eune eevd.YSYS E E If the supplemental logging is not enabled. le ytm e O_RHV_ET3'OAINF\rceoaaaAC\tnb AI_O=SADYLGIE. After running this command. The DBMS_LOGSTDBY. The redo logs contain the information necessary to convert your physical standby database to a logical standby database. eet upeetllgdt_ksplmna_o_aau rm $aaae SPSP U U ---. SL ATRSSE SIC LGIE Q> LE YTM WTH OFL. specify a database name that is different from the primary database to identify the new logical standby database. Because the conversion process changes the database name (that was originally set with the DB_NAME initialization parameter) for the logical standby database.EUNE FO VLGHSOYWEE(HED. and how much redo data need to be applied.EUNE FO VACIE_O WEE(HED. depending on how long it takes redo generated to be transmitted to the standby database. issue the following SQL statement: ATRDTBS RCVRT LGCLSADYNWNM. 5. execute the following SL ATRDTBS ADSPLMNA LGDT (RMR KYUIU IDX CLMS Q> LE AAAE D UPEETL O AA PIAY E. cd $ORACLE_HOME/dbs rm orapwfguard orapwd file=orapwfguard password=MySysPassword www. But now we have to change the actual DB Name of the standby so it can become a logical standby database. Supplemental logging should already be enabled on the primary database as a result of building the LogMiner Multiversioned Data Dictionary in the previous section. Data Guard will change the database name (DB_NAME) and set a new database identifier (DBID) for the logical standby.HED "hed. This means that in case if we make this primary as standby then standby redo logs will be archived automatically at archive destination 3. applying redo data until the LogMiner dictionary is found in the log files. Create another archive destination log_archive_dest_3 which will archive only standby redo logs and role should be set to standby_role. we used the same DB_Name as the primary. The DBMS_LOGSTDBY.upeetllgdt_ifo vdtbs.BUILD procedure uses Flashback Query to obtain a consistent snapshot of the data dictionary that is then logged in the redo stream. from that point onwards SQL apply will start on standby. slc splmna_o_aap. Create a New Password File In 11g you do not need to re-create the password file when converting your physical standby to a logical standby. On STANDBY database 1.IS_IE)I (EETTRA#MXFRTTM)FO VLGHSOYGOPB SLC HED SQEC# RM $O_ITR HR TRA#FRTTM N SLC HED. Additionally. Review Destination Parameter so prmtr lgacieds_ hw aaees o_rhv_et1 lgacieds_ srn LCTO=:oal\rdt\RHMNAOY o_rhv_et1 tig OAINF\rceoaaaAC ADTR 2. EEUEDM_OSDYBID XCT BSLGTB. LE AAAE EOE O OIA TNB E_AE On a Physical Standby. To continue applying redo data to the physical standby database until it is ready to convert to a logical standby database. then the database issues a message reminding you to set the name of the DB_NAME parameter after shutting down the database. PLSQEC# Ls eune ple" FO RM (EETTRA#. Make sure that all the sequences generated on primary side has been applied on standby. it will not work. then the database will update the DB_NAME parameter with appropriate information about the new logical standby database. supplemental logging is set up to log primary key and unique-index columns.HED =AP. an entry will go in redo log file and when that redo log file gets shipped to standby. Run DBMS_LOGSTDBY. This may take several minutes.IS_IE)I (EETTRA#MXFRTTM)FO VACIE_O GOP SLC HED SQEC# RM $RHVDLG HR TRA#FRTTM N SLC HED. For db_name.TNB_OE' cp=oh atrsse stLGACIEDS_TT_=eal'soebt.L_OE) soebt. 2.NQE NE) OUN. le ytm e o_rhv_et1'oainF\rceoaaaAC ai_o=OLN_OFLSALRLS' cp=oh 3. The statement waits. On primary set the VALID_FOR parameter to make destination 1 as valid for online redo logs and role as all roles. This mean even if we change the role of primary server to standby server. Oracle recommends setting the UNDO_RETENTION initialization parameter to 3600 on both the primary and logical standby databases. HED) RH (EETTRA#. mdrF\rceoaaaAC\tnb ki :oal\rdt\RHsady atrsse stLGACIEDS_=LCTO=:oal\rdt\RHsadyVLDFR(TNB_OFLSSADYRL) soebt.net/Standby_Concepts_Configuration. you must re-create the password file. LE AAAE EOE AAE TNB AAAE ACL On PRIMARY database 1. A LogMiner dictionary must be built into the redo data so that the LogMiner component of SQL Apply can properly interpret changes it sees in the redo. The supplemental logging information ensures each update contains enough information to logically identify each row that is modified by the statement.html 13/32 . this command will never complete. If you are using a PFILE.10/24/12 Standby Concepts and Configuration 1.A(IS_IE RM $RHVDLG RU TRA#)AC. online redo logs will get archived to archive destination atrsse stlgacieds_=lcto=:oal\rdt\RHvldfr(NIELGIE. You can cancel the SQL statement by issuing the ALTER DATABASE RECOVER MANAGED standby database CANCEL statement from another SQL session. SLC AC. If you are using a server parameter file (SPFILE) at the time you issue this statement.pafumi. Long-running transactions executed on the primary database will affect the timeliness of this command.HED ODRB 1 HR RHTRA# PLTRA# RE Y .BUILD procedure waits for all existing transactions to complete.A(IS_IE RM $O_ITR RU Y TRA#)AP HED) PL WEEAC.UL. If a dictionary build is not successfully performed on the primary database. 2.BUILD package to create metadata for log miner to apply SQLs on logical standby site.EUNE "atSqec Rcie" AP.

The following table show you various roles and redo log types that can be used in various situation.Modifying LOG_ARCHIVE_DEST_n parameters You need to perform this modification because. eet ntnenm TTS NTNERL rm $ntne ISAC_AE NTNENM SAU TTS ISAC_OE NTNERL . atrsse stLGACIEDS_=LCTO=:oal\rdc\020oaaaFUR_RHVLDFR(NIELGIE.RMR_OE'soebt.. le ytm e O_RHV_ETSAE3'nbe cp=oh Log_archive_dest_1 -> Archived redo log files that store redo data generated by the logical standby database. when adding a non-OMF datafile to the primary database and the datafile paths are different between the primary and standby. eet ae RTCINLVLDTBS_OE rm $aaae NM AE POETO_EE RTCINLVL DTBS_OE AAAERL --------------.----------. LOG_ARCHIVE_DEST_3 is valid only when FGUARD is running in the standby role.POETO_EE. unlike physical standby databases. and standby redo log files). This is called auto role shifting. PRIMARY_ROLE STANDBY_LOGFILE. Parameter When the STANDBY Database Is Running in the Primary Role When the STANDBY Database Is Running in the Logical Standby Role Directs archival of redo data generated by the logical standby database from the local online redo log files to the local archived redo log files in the Flash Recovery Area (USE_DB_RECOVERY_FILE_DEST). PRIMARY_ROLE ALL_LOGFILES. Directs archival of redo data received from the primary database to the local archived redo log files in C:\oracle\product\10. STANDBY_ROLE ONLINE_LOGFILE. LOG_ARCHIVE_DEST_3 Is ignored.ISAC_OEfo visac . archived redo log files. Open the Stanby Database The new database is logically the same as your primary database. 5. you must open it with the RESETLOGS option by issuing the following statement: ATRDTBS OE RSTOS LE AAAE PN EELG.2. le ytm e O_RHV_ET1'OAINC\rcepout1. LOG_ARCHIVE_DEST_2 is valid only when turlock is running the primary role.-------TSD ETB MXMMPROMNE LGCLSADY AIU EFRAC OIA TNB slc isac_ae. Till the time this database is standby it will not ship and redo logs to primary. the database's global name is adjusted automatically to match the new DB_NAME initialization parameter. This is for archiving all standby redo logs.AAAERL fo vdtbs. you should register a skip handler and provide SQL Apply with a replacement DDL string to execute by converting the path names of the primary database datafiles to the standby datafile path names. Log_archive_dest_3 -> Data received from the primary database (Arch Log Files generated on PROD will be shipped to this location). 4. in case this becomes primary server and primary becomes standby server. Mounting the Stanby Database On the logical standby database.. slc nm . Is ignored.SAU . This can be a problem. In case this becomes primary. but it is transactionally inconsistent with the primary database. slc *fo goa_ae eet rm lblnm. STANDBY_ROLE ALL_LOGFILES. ALL_ROLES STANDBY_LOGFILE. le ytm e O_RHV_ETSAE1'nbe cp=oh atrsse stLGACIEDS_TT_=eal'soebt. ALL_ROLES Primary Role Active Inactive Active Error Invalid Invalid Active Invalid Active Physical Standby Role Inactive Invalid Invalid Error Active Active Inactive Active Active Logical Standby Role Invalid Active Active Error Active Active Invalid Active Active The following table describes the archival processing defined by the initialization parameters shown in this example for the new STANDBY logical standby database. It will also work if the role of database is Primary or Standby Log_archive_dest_2 -> This is for shipping the online redo logs to primary server.TNB_OE' cp=oh atrsse stLGACIEDS_TT_=eal'soebt.3. le ytm e O_RHV_ETSAE2'nbe cp=oh atrsse stLGACIEDS_TT_=eal'soebt. SATPMUT TRU ON. it will not create any standby archive logs at this dest 3.\rdt\GADAC AI_O=OLN_OFLSALRLS' cp=oh atrsse stLGACIEDS_=sriePO_GADLW AYCVLDFR(NIELGIE. and thus incompatible for recovery operations. For more information check HERE.0\oradata\FGUARD_ARCH_stdby_redo_log LOG_ARCHIVE_DEST_1 Directs archival of redo data generated by the primary database from the local online redo log files to the local archived redo log files in the Flash Recovery Area (USE_DB_RECOVERY_FILE_DEST). NOTE The DB_FILE_NAME_CONVERT initialization parameter is not honored once a physical standby database is converted to a logical standby database.\rdt\GADAC_tb_eolg AI_O= (TNB_OFLSSADYRL) soebt. shutdown the instance and issue the STARTUP MOUNT statement to start and mount the database. PRIMARY_ROLE ONLINE_LOGFILE. Because this is the first time the database is being opened. logical standby databases are open databases that generate redo data and have multiple log files (online redo log files. To open the new logical standby database. SUDW IMDAE HTON MEIT. If necessary. This will work only when the role of database is Standby. LOG_ARCHIVE_DEST_2 Directs transmission of redo data to the remote logical standby database FGUARD. le ytm e O_RHV_ET2'evc=RDFUR GR SN AI_O=OLN_OFLSPIAYRL) cp=oh atrsse stLGACIEDS_=LCTO=:oal\rdc\020oaaaFUR_RHsdyrd_o VLDFR le ytm e O_RHV_ET3'OAINC\rcepout1. STANDBY_ROLE STANDBY_LOGFILE ALL_ROLES ALL_LOGFILES.L_OE) soebt. for example. VALID_FOR Definition ONLINE_LOGFILE.---------. SADYLGIE.

. The instance Name is used by the OS to identify the logical standby. SQEC#FRTTM EUNE IS_IE APID PLE ----.--------wnrd ioab OE PN PIAYISAC RMR_NTNE As you can see here.--------.--------. le aaae d tnb ofl ru 'so/m62/rceoaaastt2rd4df) ie 0M atrdtbs adsadylgiegop5(/ltes86oal/rdt/is0/eo.ETCAG# . .TMSAPFO DALGTB_O ODRB SQEC# EET EUNE. le aaae d tnb ofl ru 'so/m62/rceoaaastt2rd6df) ie 0M ATRDTBS SATLGCLSADYAPYIMDAE LE AAAE TR OIA TNB PL MEIT.b' sz 10. SQEC#FRTTM EUNE IS_IE NX_IE ETTM DCDCTMSAP I I IETM -------------.EDSN HN YSWE . le aaae d tnb ofl ru 'so/m62/rceoaaastt2rd5df) ie 0M atrdtbs adsadylgiegop6(/ltes86oal/rdt/is0/eo. If we get: ERRa ln 1 RO t ie : OA129 IMDAEoto ntaalbewtotsadyrd lg R-63: MEIT pin o vial ihu tnb eo os We got the above error.Show Thread. APIDSNNWS_C PLE_C EETSN --------------. Start Applying Process Issue the following statement to begin applying redo data to the logical standby database: ATRDTBS SATLGCLSADYAPYIMDAE LE AAAE TR OIA TNB PL MEIT.EUNE.--------.-------.---------------. IS_HNE.DC_N. Determine how much progress was made through the available logs SLC LSQEC# LFRTTM. EETSN RM B_OSDYPORS.--------15 1-A-12:71 1-A-12:63 N N 1-A-12:71 33 7JN1 21:4 7JN1 23:3 O O 7JN1 23:4 15 1-A-12:63 1-A-12:70 N N 1-A-12:71 34 7JN1 23:3 7JN1 23:6 O O 7JN1 23:4 15 1-A-12:70 1-A-12:41 N N 1-A-12:42 35 7JN1 23:6 7JN1 24:9 O O 7JN1 24:4 15 1-A-12:41 1-A-10:42 N N 1-A-10:51 36 7JN1 24:9 8JN1 74:3 O O 8JN1 74:2 .--15 1-A-12:71 CRET 33 7JN1 21:4 URN 15 1-A-12:63 N 34 7JN1 23:3 O 15 1-A-12:70 N 35 7JN1 23:6 O 15 1-A-12:41 N 36 7JN1 24:9 O .PLE_C HN CRET LE N' N) PLE FO DALGTB_O L DALGTB_RGESP RM B_OSDYLG . ITBGN ITED HED RM .----.IS_HNE . Archived.-------. Applied slc DS_D TRA# SQEC# ACIE.DC_N.Show Threads Progress.-----.--------.b' sz 10. EET . EUNE.TRA#FO EET IENM. DS_D ETI TRA# SQEC#ACAPCMLTO_IE HED EUNE R P OPEINTM ---------. ITBGN ITED IETM RM B_OSDYLG RE Y EUNE. SLC SQEC# FRTTM. 6.----..Verify Currect SCN to see if all log file information was applied SLC APIDSN NWS_C FO DALGTB_RGES EET PLE_C.--------. RHVD PLE.---------------.---------------. database_role from v$database. because we didn't create standby redo log files Create standby redo logs as shown below. B_OSDYPORS ODRB SQEC# RE Y EUNE. EUNE. ETCAG# IETM. the INSTANCE Name is different that the DB Name.Show File Location that I received and its status SLC FL_AE SQEC# FRTCAG# NX_HNE. HED.----.NX_IE DC_EI.IS_IE (AEWE LNX_HNE <PRA_C TE 'E'HNLFRTCAG#<PAPIDSNTE 'URN'ES 'O ED APID CS HN . Queries for PRIMARY Database .. OPEINTM rm $rhvdlg hr ETI re y EUNE. atrdtbs adsadylgiegop4(/ltes86oal/rdt/is0/eo.----29442 29442 98707 98707 . Logical Standby Sanity Check Detect Database Role select name.-----.TMSAP DC_EI. IS_IE ETTM.--------2 1 15 YSYS1/A/12:51 30 E E 7JN1 13:3 2 1 15 YSYS1/A/12:30 31 E E 7JN1 20:6 2 1 15 YSYS1/A/12:73 32 E E 7JN1 21:0 2 1 15 YSN 1/A/12:71 33 E O 7JN1 23:0 2 1 15 YSN 1/A/12:71 34 E O 7JN1 23:1 2 1 15 YSN 1/A/12:42 35 E O 7JN1 24:1 2 1 15 YSN 1/A/10:50 36 E O 8JN1 74:9 On STANDBY database ATRSSINSTNSDT_OMT='DMNY H2:IS' LE ESO E L_AEFRA D-O-Y H4M:S.b' sz 10.Verify the archived redo log files were registered..APID CMLTO_IEfo vacie_o weeDS_D=2odrb SQEC# eet ETI. .

This can be a problem.----.--------codntrsae oriao tt IL DE tascin ray 16 rnatos ed 15 tascin apid16 rnatos ple 15 codntrutm oriao pie 25 8 Troubleshooting a Logical Standby Setting up a Skip Handler for a DDL Statement The DB_FILE_NAME_CONVERT initialization parameter is not honored once a physical standby database is converted to a logical standby database. when adding a non-OMF datafile to the primary database and the datafile paths are different between the primary and standby.------------------. for example. NM AE VLE AU ---------.EETFO DALGTB_VNSODRB EETTM.0 ye IHSN usrSAU.SAU.sbt(AU.O :OAL\RDC\020OAAAWNRD_RHSDYRD_O\RH0103567425LG 15 35 29415 98552 29418 1-A-12:42 N N 98573 7JN1 24:4 O O 1 C\RCEPOUT1.. eet ye ihsn tts rm $osdy SLC sbt(YE11)Tp.--------..10/24/12 DALGTB_O ODRB SQEC# B_OSDYLG RE Y EUNE.0 ae usrVLE13) au FO VLGTB_TT RM $OSDYSAS WEENM LK 'oriao% o NM LK 'rnatos' HR AE IE codntr' r AE IE tascin%.------------------------CODNTR 29442 OA116 n wr aalbe ORIAO 98708 R-61: o ok vial RAE EDR 29442 OA120 Wiigfrlgie(hed 1 sqec#15) 98708 R-64: atn o ofl tra# .sau fo vlgtb.O :OAL\RDC\020OAAAWNRD_RHSDYRD_O\RH0103467425LG 15 34 29413 98557 29415 1-A-12:71 N N 98552 7JN1 23:4 O O 1 C\RCEPOUT1.Show problematic Rows or Events SLC EETTM. EET usrTP.HG_C.-----.\RDT\IOABAC_TB_EOLGAC_0_15_9014. This section describes the steps necessary to register a skip handler and provide SQL Apply with a replacement DDL string to execute by converting the path names of the primary database datafiles to the standby datafile path names.5 RM $OSDY TP YE HG_C SAU IHSN TTS -----.----C\RCEPOUT1. For example..sbt(TTS15)FO VLGTB.. Standby Concepts and Configuration FL_AE IENM ------------------------------------------------------------------------------SQEC#FRTCAG#NX_HNE TMSAP EUNE IS_HNE ETCAG# IETM DCDC I I TRA# HED ----. EET VN_IE TTS VN RM B_OSDYEET RE Y VN_IE OMTSN .CMI_C.-----------------------------..----...----.-----.\RDT\IOABAC_TB_EOLGAC_0_15_9014. if you are using Oracle Managed Files (OMF). Inspect the process activity for SQL apply operations clm sau fra a0 oun tts omt 5 clm tp fra a2 oun ye omt 1 slc tp.net/Standby_Concepts_Configuration.------------.0 vle EET usrNM.------------.Check Coordinator Status SLC sbt(AE12)Nm.--------.-------d_raefl_et bcet_ieds srn tig /0/rdt u2oaaa cet tbepc dt2dtfl sz 5.-------------------------..----.\RDT\IOABAC_TB_EOLGAC_0_15_9014.. SQL Apply will successfully execute DDL statements generated from the primary to CREATE and ALTER tablespaces and their associated system generated path name on the logical standby.html 16/32 .hg_c.pafumi. rae alsae aa aaie ie m On LOGICAL Standby using Oracle Managed Files (OMF) so prmtrd_raefl_et hw aaee bcet_ieds NM AE TP YE VLE AU ------------. On PRIMARY Standby using Oracle Managed Files (OMF) so prmtrd_raefl_et hw aaee bcet_ieds NM AE TP YE VLE AU ------------.\RDT\IOABAC_TB_EOLGAC_0_15_9014. This may or may not be a problem for everyone.-------------------------.Show what the Standby is doing.O :OAL\RDC\020OAAAWNRD_RHSDYRD_O\RH0103667425LG 15 36 29418 98573 29428 1-A-10:51 N N 98762 8JN1 74:2 O O 1 .O :OAL\RDC\020OAAAWNRD_RHSDYRD_O\RH0103367425LG 15 33 29471 98480 29413 1-A-12:71 N N 98557 7JN1 23:4 O O 1 C\RCEPOUT1.. eune 38 BIDR ULE 29442 OA116 n wr aalbe 98705 R-61: o ok vial PEAE RPRR 29442 OA116 n wr aalbe 98704 R-61: o ok vial AAYE NLZR 29442 OA117 poesn 98705 R-61: rcsig APIR PLE 29440 OA116 n wr aalbe 98705 R-61: o ok vial APIR PLE 29442 OA116 n wr aalbe 98705 R-61: o ok vial APIR PLE 29437 OA116 n wr aalbe 98793 R-61: o ok vial APIR PLE 29437 OA116 n wr aalbe 98798 R-61: o ok vial .-------d_raefl_et bcet_ieds srn tig /0/rdt u2oaaa www.

------------------------------------.dbf' size 5m. 5.6144 M le alsae aa d a R-11: ro n raig aie'u5oaaaMDSOd aaaefl 'u5oaaaMD fl /0/rdt/OET/a tbs ie /0/rdt/O t0.---------------------------DT2 AA /0/rdt/GADdtfl/1m_aa_lhqd. LOGSTDBY status: ORA-01119: error in creating database file '/u05/oradata/MODESTO/data02. 2.--------------.b u2oaaaFUR/aaieo_fdt26w89_df www. unable to create file Linux Error: 2: No such file or directory LOGSTDBY Analyzer process P003 pid=30 OS id=28495 stopped LOGSTDBY Apply process P005 pid=32 OS id=28499 stopped LOGSTDBY Apply process P006 pid=33 OS id=28501 stopped LOGSTDBY Apply process P007 pid=34 OS id=28503 stopped LOGSTDBY Apply process P008 pid=35 OS id=28505 stopped --------------------------------------------------------- slc eettmsap eet sau fo dalgtb_vns eet vn_ietm. Re-enable the database guard for this session.trc: ORA-12801: error signaled in parallel query server P004 ORA-01119: error in creating database file '/u05/oradata/MODESTO/data02..10/24/12 Standby Concepts and Configuration ----------------------.--------------1-A-10. Issue a compensating transaction or statement on the logical standby.pafumi.b'sz 5 a2df ie m ET/aa2df SOdt0.dbf' ORA-27040: file create error. vn.alert. you attempt to specify a physical path name in the CREATE/ALTER tablespace statement that does not exist on the logical standby.html 17/32 .93..b'sz 5. SQL Apply will not succeed in processing the statement and will fail. ----------------------. TBEPC_AE ALSAENM FL_AE IENM --------. ienm fo dadt_ie rm b_aafls weetbepc_ae='AA' hr alsaenm DT2.dbf' size 5m Wed Jan 12 19:59:36 EST 2011 ORA-1119 signalled during: alter tablespace data2 add datafile '/u05/oradata/MODESTO/data02. le alsae aa d aaie /0/rdt/OET/aa2df ie m On LOGICAL Standby WITHOUT Oracle Managed Files (OMF) If on the other hand.alert. tts rm b_osdyeet.---------------------------.log ----------------------Wed Jan 12 19:59:36 EST 2011 alter tablespace data2 add datafile '/u05/oradata/MODESTO/data02. it will stop and provide the DBA with an opportunity to correct the statement and restart SQL Apply. 4. le alsae aa d aaie /0/rdt/GADdt0. Disable the database guard for this session so we can modify the logical standby. ual t cet fl nbe o rae ie LnxErr 2 N sc fl o iu ro: : o uh ie rdrcoy ietr Fixing it 1. ienm fo dadt_ie rm b_aafls weetbepc_ae='AA' hr alsaenm DT2. TBEPC_AE ALSAENM FL_AE IENM --------. EETTMSAP VN_IETM EET VN Sau tts -----------------------------. unable to create file Linux Error: 2: No such file or directory LOGSTDBY Apply process P004 pid=31 OS id=28497 stopped Wed Jan 12 19:59:36 EST 2011 Errors in file /u01/app/oracle/admin/turlock/bdump/turlock_lsp0_28465.dbf' ORA-27040: file create error. atrdtbs satlgclsadyapyimdaesi fie tascin le aaae tr oia tnb pl meit kp ald rnato.b' ie m 3. atrssineal gad le eso nbe ur. Restart logical apply with a clause that will cause the failed transaction to be automatically skipped. slc tbepc_ae fl_ae eet alsaenm. atrssindsbegad le eso ial ur.------------------------------------.339P atrtbepc dt2addtOA019 erri cetn d 2JN1 75. For this example.b u2oaaaFUR/aaieo_fdt26w89_df On PRIMARY Standby using Oracle Managed Files (OMF) atrtbepc dt2addtfl 'u5oaaaMDSOdt0.net/Standby_Concepts_Configuration. issue the following command with the correct path: atrtbepc dt2addtfl 'u5oaaaFUR/aa2df sz 5. Verify results.log ----------------------Wed Jan 12 18:45:28 EST 2011 Completed: create tablespace data2 datafile size 5m --------------------------------------------------------slc tbepc_ae fl_ae eet alsaenm.b' OA200 fl cet err R-74: ie rae ro.---------------------------DT2 AA /0/rdt/GADdtfl/1m_aa_lhqd. Whenever SQL Apply encounters an error while applying a SQL statement.

eeuedm_osdysi(tt= 'ALSAE. Whenever the role is changed between the primary and standby. The steps to perform this are presented below.adetsdl odsm i vrhr l_tt n aca2 . e_tt = ul edhnl_b_d. On PRIMARY Standby atrtbepc dt2addtfl 'u5oaaaFUR/aa3df sz 5. ato : dm_osdysi_cinrpae cin = bslgtb.dbf' size 5m Completed: alter tablespace data2 add datafile '/u01/another_location/oradata/FGUARD/data03.---------------------------. ienm fo dadt_ie rm b_aafls weetbepc_ae='AA' hr alsaenm DT2.kpato_elc.net/Standby_Concepts_Configuration. create the PL/SQL 'skip procedure' to handle tablespace DDL transactions. 3. First.xdq isn i nme n ubr . 1.'u1aohrlcto/rdt/GAD drcoyseiiain .b' ie m ON Logical Standby ----------------------.'u5oaaaFUR'sol b cagdt te . The actions below should be run on the logical standby database.kpsm > TBEPC' rcnm > sshnl_b_d'.ato cin otnme u ubr . nwsm : nl.html 18/32 . ecpin xeto we ohr te hn tes hn ato : dm_osdysi_cinerr cin = bslgtb. /0/nte_oainoaaaFUR'.10/24/12 DT2 AA Standby Concepts and Configuration /0/rdt/GADdt0.b Logical Standby Database Activation (Role Transition) A database can operate in one of two mutually exclusive modes in an Oracle Data Guard configuration: primary or standby.xdl ist i nme n ubr .b u5oaaaFUR/aa2df NOTE It is possible to avoid errors of this nature on the logical standby database by registering a skip handler and provide SQL Apply with a replacement DDL string to execute by converting the path names of the primary database datafiles to the standby datafile path names. There are two types of role transitions supported in Oracle: switchover and failover.---------------------------DT2 AA /0/nte_oainoaaaFUR/aa3df u1aohrlcto/rdt/GADdt0.Register the skip procedure with SQL Apply. this is referred to as a role transition.l rmr ie pcfcto ht oti ietr .alert. le alsae aa d aaie /0/rdt/GADdt0.log ----------------------Wed Jan 12 20:51:58 EST 2011 LOGSTDBY status: ORA-16110: user procedure processing of logical standby apply DDL LOGSTDBY status: ORA-16202: Skip procedure requested to replace statement Wed Jan 12 20:51:58 EST 2011 alter tablespace data2 add datafile '/u01/another_location/oradata/FGUARD/data03.xds iun i nme n ubr . 5. TBEPC_AE ALSAENM FL_AE IENM --------. n adetsdl / 2.'u5oaaaFUR' 'u1aohrlcto/rdt/GAD) e_tt = elc(l_tt /0/rdt/GAD.Start SQL Apply.nm ae i vrhr n aca2 .sm_y i vrhr tttp n aca2 ./0/nte_oainoaaaFUR' ietr pcfcto. Switchover www. Stop SQL Apply.pafumi. 4.------------------------------------.---------------------------.---------------------------.nwsm otvrhr e_tt u aca2 )a s bgn ei .Alpiayfl seiiainta cnanadrcoy . Perform a test. atrdtbs so lgclsadyapy le aaae tp oia tnb pl. .dbf' size 5m --------------------------------------------------------slc tbepc_ae fl_ae eet alsaenm.kpato_ro. cet o rpaepoeuesshnl_b_d ( rae r elc rcdr y.shm cea i vrhr n aca2 .po_ae= 'y./0/rdt/GAD hud e hne o h .adetsdl) xct bslgtb. Role transition plays an important part in Data Guard by providing an interface that allows DBA's to activate a standby database to take over as the primary production database or vice versa. atrdtbs satlgclsadyapyimdae le aaae tr oia tnb pl meit.---------------------------nwsm : rpaeodsm.

PL_NE(APYDLY) ATRDTBS SATLGCLSADYAPY LE AAAE TR OIA TNB PL. You can safely ignore the error ORA-01289: cannot add duplicate logfile ATRDTBS RGSE LGCLLGIE'ds1oal/b/nielg. When the query returns the TO LOGICAL STANDBY value.dtbs wudntb al t rcvri tepiayhs bcm uaalbe .aaae ol o e be o eoe f h rmr ot eoe nvial www. Register any log: ATRDTBS RGSE LGCLLGIE'ds1oal/b/o-228087ac. Get the sequence number of the last complete archive log on the standby.h ifrne ewe n ur n s ur hud e . XCT BSLGTB. SLC mnsqec# Ls_rhv_o_eevdFO vacie_o EET i(eune) atacielgrcie RM $rhvdlg WEE(eune+)NTI (EETsqec#FO vacie_o) HR sqec#1 O N SLC eune RM $rhvdlg ADsqec#>&atapidac_o.Tedfeec bten2dqeyad1tqeysol b 0 . Turn off the apply delay interval. stops SQL Apply. This statement stops the RFS process.When the SWITCHOVER_STATUS column of the V$DATABASE view returns TO LOGICAL STANDBY. If you get results from this query. 3. Note: To avoid waiting for the redo in the standby redo log file to be applied prior to performing the failover. build the LogMiner dictionary and transmit this dictionary to the current production database:: ATRDTBS PEAET SICOE T PIAY LE AAAE RPR O WTHVR O RMR. Get the sequence number of the last applied archive log.On the current logical standby database. EUNE. All SCNs between these two values will be lost. N eune Ls_ple_rhlg --Connect to the primary database and obtain the sequence number of the current online log: slc sqec#fo vlgweesau=CRET. slc mxsqec# Ls_ple_rhlgfo vacie_o weeapid'E' eet a(eune) atapidac_o rm $rhvdlg hr ple=YS. Execute the following query on Standby: CLM FL_AEFRA a5 OUN IENM OMT 5. the SWITCHOVER_STATUS column shows PREPARING DICTIONARY while the LogMiner Multiversioned Data Dictionary is being recorded in the redo stream.10/24/12 Standby Concepts and Configuration 1. you can proceed to the next step.pafumi.HED HED) ODRB TRA#SQEC# RE Y HED. Once this has completed successfully.This is the last log the standby can apply without receiving additional archive logs from the primary. Initiate the failover by issuing the following on the target standby database: ATRDTBS ATVT LGCLSADYDTBS FNS APY LE AAAE CIAE OIA TNB AAAE IIH PL. it means there is a gap. the prepare statement may take some time to complete. Potential data loss window for a physical standby database (Archived logs not applied on a physical standby database) --On the standby.log file on your Primary DB. omitting the clause will cause the loss of any unapplied redo data in the standby redo log. convert the production database to a standby by issuing: ATRDTBS CMI T SICOE T LGCLSADYwt SSINSUDW.Issue the following statement on the production database to enable receipt of redo from the current standby database: ATRDTBS PEAET SICOE T LGCLSADY LE AAAE RPR O WTHVR O OIA TNB. omit the FINISH APPLY clause on the statement.r' Copy and register the online redo logs from the primary database (if possible). query the V$LOGSTDBY_PROGRESS view. To gauge the amount of redo that will be lost. IENM FO DALGTB_O L RM B_OSDYLG WEENX_HNE NTI (EETFRTCAG# HR ETCAG# O N SLC IS_HNE FO DALGTB_O RM B_OSDYLG WEELTRA#=TRA# HR . Depending on the work to be done and the size of the database. SLC TRA# SQEC# FL_AE EET HED. 2.Issue the following statement on the old standby database: ATRDTBS CMI T SICOE T PIAY LE AAAE OMT O WTHVR O RMR. Although omitting the FINISH APPLY clause will accelerate failover.Verify the LogMiner Multiversioned Data Dictionary was received by the production database by querying the SWITCHOVER_STATUS column of the V$DATABASE fixed view on the production database Initially. Failover Copy and register any missing archived redo logs from PROD.h ifrne ewe d ur n s ur s h ubr f rhv os ht h tnb . The LATEST_SCN column value indicates the last SCN received from the production database. applies any remaining redo data.net/Standby_Concepts_Configuration. and the APPLIED_SCN column value indicates the last SCN applied to the standby database.On the standby. 4. You can easily detect what is the problem by checking the alert. EEUEDM_OSDYAPYUST'PL_EA'. and activates the logical standby database in the production role. ATRDTBS SO LGCLSADYAPY LE AAAE TP OIA TNB PL.html 19/32 . the column shows PREPARING SWITCHOVER. LE AAAE OMT O WTHVR O OIA TNB ih ESO HTON 5. eet eune rm $o hr tts'URN' . Monitoring Physical Data Guard (Detect Gap) Perform a query of the V$ARCHIVE_GAP view from the physical standby database: slc *fo vaciegp eet rm $rhv_a.EUNE.Tedfeec bten3 qeyad1tqeyi tenme o acielg ta tesady .o' LE AAAE EITR OIA OFL /ik/rcedsoln_o1lg. -. -. LE AAAE EITR OIA OFL /ik/rcedslg19800_.

eune FO RM ( SLC * EET FO vacie_o RM $rhvdlg )a .-----.eti gopb asds_d hr dds_da.RO rm $rhv_et weeDSIAINi NTNL hr ETNTO s O UL / slc asds_dmxsqec# "urn Sqec" eet d.eti n lds_dasds_d ru y d.-----------------.vacieds_ttsas rm $rhvdlg l $rhv_et d $rhv_etsau d weea. www. .-----.a(eune) Cret eune.TTSERRfo vacieds eet ETI.eune a1 ) GOPB tra# RU Y hed )hg.eti."iha# EET hed. s h olwn Q n h tnb aaae te aaae ut e one) SLC hg.eune fo vmngdsady eet rcs.hed . HR o.eune.-----.----.lc#atv_gnskonaet fo vmngdsady rm $aae_tnb. mxlgsqec)"atAcie" a(o_eune Ls rhvd fo vacie_o a.nw_gns eet rcs.----. eune FO vlghsoy vdtfl RM $o_itr.------1 53 14 52 22 AohrMto nte ehd UetefloigSLo tesadydtbs (h dtbs ms b mutd.hed.-----AC RH CNETD ONCE AC RH 0 0 0 0 AC RH CNETD ONCE AC RH 0 0 0 0 MP R0 WI_O_A NA ATFRGP / 53 14 0 0 0 RS F RCIIG EEVN AC RH 55 44 1362 675 0 0 RS F ATCE TAHD AC RH 55 46 890 110 0 0 Run this at Primary stpgs10 e ae 00 stlns10 e ie 2 clm DS_AEfra a0 oun ETNM omt 2 clm DSIAINfra a5 oun ETNTO omt 3 clm ACIE fra a0 oun RHVR omt 1 clm TRE fra a5 oun AGT omt 1 clm sau fra a0 oun tts omt 1 clm errfra a5 oun ro omt 1 slc DS_DDS_AEDSIAINTRE."oGp" "iha# EET ihtra# Lwa#.eti=lds_dada. Run this at Standby slc mxa.---.----. HgGp" FO RM ( SLC tra# MNsqec#.html 20/32 .---. $aaie WEEcekon_hne < nx_hne HR hcpitcag# = etcag# ADcekon_hne > frtcag# N hcpitcag# = is_hne ) GOPB tra# RU Y hed )lw o WEElwtra#=hg.----.net/Standby_Concepts_Configuration.hed ihtra# If no rows are retunred.hed.ETNM. TRA#LWSQEC#HG_EUNE HED O_EUNE IHSQEC# ----. ( SLC tra# MXsqec#gp EET hed.10/24/12 Standby Concepts and Configuration Sm GO qeist dtc GP oe OD ure o eet AS slc poessau.AGTSAU.hed. POESSAU RCS TTS CIN_ SQEC# LETP EUNE BOK ATV_GNSKONAET LC# CIEAET NW_GNS ---------.eti. you are Fine Suspend Physical Standby Recovery To stop managed standby recovery: . I(eune) Lwa# FO RM ( SLC tra# sqec# EET hed.--------------.eune)"atSqRcee"fo vacie_o a eet a(lsqec# Ls e eivd rm $rhvdlg l / slc mxa.vacieds a.eune)"atSqAlid fo vacie_o a eet a(lsqec# Ls e ple" rm $rhvdlg l weeapid=YS hr ple 'E' / slc poessau. A(eune)a1 FO vlghsoy RM $o_itr GOPB tra# RU Y hed )b WEEatra#=btra# HR .ETNTO.acl rtce oe n rmr CNETsspswr@rmr1A SSB ONC y/asodpiay S YDA ATRDTBS STSADYDTBS UPOETD LE AAAE E TNB AAAE NRTCE.hed ADasqec#>gp N .pafumi.ttssqec# rm $aae_tnb / slc *fo vaciegp eet rm $rhv_a.letpoessqec#bok.eti=d. I(eune)1 HgGp" FO RM ( SLC atra# asqec# EET .cieaet. ih ( SLC tra# MNsqec# "oGp" EET hed.ttscin_rcs.Cne poetdmd o piay .

Procedures to Activate a DR Database as a PROD database If the primary database is not available the standby database can be activated as a primary database using the following statements: -SatpteD i MutMd (fta i ntarayo pae -tru h B n on oe i ht s o led n lc) SATPNMUT TRU OON ATRDTBS MUTSADYDTBS.Satpmngdrcvr . atrdtbs mutsadydtbs.b' ie 00 es. satpnmut tru oon. atrdtbs mutsadydtbs. le aaae on tnb aaae Open the DB in Recovery mode with: rcvrsadydtbs. ATRDTBS RNM FL 'u1apoal/rdt/CMrd2lg t 'otapoal/rdt/CMrd0. ATRDTBS MUTSADYDTBS. EOE AAE TNB AAAE ACL ATRDTBS OE RA OL.html 21/32 . Procedures to Put the Database back in DR Mode Close the DB: SUDW IMDAE HTON MEIT. LE AAAE ON TNB AAAE -Tyt rcieadapytelts Ac Lg fo PO -r o eev n pl h aet rh os rm RD RCVRMNGDSADYDTBS. cancel recovery with (you could get an error message that you can ignore): RCVRMNGDSADYDTBS CNE. . LE AAAE PN ED NY Standby Concepts and Configuration The database can subsequently be switched back to recovery mode as follows: .acl eoey f eesr RCVRMNGDSADYDTBS CNE. Activating A Physical Standby Database Procedures to Open the DR Database in Query Mode Once there. The previous primary database can then be configured as a standby. LE AAAE CIAE TNB AAAE SUDW IMDAE HTON MEIT SATP TRU Since the standby database is now the primary database it should be backed up immediately. le alsae EP d epie /rceappout92amnoaaatm0. EOE AAE TNB AAAE ACL o r ATRDTBS RCVRMNGDSADYDTBS FNS. rae eprr alsae EP EPIE /rceoaaaV0/ep. le aaae on tnb aaae -Yumyne t rnm lgflslk: -o a ed o eae o ie ie ATRDTBS RNM FL 'u1apoal/rdt/CMrd1lg t 'otapoal/rdt/CMrd0.rtc rmr aaae CNETsspswr@rmr1A SSB ONC y/asodpiay S YDA ATRDTBS STSADYDTBS POETD LE AAAE E TNB AAAE RTCE. eoe tnb aaae atrdtbs rcvrmngdsadydtbs dsonc fo ssin le aaae eoe aae tnb aaae icnet rm eso. LE AAAE EOE AAE TNB AAAE IIH sudw imdae hton meit. EOE AAE TNB AAAE o r RCVRSADYDTBS./di/rdt/ep1df sz 10 . EOE AAE TNB AAAE ACL Open the DB in Read Mode with: ATRDTBS OE RA OL.o' LE AAAE EAE IE /0/p/rceoaaaCO/eo. Mount the DB with: satpnmut tru oon.o' LE AAAE EAE IE /0/p/rceoaaaCO/eo. LE AAAE ON TNB AAAE RCVRMNGDSADYDTBS DSONC FO SSIN EOE AAE TNB AAAE ICNET RM ESO.b’ ie 0M www.b' ie 0M or atrtbepc TM adtmfl ‘oal/p/rdc/.acl eoey f eesr CNETsspswr@tnb1A SSB ONC y/asodsady S YDA RCVRMNGDSADYDTBS CNE.o' o /p/p/rceoaaaCO/eo1lg.o' o /p/p/rceoaaaCO/eo2lg.pafumi. ATRDTBS ATVT SADYDTBS.Cne rcvr i ncsay .net/Standby_Concepts_Configuration.10/24/12 .tru aae eoey CNETsspswr@tnb1A SSB ONC y/asodsady S YDA SUDW IMDAE HTON MEIT SATPNMUT TRU OON.Poetpiaydtbs . Create or Add a tempfile to the temporary tablespace: Ex: cet tmoaytbepc TM2TMFL 'oal/rdt/91tm2df sz 10. EOE TNB AAAE .Cne rcvr i ncsay . LE AAAE PN ED NY atrtbepc TM adtmfl 'oal/B_CIT/epdf sz 10mrue le alsae EP d epie /rceDASRPStm.

www. alter system set log_archive_dest_state_2=enable scope=both. --This should be PROD (Falcon) **** At this point we have 2 standby Databases ****** The Current STDBY Site. -. SESSIONS ACTIVE .This is a standby database that has not received the switchover request. that will become Standby select database_role.10/24/12 Standby Concepts and Configuration PHYSICAL STANDBY SWITCHOVER STEPS Unlike failover. wthvrsau rm $aaae DTBS_OE AAAERL SICOE_TTS WTHVRSAU ------------. SL atrdtbs cmi t sicoe t pyia sady Q> le aaae omt o wthvr o hscl tnb. that will become primary select database_role. All the archive logs required bringing the standby to the primary’s point in time need to be available. shutdown immediate startup alter system set fal_client=NULL scope=both. The primary database’s online redo logs also must be available and intact.This is a standby database and the primary database switchover request has been received but not processed.The switchover was in pending mode.net/Standby_Concepts_Configuration. but did not complete and went back to the primary database. TO PRIMARY . NOTE = Standby must be mounted before starting the switchover!!!! QUICK GUIDE The Current PROD Site. During normal operations on the standby it is acceptable to see the values of NOT ALLOWED or SESSIONS ACTIVE. primary and standby databases switch roles. Q> le aaae omt o wthvr o hscl tnb ih eso hton STEP 2: SHUTDOWN THE PRIMARY DATABASE AND BRING IT UP AS THE NEW STANDBY DATABASE · Shutdown the primary database normally SL sudw imdae Q> hton meit. that is allowed to switch over to a primary database. switchover_status from v$database. or if you have current sessions connected. le aaae omt o wthvr o tnb ih eso hton · Initiate the switchover operation on the primary database. TO STANDBY . with no active sessions. -. During normal operations it is acceptable to see the following values for SWITCHOVER_STATUS on the primary to be SESSIONS ACTIVE or TO STANDBY. the standby database (STDBY) becomes the new primary. The following are steps for switchover operation: STEP 1: SWITCHOVER PREPARATION FOR FORMAL PRIMARY DATABASE · End all activities on the primary and standby database · Check primary database switchover status SL slc dtbs_oe sicoe_ttsfo vdtbs. If SWITCHOVER_STATUS returns SESSIONS ACTIVE then you should either disconnect all sessions manually or you can use the following statement to close those sessions: atrdtbs cmi t sicoe t sadywt ssinsudw.Either this is a standby database and the primary database has not been switched first. RECOVERY NEEDED .Indicates that there are active SQL sessions attached to the primary or standby database that need to be disconnected before the switchover operation is permitted. that is allowed to switch over to a standby database. Q> eet aaaerl. and the primary (PROD) becomes the new standby database. alter system set log_archive_dest_state_2=defer. SWITCHOVER LATENT . alter system set fal_server=NULL scope=both. alter system set log_archive_dest_2='SERVICE=STANDBY reopen=60' scope=both. ALTER SYSTEM SET fal_client='THIS_STANDBY' SCOPE=BOTH --This should be DR DB (Denver) ALTER SYSTEM SET fal_server='PROD' SCOPE=BOTH. switchover_status from v$database. Convert Primary DB to standby SL atrsse sic lgie Q> le ytm wth ofl.This is a primary database. SWITCHOVER PENDING .--------------------------------------------PIAY RMR T SADY O TNB The SWITCHOVER_STATUS column of v$database can have the following values: NOT ALLOWED . a switchover operation is a planned operation.This is a standby database. with no active sessions.html 22/32 .pafumi. or this is a primary database and there are no standby databases. shutdown immediate startup nomount alter database mount standby database. you can perform: SL atrdtbs cmi t sicoe t pyia sadywt ssinsudw.Here we would like to see "PHYSICAL STANDBY TO PRIMARY" alter database commit to switchover to primary. OLD PRIMARY SITE recover managed standby database disconnect In this FULL Example. During switchover operation.Here we would like to see "PRIMARY TO STANDBY" alter database commit to switchover to physical standby with session shutdown.

The old primary (prod_01) has to be discarded and can not be used as the new standby database.net/Standby_Concepts_Configuration. Q> le aaae omt o wthvr o rmr ih eso hton STEP 4: SHUTDOWN THE STANDBY DATABASE AND BRING IT UP AS THE NEW PRIMARY DATABASE · Shutdown the standby database SL sudw imdae Q> hton meit. LE YTM E a_let'RD CP=OH #This DB used on tnsnames. LE YTM E o_rhv_et2' CP=OH · Bring the former primary database in mount mode SL satpnmut Q> tru oon.ora File. STEP 6: PUT THE NEW STANDBY (OLD PROD DATABASE) IN MANAGED RECOVERY MODE · Issue the following command on the new standby database. #This box when is in Standby LE YTM E a_let'TY CP=OH ATRSSE STflsre=PO'SOEBT.ora LE YTM E a_evr'TB' CP=OH . wthvrsau rm $aaae DTBS_OE AAAERL SICOE_TTS WTHVRSAU ------------. The time to create a new standby database exposes the risk of having no standby database for protection. SL atrdtbs mutsadydtbs.Add the following two parameters on the Primary init. you need to modify TNS entry for ‘prod’ to point to the new instance and host name. Check standby database switchover status.b' IE 02 es UOXED F. or SL atrdtbs cmi t sicoe t piaywt ssinsudw.fal_server = “STDBY” or ATRSSE STflcin=PO'SOEBT. . Q> le aaae on tnb aaae STEP 3: SWITCHOVER PREPARATION FOR THE FORMER STANDBY DATABASE · At this time. After failover operation. www. if we see the "SESSIONS ACTIVE". le ytm e o_rhv_et2'EVC=RD epn6' cp=oh atrsse stlgacieds_tt_=nbesoebt. #The new PROD DB used on tnsnames. These two parameters can also be set on the primary database ahead of time for future switchover operation.ora A T R S S E S T f l s r e = S D Y S O E B T . STEP 7: SWITCH THE LOG FILES A COUPLE OF TIMES ON THE NEW PRIMARY DB · Issue the following commands: SL atrsse sic lgie Q> le ytm wth ofl. LE YTM E a_evr'RD CP=OH #The "original" PROD box STEP 5: ADD TEMP TABLESPACE · Issue the following command to add TEMP tablespace ATRTBEPC TM ADTMFL 'u2oaaapo/ep1df SZ 37MrueATETN OF LE ALSAE EP D EPIE /0/rdt/rdtm0. Q> eet aaaerl. · · Bring up the former standby database as the new primary database SL satp Q> tru.fal_client = “PROD_01” .fal_client = “STDBY” . now we will prepare the original standby and convert it to primary. STEP 8: CHANGE TNS ENTRY FOR THE NEW PRIMARY DATABASE · Change the TNS entry on all application hosts to point to the new primary Prod = (description = (address = (protocol = tcp) (host = server_02) (port = 1522) (connect_data = (sid = stdby)) ) Here is a nice Video about the steps: http://www.fal_server = “PROD” . During a failover. le ytm e o_rhv_etsae2eal cp=oh A T R S S E S T f l c i n = S B ' S O E B T . SL atrdtbs rcvrmngdsadydtbs dsonc fo ssin Q> le aaae eoe aae tnb aaae icnet rm eso.ora File: log_archive_dest_2 and log_archive_dest_state_2. SL atrsse sic lgie Q> le ytm wth ofl. Modify the former standby database’s initialization file .Remove the following parameters from the Primary init. we need to act as we did it before. It is possible to have data loss.com/watch?v=lcSz9PoqXu0&feature=player_embedded PHYSICAL STANDBY FAILOVER STEPS Failover is only performed as a result of an unplanned outage of the primary database. we have 2 standby Databases. You need to create a new standby database by backing up the new primary and restore it on host server_01. the standby database (prod_02) becomes the new primary database.Add parameters log_archive_dest_2 and log_archive_dest_state_2 atrsse stlgacieds_=SRIEPO roe=0 soebt.--------------------------------------------PYIA SADY HSCL TNB T PIAY O RMR · Initiate the switchover operation on the standby database SL atrdtbs cmi t sicoe t piay Q> le aaae omt o wthvr o rmr. just defer if you like ATRSSE STlgacieds_='SOEBT. Or. SL slc dtbs_oe sicoe_ttsfo vdtbs.pafumi.html 23/32 .10/24/12 Standby Concepts and Configuration · Modify the former primary database’s initialization file .youtube.

Create or Add a tempfile to the temporary tablespace: Ex: cet tmoaytbepc TM2TMFL 'oal/rdt/91tm2df sz 10.b’ ie 0M IMPLEMENTATION TIPS Here are several tips for implementing Data Guard: TIP #1: PRIMARY ONLINE REDO LOGS The number of redo groups and the size of redo logs are two key factors in configuring online redo logs. you need to create a new incarnation of the target database. This is required for a no data loss strategy. creates a new resetlogs branch. Here is the SQL command to set FORCE LOGGING: SL slc frelgigfo vdtbs. ORA-00394: online log reused while attempting to archive it TIP #2: STANDBY ONLINE REDO LOGS VS. 2. administrators may issue the ALTER DATABASE ACTIVATE STANDBY DATABASE statement to perform an immediate failover. Note: Include the FORCE keyword to ensure that the RFS processes on the standby database will fail over without waiting for the network connections to time out through normal TCP timeout processing before shutting down. LGWR process may take longer to write to the remote standby sites. The size of redo log is determined by the amount of transaction needed to be applied to a standby database during database failover operation./di/rdt/ep1df sz 10 . If so desired. you try to create the fewest groups possible without hampering the log writer process’s ability to write redo log information. but it may increase standby database lag time and potential for more data loss. rae eprr alsae EP EPIE /rceoaaaV0/ep. On the other hand.If the standby database was never opened read-only since the last time it was started. For example. Q> eet oc_ogn rm $aaae FRELGIG OC_OGN ------------N O SL atrdtbs frelgig Q> le aaae oc ogn. Otherwise. SATP TRU. shut down the target standby database and restart it: SUDW IMDAE HTON MEIT. however. STANDBY ARCHIVED REDO LOGS Online redo logs transferred from the primary database are stored as either standby redo logs or archived redo logs. TIP #4: RMAN BACKUP A failover operation reset logs for the new primary. and opens the database. then open the new production database by issuing the following statement: ATRDTBS OE.Pre-allocated files .pafumi. A small size of redo will minimize the standby database lag time.Can be duplexed for more protection .Reduce lag time .Convert the physical standby database to the production role: ATRDTBS CMI T SICOE T PIAY LE AAAE OMT O WTHVR O RMR.Can place on raw devices . LE AAAE PN If the physical standby database has been opened in read-only mode since the last time it was started.net/Standby_Concepts_Configuration.Initiate the failover by issuing the following on the target standby database: ATRDTBS RCVRMNGDSADYDTBS FNS FRE LE AAAE EOE AAE TNB AAAE IIH OC.No Data Loss capable TIP #3: ENFORCE LOGGING It is recommended that you set the FORCE LOGGING clause to force redo log to be generated for individual database objects set to NOLOGGING. Note: In rare circumstances. (note: use of Data Guard real-time apply will avoid this delay by keeping apply up to date on the standby database). In general. your RMAN backup will fail. MN ee aaae TIP #5: DISABLE LOG TRANSPORT SERVICES WHEN STANDBY DATABASE IS DOWN www. If you use RMAN to backup your database.Improve redo data availability . This statement converts the standby database to the production database. you may receive incomplete logs on the standby sites.10/24/12 Standby Concepts and Configuration Steps 1. Otherwise. 3.html 24/32 . In a Data Guard environment. the following message from the alert log may indicate a need for more log groups. The best way to determine if the current configuration is satisfactory is to examine the contents of the log writer process’s trace file and the database’s alert log. administrators may wish to avoid waiting for the standby database to complete applying redo in the current standby redo log file before performing the failover.b' ie 0M or atrtbepc TM adtmfl ‘oal/p/rdc/.No extra ARCH process . it may cause more frequent log switches and require more redo groups for log switches to occur smoothly. RA>rstdtbs. you may need to add additional groups to guarantee that a recycled group is always available to the log writer process. le alsae EP d epie /rceappout92amnoaaatm0. Which redo log reception option should we choose? Here is the comparison chart: Standby Online Redo Logs Standby Archived Redo Logs Advantages . large size redo logs may require few groups and less log switches.

95 71 **15/b/cit/klrlgs .o > aet$SD. you can issue this command on the primary database before bring down the standby database: SL atrsse stlgacieds_tt_ =dfr Q> le ytm e o_rhv_etsae2 ee.o oc lr_{I}lg ctaetwr. epr OAL_OEL_IRR_AH$RCEHM/i xot RCEHM DLBAYPT=OAL_OElb epr TSAMN/a/p/rce xot N_DI=vrotoal epr OAA=vrotoal/rtb xot RTB/a/p/rceoaa PT=PT:OAL_OE$RCEHM/i:urcsbn/i:urbn/s/bn/ AH$AH$RCEHM:OAL_OEbn/s/c/i:bn/s/i:ursi: si:uroewnbn/p/i:.aetwr.b@opn.o m f lr_oklg dn oe Paetesrp i acotb lc h cit n rna: ############################# ############################ #CekSadylgfl hc tnb o ie ############################# ############################ 91. To avoid such problem. xot AH BLS=piaydacmaycmaohrdacmaycm.2. Oracle has introduced Standby-First Patch Apply to enable a physical standby to use Redo Apply to support different software patch levels between a primary database and its physical standby database for the purpose of applying and validating Oracle patches in rolling fashion.2) release 11.93.r f i i [`a aeterw -`-t0] f ct lr.h # klrlgs # # ################################## ################################## #/i/s !bnkh epr EIO=i xot DTRv epr OAL_AE/0/p/rce xot RCEBS=u1apoal epr OAL_OE$RCEBS/rdc/020 xot RCEHM=OAL_AEpout1. However.0.2.html 25/32 . SL atrdtbs rcvrmngdsadydtbs dly5dsonc.nte.1 for more information and the README for each patch to determine if a target patch is certified as being a Standby-First Patch. Patches eligible for Standby-First patching include: • Patch Set Update (PSU) • Critical Patch Update (CPU) • Patch Set Exception (PSE) • Oracle Database bundled patch • Oracle Exadata Database Machine bundled patch • Oracle Exadata Storage Server Software patch Standby-First Patch Apply is supported for certified software patches for Oracle Database Enterprise Edition Release 2 (11. When the standby database is up again. The new configuration now support up to nine standby sites (including logical standby database).o. www.h Applying Patches with Standby Beginning with Oracle Database 11. Especially during a heavily transaction period.lr_oklg lr.9 -7 . LOG FILE FOR ERRORS.92.dasrpscaeto. Q> le ytm e o_rhv_etsae2 nbe TIP #6: STANDBY DATABASE UPGRADE Steps to upgrade standby database to newer database version: Step 1: Shutdown both primary and standby databases Step 2: Install Oracle software on both primary and standby hosts Step 3: Upgrade the primary database Step 4: Rebuild standby database from the upgraded primary TIP #7: DATA GUARD BROKER Starting on Oracle9i R2 broker has made great improvements.r f i r ..aet$SD.o >aeter rp R. it can temporarily freeze the primary database even the data protection mode is set to rapid mode.b@opn. you may opt to implement a delay of minutes or hours on your standby #2 to allow recover from a possible physical or logical corruption on your primary database. For instance.r|c l g te hn mix.xot frSDi `a $RCEHM/ils` o I n ct OAL_OEsdit d o c $RCEBS/di/SDbup d OAL_AEamn$I/dm i [.net/Standby_Concepts_Configuration.1 and later. your standby #1 may not have ‘Delay’ on to be your disaster recovery standby database.o ] f f lr_{I}lg te hn m aet$SD. issue: SL atrsse stlgacieds_tt_ =eal.epr PT DAIT"rmr.it a lr_oklg > lr_{I}hs ge OA aetwr.pafumi.o"epr bn/s/pni/i:otbn. one behavior observed in Oracle is that when one of the standby database is down for maintenance. Q> le aaae eoe aae tnb aaae ea icnet TIP #9: ALWAYS MONITOR LOG APPLY SERVICES AND CHECK ALERT.aeter m f lr. TIP #8: USING ‘DELAY’ OPTION TO PROTECT LOGICAL/PHYSICAL CORRUPTIONS You may utilize the delay option (if you have multiple standby sites) to prevent physical/logical corruption of your primary.o aetwr. it is advisable to temporarily disable the log transport services for that site.o v lr_{I}lg lr_oklg tuhaet$SD. Both Data Guard Manager and CLI support switchover and failover operations.94."{I}OAL AETERR"$BLS <aeter al s $SD RCE LR ROS DAIT lr.r r .10/24/12 Standby Concepts and Configuration When a standby database or host is down for maintenance.h a klrlgs ################################## ################################## # caeto. here is a script to help you to monitor your standby database recover process: $ctcaeto. If you are not using Data Guard broker. Refer to My Oracle Support Note 1265700.

16. agents and other processes running against the ORACLE_HOME. eoe aae tnb aaae oea icnet 11.1 . You can enable the Data Guard Broker Configuration DGMGRL> enable configuration. Startup nomount the STANDBY database. you should either disable the Data Guard Broker Configuration DGMGRL> disable configuration.10/24/12 Standby Concepts and Configuration For other type of patches or older versions of Oracle . %lnclsat srt tr 8. If using Real Application Clusters perform this step on all nodes. 2. If using Real Application Clusters perform this step on all nodes. sudw imdae hton meit %aett so gncl tp %lnclso srt tp 6. Stop all listeners. Verify the STANDBY database has been recovered to the log sequence from step 12. On the PRIMARY instance run the following command: atrsse dsbersrce ssin le ytm ial etitd eso. slc mxsqec# fo vlghsoy eet a(eune) rm $o_itr. or stop the Data Guard Broker (set db_broker_start=false) during the Upgrade. 14. 3.For Physical Standby use note ML Note 187242.q For the interim patch. Once the catpatch. Please see the Patch readme for specific instructions. Mount the STANDBY database. %. rcvrmngdsadydtbs cne. 7. Shut down the existing Oracle Server instance on the PRIMARY host with immediate priority. Please note that it is not necessary to shudown the STANDBY in conjuction with the PRIMARY during the "Post Install Actions". Stop all listeners. or restart the Data Guard Broker (set db_broker_start=true) again once the Upgrade completed successfully. sudw imdae hton meit %aett so gncl tp %lnclso srt tp 4. www. slc ds_d sau fo vacieds.1 Procedure to Apply a Patch Set with Physical Standby Database in Place (ML Note 187242. 17. Ensure that remote archiving to the STANDBY database is functioning correctly by switching logfiles on the PRIMARY and verifying that v$archive_dest. %slls" a ssb" qpu / s yda satpmgae tru irt 12. run opatch per the patch README. Startup the PRIMARY instance on the primary host. Once the patchset/patch has been installed on on all hosts/nodes startup the STANDBY listener on STANDBY host. 15. Log in to the oracle account on both the PRIMARY and STANDBY hosts and make sure the environment is set to the correct ORACLE_HOME and ORACLE_SID. atrdtbs mutsadydtbs. run any scripts as outlined in the README. rcvrmngdsadydtbs ndlydsonc. %slls" a ssb" qpu / s yda satpnmut tru oon 9. be sure the install has propagated to the other nodes if using private ORACLE_HOMEs.sql script / patch SQL scripts completes make note of the current log sequence and issue the following command: atrsse acielgcret le ytm rhv o urn. agents and other processes running against the ORACLE_HOME. If you are not performing remote archiving make note of the current archive log sequence. atrsse acielgcret le ytm rhv o urn.1) NOTE: If you are using the Data Guard Broker.status is valid. Place the STANDBY database in managed recovery mode. le aaae on tnb aaae 10.For Logical Standby use note ML Note 210989. tts rm $rhv_et 13.pafumi. eoe aae tnb aaae acl 5. Cancel managed recovery on the STANDBY database. On both the PRIMARY and STANDBY host uncompress and untar the downloaded patch set / interim patch file into a new directory. Run the Installer and install the patchset on both PRIMARY and STANDBY host. 1.html 26/32 . If using Real Application Clusters. Complete the remainder of the "Post Install Actions" from the Patch Set readme on the primary host.rnntle /uIsalr If this is an interim patch. eet eti. Shutdown the STANDBY instance on the STANDBY host.net/Standby_Concepts_Configuration. On the PRIMARY instance run the following script: @/dm/di/apthsl ?rbsamnctac.

eet a(eune) rm $rhvdlg Standby Concepts and Configuration 18. The datafiles are not automatically created on the standby site. issue the following SQL statement for the archived log destination that experienced the network failure. a eune 0756 AlFLsre hsbe atmtd l A evr a en tepe. Pausing/Starting from PROD alter system set log_archive_dest_state_2='defer'. The V$ARCHIVE_DEST view contains the network error and identifies which standby database cannot be reached.dbf'. le aaae on tnb aaae RCVRATMTCSADYDTBS." a log switch is not possible. then: atrdtbs rcvrmngdsadydtbs dsonc fo ssin le aaae eoe aae tnb aaae icnet rm eso.Copy the arch logs that doesn't exist on the DR box 2." a log switch is possible.Apply them by using the following command: SL atrdtbs rcvrmngdsadydtbs dsonc fo ssin Q> le aaae eoe aae tnb aaae icnet rm eso.N''E' sic_osbe FO VLG RM $O WEEACIE=YS. Then create datafile command from startup mount is: alter database create datafile '/home/orahome/data/721/users02. You can issue the following SQL query to determine whether the primary database stalled because it was not able to switch to an online redo log: SLC dcd(ON()0'O. For example.html 27/32 .-----------------. then you need to perform the following: 1. On the PRIMARY : On the STANDBY : slc mxsqec# fo vlghsoy eet a(eune) rm $o_itr.. just perform the following: atrsse sta_mpoess0soebt. Getting 'Restarting dead background process QMN0' on Alert Log File If you get many of this messages. WdMy3 1:12 20 e a 1 02:8 06 Rsatn da bcgon poesQN etrig ed akrud rcs M0 Then try with : RCVRATMTCSADYDTBS. If you see errors on the Alert. the redo does not create a new datafile for you.see DBWR trace file ORA-01110: data file 16: '/oracle/oradata/FGUARD/undotbs02. recovery can continue. EOE UOAI TNB AAAE If you get : OA013 a icmail mdarcvr i atv R-15: n noptbe ei eoey s cie Then stop/restart DR and try the last command again: satpnmut tru oon. TTS RO RM $RHV_ET HR ETI .net/Standby_Concepts_Configuration.pafumi.dbf' ORA-27037: unable to obtain file status Problem Explanation: The datafiles do not exist on the standby database. because the primary database will not be able to switch to an online redo log that has not been archived.----. alter system set log_archive_dest_state_2='enable'. For example: SLC DS_D SAU.10/24/12 slc mxsqec# fo vacie_o. le ytm e qt_rcse= cp=oh Gap Detected If there is a gap on the arch log files.Tra # 1 gpsqec:50-00 ald o eus a eune hed : . DS_D ETI SAU TTS ERR RO ----.YS)"wthpsil" EET eoeCUT*. Solution Description: Create the datafile(s) on the standby database. if the output displays "No. When the files exist. Once all "Post Install Actions" have been completed verify the STANDBY database has been recovered to the last archive log produced by the PRIMARY . EOE UOAI TNB AAAE After recovery is done. a eune 0756 Tyn FLsre:PO_GAD rig A evr RDFUR WdMy3 1:94 20 e a 1 01:1 06 Fie t rqetgpsqec. atrdtbs mutsadydtbs. Resolving Problems After adding a datafile to primary database. Recovering After a Network Failure The primary database may eventually stall if the network problem is not fixed in a timely manner.ERRFO VACIEDS WEEDS_D=2 EET ETI. On the primary database. HR RHVD'E' If the output from the query displays "Yes.log file like: Fthn gpsqec frtra 1 gpsqec 50-00 ecig a eune o hed . recovery of the standby database fails with the following error messages: ORA-01157: cannot identify/lock data file 16 .----------------- www.

Q> le aaae eoe aae tnb aaae acl If you try to recover from the standby you will get: SL rcvrsadydtbs.C' 6-Catalog the Incremental Backups on The Standby Server Note that for the catalog command to succeed you will need to move the backups to be within the Flash Recovery Area. LE YTM E O_RHV_ET2 SRIEsady PINL EPN6' When the network problem is resolved. many required archived logs to close the gap were removed and no backup of them was available. ETR TNB OTOFL RM Z\AKPFRTBCR.html 28/32 . RMAN will ask you if you want to catalog the new files.c' 4. When the network problem is resolved. If the listener is stopped. and if the physical standby database is specified as a mandatory destination. you can change the archive destination from optional back to mandatory: ATRSSE STLGACIEDS_ ='EVC=tnb1MNAOYROE=0. SL atrdtbs fahako. When you execute the catalog command.10/24/12 2 ERR RO Standby Concepts and Configuration OA124 TSn lsee R-22: N:o itnr The query results show there are errors archiving to the standby database. and the cause of the error as TNS:no listener. akp nrmna rm c 16778 aaae OMT Z\AKPFRSADY%' a FRTNB' bcu cretcnrliefrsadyfra ':BCU\OSDYTLbk.pafumi.R R-08: ugsin :OAL\RDT\AIACIE12564577AC OA020 cag 44813 frtra 1i i sqec #0 R-08: hne 16779 o hed s n eune 25 2-Check Standby Database current_scn SL slc cretsnfo vdtbs.Create a Primary Database Incremental Backup FROM this SCN and a Control File for Standby ra tre ssps@RD mn agt y/asPO bcu iceetlfo sn44813 dtbs FRA ':BCU\O_TNB_U tg'OSADY. Q> eet urn_c rm $aaae CRETSN URN_C ---------44813 16778 3. you can enable the archive destination again: ATRSSE STLGACIEDS_TT_ =EAL. then start it If you cannot solve the network problem quickly.net/Standby_Concepts_Configuration. Q> le aaae lsbc n www. try to prevent the database from stalling by doing one of the following: # Disable the mandatory archive destination: ATRSSE STLGACIEDS_TT_ =DFR LE YTM E O_RHV_ETSAE2 EE. you will need to say YES.Cancel Recovery on Standby SL atrdtbs rcvrmngdsadydtbs cne. LE YTM E O_RHV_ETSAE2 NBE # Change the archive destination from mandatory to optional: ATRSSE STLGACIEDS_ ='EVC=tnb1OTOA ROE=0. LE YTM E O_RHV_ET2 SRIEsady ADTR EPN6' Data Guard Scenarios Synchronize a GAP on the STANDBY when the required archived logs are lost Scenario: All archived logs were removed from primary database.Transfer The Incremental Backup Sets to the Standby Server 5-Restore controlfile on the Standby ra tre ssps@TNB mn agt y/asSADY RSOESADYCNRLIEFO ':BCU\OSDYTLBK. In order to close the gap you need to create an incremental backup that will contain all transactions since the last scn recorded on the standby database. akp urn otofl o tnb omt Z\AKPFRTBCR. aao tr ih Z\R\AIT\AKPE' sacigfralflsta mthteptenZ\R\AIT\AKPE erhn o l ie ht ac h atr :FASTSDBCUST Ls o FlsUkont teDtbs it f ie nnw o h aaae =================== ================== Fl Nm:Z\R\AIT\AKPE\O_TNB_741J11 ie ae :FASTSDBCUSTFRSADYAK7D__ Fl Nm:Z\R\AIT\AKPE\O_TNB_841K11 ie ae :FASTSDBCUSTFRSADYAK7D__ Fl Nm:Z\R\AIT\AKPE\O_TNB_941F11 ie ae :FASTSDBCUSTFRSADYAK7E__ Fl Nm:Z\R\AIT\AKPE\O_TNB_A41L11 ie ae :FASTSDBCUSTFRSADYAK7G__ D yural wn t ctlgteaoefls(ne YSo N) ys o o ely at o aao h bv ie etr E r O? e ctlgn fls. MN eoe aaae oeo … … SL atrdtbs fahakof Q> le aaae lsbc f. The standby had lagged far behind the primary.. You should check whether the listener on the standby site is started. ctlgn dn aaoig oe 7-Recover the Database and Cleanup Redologs RA>rcvrdtbs nrd. Implementation Steps 1. Dtbs atrd aaae lee. Q> eoe tnb aaae OA029 cag 44813 gnrtda 1/120 1:90 nee frtra 1 R-07: hne 16779 eeae t 23/08 13:3 edd o hed OA029 sgeto :Z\RCEOAAAST\RHV\_0_7751. aaoig ie. ctlgsatwt ':FASTSDBCUST.

lsbc_n rm $aaae DTBS_OE AAAERL FAHAKO LSBC_N -------. This allows the physical standby database to be utilized for read/write reporting and cloning activities.---------------. reducing storage consumption on the logical standby and improving Data Guard manageability. The Redo Protocol gets transmitted with SYNC to the Standby Database and is applied there with Real-Time Apply. LONGRAW. are automatically deleted. and without incurring any data loss. Q> eet rm ct. This makes it easier to maintain both primary and logical standby databases. In 10g relase2. such as NCLOB. without requiring any manual steps to invoke the failover. Q> eet aaaerl. Prima & Physt are both creating Flashback Logs: SL cnetssoal@rm a ssb Q> onc y/rcepia s yda SL slc dtbs_oefahako fo vdtbs. they are deleted automatically without DBA intervention. hitting the Primary Site. by using Flash Recovery Area option. I will now flashback the Primary to get back Scott: SL sudw imdae Q> hton meit SL satpmut Q> tru on SL fahakdtbs t tmsapssietm -itra '5 mnt.net/Standby_Concepts_Configuration.10/24/12 Standby Concepts and Configuration Dtbs atrd aaae lee. In case of “Flashback Table To Timestamp” or “Flashback Table To Before Drop”. even if in an Data Guard Environment. that in case of a Disaster. If we do “Flashback Database” instead. First. This capability allows Data Guard to automatically. Using Flashback with Data Guard If a Logical Mistakes happen. No downtime required to generate Logical Standby: The primary database is no longer required to shutdown or be put in QUIESCING state. the DBA no longer required to shutdown the primary database to upgrade from Oracle 10g release 2 with Data Guard option. At this point. The background behind that is. we can address them with the Flashback techniques. Online upgrades: A lot of DBAs have dreamed about this for long time. the modern way is to go with flashback. Easy conversion of a physical standby database to a reporting database A physical standby database can be activated as a primary database.BINARY_DOUBLE. This posting is designed to show you how to do that: DMR>so cniuain GGL hw ofgrto Cniuain ofgrto Nm: ae mc yf Eald nbe: YS E Poeto Md: rtcin oe Mxviaiiy aAalblt Dtbss aaae: pia-Piaydtbs rm rmr aaae pyt-Pyia sadydtbs hs hscl tnb aaae Fs-tr Fioe:DSBE atSat alvr IALD Cretsau fr"yf: urn tts o mc" SCES UCS This is an 11g Database. and then finally upgrade the old primary database. test and validate the upgrade. introduced in Oracle Database 10g already. Physical standby databases have already had this functionality since Oracle Database 10g Release 1.--------PYIA SADYYS HSCL TNB E Now we perform the "error": SL slc *fo sotdp. with Flash Recovery Area.html 29/32 . a Delay would cause a longer Failover time. Q> lsbc aaae o ietm ytmsap nevl 1' iue SL atrdtbs oe rstos Q> le aaae pn eelg.---------------. opened read/write for reporting purposes. I always used to hesitate whenever I thought of logical standby databases. This act restores high availability to the Data Guard configuration. SL atrdtbs rcvrmngdsadydtbs dsonc fo ssin Q> le aaae eoe aae tnb aaae icnet rm eso. there is nothing special to take into account regarding the Standby Database. as we can create the logical standby database from a hotbackup of the primary database just like the physical standby database. LONG.--------PIAY RMR YS E SL cnetssoal@hs a ssb Q> onc y/rcepyt s yda SL slc dtbs_oefahako fo vdtbs. Oracle supports most of the datatypes. Following a fast-start failover. We could have configured a Delay in the Apply there to address such scenarios. Data Guard automatically reinstates it to be a standby database. and then flashed back to a point in the past to be easily converted back to a physical standby database.et SL do ue sotcsae Q> rp sr ct acd. But that is somewhat “old fashioned”. If more archived logs were created on the primary since the finish of the SCN based incremental backup then you can copy tehm over and recover the standby database using the command : “recover standby database" 8. Q> eet aaaerl. Data Guard automatically synchronizes the standby database with the primary database. upgrade the logical standby database to the next release. www. that needs a special treatment of the Standby Database. Dtbs atrd aaae lee. Automatic deletion of applied archived redo log files in logical standby databases Archived logs. It will simply replicate these actions accordingly.lsbc_n rm $aaae DTBS_OE AAAERL FAHAKO LSBC_N -------. once they are applied on the logical standby database. as some of my databases never meet the pre-requisite conditions.Enable the broker at both sites and check When enabling the broker again it will take over the responsibility of managing the site and will resynchronize both sites SL atrsse std_rkrsattu soebt. but the shown technique should work the same with 10g also. Fast-Start Failover. do a role reversal by switching over to the upgraded database. Physical standby databases have had this functionality since Oracle 10g Release 1. and quickly fail over to a previously chosen.IOTs.pafumi. In other words: The Logical Mistake has already reached the Standby Database. once the old primary database is repaired.BINARY_FLOAT. New Datatypes Supported. synchronized standby database in the event of loss of the primary database. Q> le ytm e gboe_tr=re cp=oh Improvements in Oracle Data Guard in Oracle 10gr2 Automatic Deletion of applied archive logs: Once primary database Archived logs are applied to a Logical Standby Database.

In 10g.--------Ls apid : 1-U-90:41 at ple 6JL0:92:6 Ls rcie : 1-U-90:83 at eevd 6JL0:92:6 slc NM Nm.D-O-YH2:IS' ie fo vacie_o rm $rhvdlg weesqec#=(eetmxsqec# fo vacie_o) hr eune slc a(eune) rm $rhvdlg. Q> eet eelg_hne rm $aaae RSTOSCAG# EELG_HNE ---------------242 923 SL cnetssoal@hs a ssb Q> onc y/rcepyt s yda SL fahakdtbs t sn242. GGL dt aaae hs e tt=pl-n Scedd ucee. lsbc opee Note = I subtracted 2 from the Resetlogs Change No.t_hrnx_ie'DMNY:H4M:S)Tm eet Ls ple os oca(ettm.html 30/32 .ul''fo da eet ulnl.D-O-YH2:IS' ie fo vacie_o rm $rhvdlg weesqec#=(eetmxsqec# fo vacie_o weeapid'E' hr eune slc a(eune) rm $rhvdlg hr ple=YS) uin no slc 'atrcie :'Lg. in order to restart the Redo Apply successfully: DMR>so cniuain GGL hw ofgrto Cniuain ofgrto Nm: ae mc yf Eald nbe: YS E Poeto Md: rtcin oe Mxviaiiy aAalblt Dtbss aaae: pia-Piaydtbs rm rmr aaae pyt-Pyia sadydtbs hs hscl tnb aaae Fs-tr Fioe:DSBE atSat alvr IALD Cretsau fr"yf: urn tts o mc" Wrig OA167 oeo mr dtbsshv fie ann: R-60: n r oe aaae ae ald DMR>so dtbs pytsaurpr GGL hw aaae hs ttseot SAU RPR TTS EOT ISAC_AE SVRT ERRTX NTNENM EEIY RO_ET * ERROA170 tesadydtbs hsdvre RO R-60: h tnb aaae a iegd fo tepiaydtbs rm h rmr aaae * ERROA176 Rd Apyi sopd RO R-66: eo pl s tpe Please notice that the show statusreport clause is a new feature of 11g. NT nt fo vdtgadsas rm $aaur_tt uin no slc nl. DMR>so cniuain GGL hw ofgrto Cniuain ofgrto Nm: ae mc yf Eald nbe: YS E Poeto Md: rtcin oe Mxviaiiy aAalblt Dtbss aaae: pia-Piaydtbs rm rmr aaae pyt-Pyia sadydtbs hs hscl tnb aaae Fs-tr Fioe:DSBE atSat alvr IALD Cretsau fr"yf: urn tts o mc" SCES UCS Simple as that!!! Monitor Data Guard slc 'atapid :'Lg. you need to look into the Broker Logfile to retrieve that problem.t_hrnx_ie'DMNY:H4M:S)Tm eet Ls eevd os oca(ettm. above to make sure that we get to a time before the error. shortly before the present time of the Primary.net/Standby_Concepts_Configuration. SL cnetssoal@rm a ssb Q> onc y/rcepia s yda SL slc rstoscag#fo vdtbs. that was not different from a Flashback Database Operation without Data Guard. I need to put it into a time. DMR>so cniuain GGL hw ofgrto Cniuain ofgrto Nm: ae mc yf Eald nbe: YS E Poeto Md: rtcin oe Mxviaiiy aAalblt Dtbss aaae: pia-Piaydtbs rm rmr aaae pyt-Pyia sadydtbs hs hscl tnb aaae Fs-tr Fioe:DSBE atSat alvr IALD Cretsau fr"yf: urn tts o mc" Wrig OA167 oeo mr dtbsshv fie ann: R-60: n r oe aaae ae ald DMR>ei dtbs pytstsaeapyo. rm ul uin no www.10/24/12 SL slc *fo sotdp. Q> eet rm ct.et Standby Concepts and Configuration There he is again! Until now. Q> lsbc aaae o c 921 Fahakcmlt. because it is “in the future of the Primary Database”.pafumi.---------------. LG OS TM IE -------. But now my Standby Database is no longer able to do Redo Apply.VLEVle UI Ui eet AE ae AU au.

10.1 Handling Problematic DDL with Data Guard SQL Apply 271455.1 Changing Storage Definition in a Logical Standby Database 565535.11.1 Rolling Upgrades with Logical Standby 290814.Tm optd |MNTM_OPTD fo vdtgadsas rm $aaur_tt.1 Installing and Using Standby Statspack in 11gR1 434164.----------.1 Upgrading to 10g with a Physical Standby in Place 278371.7 737460.1 Rolling a Standby Forward using an RMAN Incremental Backup in 10g 278643.1 Data Guard GUI ASM restrictions 273177.1 Creating a Logical Standby with a Different Block Size Than Primary 300479.3 .0.1 Redo Transport Compression in a Data Guard Environment.1.11.1 RMAN backups in Max Performance/Max Availability Data Guard Environment 312434.1 Data Guard Support for Mixed HP PA-RISC 64-bit and HP Itanium Environments 370434.2.7 751528.ul'ieCmue:'|I(IECMUE) eet ulnl.1 Oracle Data Guard Readme for SQL Apply Release 10.1.net/Standby_Concepts_Configuration. EM.1 Example Usage of the DBMS_LOGSTDBY Package 243709.1 Removing Archived Redo Log Files No Longer Needed By SQL Apply 273015.1 Cascaded Standby Database 395982.1 364290.1 Data Guard Redo Log Repository Example 416314.1 Using standby_file_management with Raw Devices 304061. 10.1 Script to Collect Data Guard Logical Standby Diagnostic Information 241438.1 Oracle Data Guard Switchover & Failover Best Practices 269954.1.1 Synchronizing tables in a Logical Standby Database 271448.1 How to make CRS aware of the role change in Data Guard environment? 368276.1 Script to Collect Data Guard Primary Site Diagnostic Information 239100.1. 0 00:72 dy2 t scn()itra a() o eod1 nevl apylg pl a +00:15 0 00:9 dy2 t scn()itra a() o eod0 nevl etmtdsatptm 1 siae tru ie 6 scn eod sadyhsbe oe N tnb a en pn tasotlg rnpr a +00:00 0 00:0 dy2 t scn()itra a() o eod0 nevl Tm Cmue:1-U-090:31 ie optd 6JL20 93:6 slc t_hrmxls_ie.1 Installing Database Vault in a Data Guard Environment.1 SQL Apply and Extended Datatype Support 756732.4 304059.10/24/12 Standby Concepts and Configuration slc nl.1 .1 Oracle Data Guard and SSH 754065.0.3 303421. 11.1 Applying Patchset with a 10g Logical Standby in Place 278641.1 Role Transitions for Data Guard Configurations Using Mixed Oracle Binaries 409013.1 Script to Collect Data Guard Physical Standby Diagnostic Information 241374.0.1 Oracle Data Guard Readme for SQL Apply Release 10.1 Potentially Longer Instance Recovery Timings in a MAA Configuration When Using Logical Standby 603361.1 Creating a Logical Standby with Minimal Production Downtime 278108.html 31/32 .1 Applying Patchset with a 10g Physical Standby in Place 278521.4 .1 Migrating to RAC using Data Guar 271463.6 .1 Creating a Logical Standby from a Hot Backup 233519.1 Reinstating a Physical Standby Using Backups Instead of Flashback 413696.1 Script to Collect Data Guard Logical Standby Table Information 257341.1 Monitoring Physical Standby Progress 241512.----------.0.1 Oracle10g Data Guard SQL Apply Troubleshooting 305360.1 Data Guard Physical Standby Switchover/Failover Detailed Best Practices.1. NM AE VLE AU UI NT ----------.1 Data Guard Support for Heterogeneous Primary and Standby Systems in Same Data Guard Configuration 414043.1 Developer and DBA Tips for Pro-Actively Optimizing SQL Apply 454848. 10. or SQL*Plus 729551.2.1 Known Issues with Logical Standby www.----------------apyfns tm pl iih ie +00:20.1 Data Guard Protection Modes Explained 234631.1 Reinstating a Logical Standby Using Backups Instead of Flashback Database 416310.1 Step By Step Guide On How To Recreate Standby Control File When Datafiles Are On ASM And Using Oracle Managed Files 749947.0.1 Global Customer Service Escalation Process 331924.0.1 Flashback Database Best Practices & Performance 559353.pafumi.1 Data Guard and Oracle Standard Edition 304488.2.1 Steps to workaround issue described in Alert 308698.Data Guard Broker.0.0.---------------------------.1 Enabling Encryption for Data Guard Redo Transport using the Advanced Security Option 751600.1 Data Guard Broker does not support Cold Failover Clusters 413484.1 Upgrading to 10g with a Logical Standby in Place 276636.D-O-YYH2:IS' "eoost" eet oca(a(attm)'DMNYY H4M:S) Rd nie fo vsadylg rm $tnb_o Rd ost eo nie ------------------1-U-090:24 6JL20 94:4 More Information Data Guard related Metalink Notes 734862.

oracle.net/Standby_Concepts_Configuration.html 32/32 .1 Data Guard Gap Detection and Resolution 232240.1 Creating a Data Guard Configuration All Docs in ML for Data Guard http://metalink.showDocument?p_database_id=NOT&p_id=185750.pafumi.com/metalink/plsql/ml2_documents.1 Performing Switchover in a Data Guard Configuration 180031.1 Data Guard Wait Events 233261.10/24/12 Standby Concepts and Configuration 233491.1 Tuning SQL Apply Operations for Logical Standby 232649.1 www.

Sign up to vote on this title
UsefulNot useful