Oracle Data Guard


Published on

Published in: Technology
1 Comment
No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide
  • Oracle Data Guard

    1. 1. Oracle Data Guard
    2. 2. Causes of Data Loss Source: Disaster Recovery Journal Hardware & system errors Natural disasters 3% Software corruption 4% Computer viruses 7% Human errors 36% 49%
    3. 3. Real Application Clusters Continuous Availability for all Applications Data Guard Guaranteed Zero Data Loss Flashback Guaranteed Zero Data Loss Dynamic Reconfiguration Capacity on Demand without Interruption Online Redefinition Adapt to Change Online ASM Mirroring Storage Failure Protection Human Error Site Failures Storage/Net Failures Unplanned Downtime System Failures System Maintenance Planned Downtime Database Maintenance
    4. 4. What is a Standby Database ? <ul><li>A copy of a production database that you can use for disaster protection. You can update the standby database with redo logs from the production database in order to keep it current. If a disaster destroys the production database, you can activate the standby database and make it the new production database. </li></ul><ul><li>You can maintain the standby data in one of the following modes: </li></ul><ul><ul><li>For physical standby databases </li></ul></ul><ul><ul><ul><li>Redo Apply </li></ul></ul></ul><ul><ul><li>For logical standby databases </li></ul></ul><ul><ul><ul><li>SQL Apply </li></ul></ul></ul><ul><li>A Standby Database is NOT Data Guard </li></ul>
    5. 5. Why Data Guard? <ul><li>Data Guard helps you protect your Data. </li></ul><ul><ul><li>Takes your data and automatically puts it elsewhere </li></ul></ul><ul><ul><li>Makes it available for Failover in case of failure. </li></ul></ul><ul><li>The apply process also revalidates the log records to prevent application of any log corruptions </li></ul><ul><li>Geographically dispersed sites </li></ul><ul><li>Useful for logical data corruptions if lag behind used </li></ul><ul><li>Flexible configuration options for protection level </li></ul><ul><li>Reporting and backups can be diverted to standby </li></ul><ul><li>Automatic resync for failed primary </li></ul><ul><li>Switchover for Maintenance </li></ul>
    6. 6. Traditional Physical Standby Databases Investment in Disaster Recovery
    7. 7. Active Data Guard 11 g Investment in Improved Quality of Service
    8. 8. Requirements <ul><li>Data Guard 11g has several options for deploying different CPU architectures, O.S. binaries and Oracle database binaries, on primary and standby systems. </li></ul><ul><ul><li>For example, the primary database may be on Windows, and the standby database may be on Linux. </li></ul></ul><ul><li>See MetaLink Note 413484.1 for latest capabilities and restrictions </li></ul>
    9. 9. Bandwidth Requirements <ul><li>Depends on Redo generation </li></ul><ul><li>Find peak redo in AWR report </li></ul><ul><li>Load Profile Per Second Per Transaction </li></ul><ul><li>~~~~~~~~~~~~ --------------- --------------- </li></ul><ul><li>Redo size: 51,944.64 5,177.09 </li></ul><ul><li>Bandwidth in MBPS = </li></ul><ul><li>(redo bytes per sec /0.7)8)/1,000,000 </li></ul>
    10. 10. Physical Standby <ul><li>Protection Modes </li></ul><ul><li>Physical Standby Architecture </li></ul><ul><li>Standby Redo Logs </li></ul><ul><li>Real Time Apply </li></ul><ul><li>Automatic Resynchronization </li></ul>
    11. 11. Database Protection Modes <ul><li>Maximum Protection </li></ul><ul><ul><li>No Data Loss and No data divergence </li></ul></ul><ul><ul><li>Arch_dest: mandatory, lgwr, sync, affirm </li></ul></ul><ul><ul><li>Primary db shutdown when unable to access stdby </li></ul></ul><ul><li>Maximum Availability </li></ul><ul><ul><li>Arch_dest: mandatory, lgwr, sync, affirm </li></ul></ul><ul><ul><li>Protection auto lowered when stdby is unavailable </li></ul></ul><ul><li>Maximum Performance </li></ul><ul><ul><li>Arch_dest: lgwr/arch, sync/async, mandatory/optional </li></ul></ul><ul><ul><li>Minimal performance impact </li></ul></ul>
    12. 12. Maximum Availability Mode <ul><li>Zero Data Loss as long as the network stays up! </li></ul><ul><li>Enforces protection of every transaction </li></ul><ul><li>Configuration: LGWR SYNC </li></ul><ul><li>If last standby is unavailable, processing continues at primary </li></ul><ul><li>When the standby becomes available again, synchronization with the primary is automatic </li></ul>ALTER DATABASE SET STANDBY TO MAXIMIZE AVAILABILITY ; Protection Mode Failure Protection Redo Shipping Protects Against Primary Failure LGWR using SYNC Maximum Availability Zero Data Loss
    13. 13. Architecture LGWR Primary database transactions Online redo logs ARC0 FAL RFS MRP or LSP Archived redo logs ARC0 Standby database Reports (MRP only) Standby redo logs Archived redo logs Backup Oracle net
    14. 14. Standby Redo Logs Redo from primary database RFS ARC0 Standby redo logs Archived redo logs MRP/LSP Standby database
    15. 15. Real Time Apply <ul><li>Redo data is applied to the standby database as soon as it is received from the primary database </li></ul><ul><ul><ul><li>In Oracle9 i Data Guard this apply has to wait till an archivelog is created on the standby database </li></ul></ul></ul><ul><li>For Redo Apply: </li></ul><ul><ul><li>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE </li></ul></ul><ul><li>When real time apply is enabled , RECOVERY_MODE column in V$ARCHIVE_DEST_STATUS displays “ MANAGED REAL TIME APPLY ” </li></ul>
    16. 16. <ul><li>SQL> ALTER SYSTEM SET LOG_ARCHIVE_DEST_2='SERVICE=tmstby </li></ul><ul><li>2> OPTIONAL LGWR SYNC AFFIRM </li></ul><ul><li>3> VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) </li></ul><ul><li>4> DB_UNIQUE_NAME=tmstby'; </li></ul><ul><li>SQL> ALTER SYSTEM SET LOG_ARCHIVE_CONFIG='DG_CONFIG=(tmtst,tmstby)' </li></ul><ul><li>SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY; </li></ul><ul><li>SQL> SELECT PROTECTION_MODE, PROTECTION_LEVEL FROM V$DATABASE; </li></ul><ul><li>PROTECTION_MODE PROTECTION_LEVEL </li></ul><ul><li>--------------------- --------------------- </li></ul><ul><li>MAXIMUM AVAILABILITY MAXIMUM AVAILABILITY </li></ul>
    17. 17. Real-Time Apply Architecture Physical Logical Standby Database MRP/ LSP RFS Standby Redo Logs ARCH Archived Redo Logs Archived Redo Logs Primary Database Transactions LGWR Online Redo Logs ARCH Oracle Net Real Time Apply
    18. 18. Real Time Apply Benefits <ul><li>Standby databases now more closely synchronized with the primary </li></ul><ul><ul><li>More up-to-date, real-time reporting </li></ul></ul><ul><ul><li>Faster switchover and failover times </li></ul></ul><ul><ul><ul><li>Reduces planned and unplanned downtime </li></ul></ul></ul><ul><ul><ul><li>Better Recovery Time Objective (RTO) for DR </li></ul></ul></ul>
    19. 19. Real Time Apply -Tuning Media Recovery <ul><li>Monitor via </li></ul><ul><ul><li>Data Dictionary, OEM, Standby Statspack in 11G </li></ul></ul><ul><li>Big performance boost in Oracle 11G </li></ul><ul><ul><li>Up to 100% increase in redo apply performance </li></ul></ul><ul><li>New standby statspack in Oracle 11G </li></ul><ul><ul><li>See MetaLinkNote 454848.1 </li></ul></ul><ul><ul><li>Includes information specific to a standby </li></ul></ul><ul><ul><ul><li>Output from V$RECOVERY_PROGRESS </li></ul></ul></ul><ul><ul><ul><li>Output from V$MANAGED_STANDBY </li></ul></ul></ul>
    20. 20. Data Dictionary <ul><li>V$DATABASE </li></ul><ul><ul><li>DATABASE_ROLE: LOGICAL STANDBY, PHYSICAL STANDBY or PRIMARY </li></ul></ul><ul><ul><li>PROTECTION_LEVEL: current protection mode setting. </li></ul></ul><ul><ul><li>FS_FAILOVER_STATUS: synchronization status </li></ul></ul><ul><li>V$DATAGUARD_STATS </li></ul><ul><li>V$DATAGUARD_STATUS </li></ul><ul><li>V$LOG & V$STANDBY_LOG: Redo log changed. </li></ul><ul><li>V$MANAGED_STANDBY : Recovery progress </li></ul>
    21. 21. Determining Query Latency <ul><li>From Primary (requires database link) </li></ul><ul><ul><li>select scn_to_timestamp( </li></ul></ul><ul><ul><li>(select current_scn from v$database) </li></ul></ul><ul><ul><li>)-scn_to_timestamp( </li></ul></ul><ul><ul><li>(select current_scn from v$database@dg) </li></ul></ul><ul><ul><li>) from dual; </li></ul></ul><ul><li>If you do not wish to connect to the Primary -determine the value for APPLY LAG for a “best estimate” </li></ul><ul><ul><li>Use Enterprise Manager monitoring </li></ul></ul><ul><ul><li>Query V$DATAGUARD_STATS </li></ul></ul><ul><ul><li>select value,unit,time_computed from v$dataguard_stats where name='apply lag'; </li></ul></ul>
    22. 22. Automatic Resynchronization <ul><li>Network connectivity problems may occur </li></ul><ul><li>Data Guard automatically resynchronizes standbys after network connectivity restored </li></ul><ul><ul><li>Implicit </li></ul></ul><ul><ul><ul><li>ARCH process idling away on the primary ‘pings’ all standbys on a regular basis to see if they are missing any redo data </li></ul></ul></ul><ul><ul><ul><li>If so it sends them the missing redo data </li></ul></ul></ul><ul><ul><li>Explicit </li></ul></ul><ul><ul><ul><li>Gap discovered during apply process in physical standby </li></ul></ul></ul><ul><ul><ul><li>Based on FAL_SERVER and FAL_CLIENT settings, primary notified, and it sends missing redo data </li></ul></ul></ul>
    23. 23. Data Guard Role Transitions <ul><li>Switchover </li></ul><ul><ul><li>Planned role reversal </li></ul></ul><ul><ul><li>Used for OS or hardware maintenance </li></ul></ul><ul><li>Failover </li></ul><ul><ul><li>Unplanned role reversal </li></ul></ul><ul><ul><li>Use in emergency </li></ul></ul><ul><ul><li>Zero or minimal data loss depending on choice of data protection mode </li></ul></ul><ul><li>Different steps for Physical and Logical Standby </li></ul><ul><li>Switchover using Enterprise Manager is literally two mouse clicks </li></ul><ul><li>We’ll do a Physical Standby Failover via the command line using the Broker </li></ul>
    24. 24. Data Guard Broker <ul><li>Fast-Start Failover </li></ul><ul><li>Fast-Start Failover Demo </li></ul><ul><li>Client Failover </li></ul><ul><li>Oracle 11G Active Data Guard </li></ul>
    25. 25. Fast-Start failover <ul><li>Makes Data Guard more than a Standby Database. Enables automatic failover with no data loss. </li></ul><ul><li>A feature of Oracle Database Enterprise Edition. </li></ul><ul><li>Only supports up to Maximum Availability Mode. </li></ul><ul><li>Requires 3rd server. Install DGMGRL client part of Oracle client administrator software. Observer process continuously monitors primary and standby databases. </li></ul><ul><li>If the listener is not running on port 1521, local_listener must be set in the spfile. </li></ul><ul><li>Observer detects failure. </li></ul><ul><li>Observer automatically executes database failover once threshold has been exceeded. </li></ul><ul><li>DB_ROLE_CHANGE trigger fires: enables primary service. This trigger can be customized to restart JDBC mid-tier clients and calls any other OCI enabled application. </li></ul>
    26. 26. Fast-Start Failover <ul><li>1. Data Guard in steady state – transmitting redo </li></ul><ul><li>2. Observer monitoring state of the configuration </li></ul>
    27. 27. Fast-Start Failover <ul><li>3. Disaster strikes the primary – connections lost </li></ul>
    28. 28. Fast-Start Failover <ul><li>4. Observer times out </li></ul><ul><li>5. Observer validates connection with target standby </li></ul><ul><li>6. Observer begins Fast-Start Failover </li></ul>
    29. 29. Fast-Start Failover <ul><li>7. Target standby automatically becomes new primary (DB_ROLE_CHANGE trigger fires ) </li></ul>
    30. 30. Fast-Start Failover <ul><li>8. After old primary is repaired, Observer re-establishes connection </li></ul><ul><li>9. Observer automatically reinstates old primary to be a new standby </li></ul><ul><li>10. Redo transmission starts from new primary to new standby </li></ul>
    31. 31. Events that trigger Fast-Start Failover <ul><li>Database conditions: </li></ul><ul><ul><li>Server crash or shutdown (without db shutdown) </li></ul></ul><ul><ul><li>Database instance failure (or last instance failure in a RAC configuration) </li></ul></ul><ul><ul><li>Shutdown abort (or shutdown abort of the last instance in a RAC configuration) </li></ul></ul><ul><ul><li>Datafiles taken offline due to I/O errors </li></ul></ul><ul><li>Network conditions: </li></ul><ul><ul><li>When both the Observer and the standby database lose their network connection to the primary database, and when the standby database confirms that it is in a “synchronized” state . </li></ul></ul>
    32. 32. Fast-Start Failover Conclusion <ul><li>Fast </li></ul><ul><ul><li>Site failover time measured in seconds, not minutes </li></ul></ul><ul><ul><li>Failover is automatic, no manual intervention </li></ul></ul><ul><li>Reliable </li></ul><ul><ul><li>Eliminates human error </li></ul></ul><ul><ul><li>Zero data loss failover </li></ul></ul><ul><li>Simple </li></ul><ul><ul><li>Automatically determines if failover criteria is met </li></ul></ul><ul><ul><li>Original primary database is automatically reinstated as a new standby database following failover </li></ul></ul>
    33. 33. Fast-Start Failover Conclusion <ul><li>Prevention of &quot;Split Brain&quot; due to accidental startup of former primary database </li></ul><ul><li>Reduced downtime through automatic activation of the standby database </li></ul><ul><li>A failover solution without a shared disk system </li></ul><ul><ul><li>with additional advantages (enhanced data availibity) </li></ul></ul><ul><ul><li>and even reduced failover time compared to HA cluster </li></ul></ul><ul><li>Many technical prerequisites (Flashback database, special Maximum Availability Mode) </li></ul><ul><li>No automatic failover to a second standby database possible </li></ul>
    34. 34. Fast-Start failover <ul><li>Requirements </li></ul><ul><ul><li>Fast-Start Failover is a feature of Oracle Data Guard, and can't run without a Data Guard Broker configuration! </li></ul></ul><ul><ul><li>Observer machine and configuration </li></ul></ul><ul><ul><li>Special entry in Data Guard Broker configuration </li></ul></ul><ul><ul><li>Maximum Availability Mode (mandatory) </li></ul></ul><ul><ul><ul><li>but: special startup behaviour </li></ul></ul></ul><ul><ul><ul><li>but: primary stalls in certain situations </li></ul></ul></ul><ul><ul><li>Flashback database must be activated </li></ul></ul>
    35. 35. Demo: Switchover <ul><li>1. Configure Broker and Fast_Start Failover </li></ul><ul><li>2. Configure Observer </li></ul><ul><li>3. Shutdown abort on the primary database TMTST </li></ul><ul><li>4. Wait until Fast_Start occurs on TMSTBY </li></ul><ul><li>5. Restart the old primary TMTST </li></ul><ul><li>6. Verify that observer reinstates database TMTST </li></ul>
    36. 36. Demo: Configure Fast_Start Failover <ul><li>Flash-Recovery areas are setup on both sides </li></ul><ul><li>SQL> show parameter DB_RECOVERY_FILE_DEST </li></ul><ul><li>NAME TYPE VALUE </li></ul><ul><li>db_recovery_file_dest string /tst/dump/oracle/fra </li></ul><ul><li>db_recovery_file_dest_size big integer 2G </li></ul><ul><li>Setup Flashback Database (on both): </li></ul><ul><li>SQL> select FLASHBACK_ON from v$database; </li></ul><ul><li>FLASHBACK_ON </li></ul><ul><li>NO </li></ul><ul><li>SQL> SHUTDOWN IMMEDIATE; </li></ul><ul><li>SQL> STARTUP MOUNT; </li></ul><ul><li>SQL> ALTER DATABASE FLASHBACK ON; </li></ul><ul><li>SQL> ALTER DATABASE OPEN; </li></ul><ul><li>SQL> show parameter flash </li></ul><ul><li>NAME TYPE VALUE </li></ul><ul><li>db_flashback_retention_target integer 1440 (1 day) </li></ul><ul><li>Broker Parameters: </li></ul><ul><ul><li>SQL> ALTER SYSTEM SET DG_BROKER_CONFIG_FILE1 ='+TVBSDG1/dr1tmstby.dat‘; </li></ul></ul><ul><ul><li>SQL> ALTER SYSTEM SET DG_BROKER_CONFIG_FILE2 ='+TVBSDG1/dr2tmstby.dat‘; </li></ul></ul><ul><ul><li>SQL> ALTER SYSTEM SET DG_BROKER_START=TRUE; </li></ul></ul>
    37. 37. Demo: Configure Fast_Start Failover <ul><li>Listener.ora on Primary </li></ul><ul><li>SID_LIST_LSNR_DGTEST = </li></ul><ul><li>(SID_LIST= </li></ul><ul><li>(SID_DESC = </li></ul><ul><li>(GLOBAL_DBNAME = </li></ul><ul><li>(ORACLE_HOME = /tst/opt/apps/oracle/database/ </li></ul><ul><li>(SID_NAME = tmtst) </li></ul><ul><li>) </li></ul><ul><li>(SID_DESC = </li></ul><ul><li>(GLOBAL_DBNAME = tmtst_ DGMGRL </li></ul><ul><li>(ORACLE_HOME = /tst/opt/apps/oracle/database/ </li></ul><ul><li>(SID_NAME = tmtst) </li></ul><ul><li>) </li></ul><ul><li>) </li></ul>
    38. 38. Demo: Configure Fast_Start Failover <ul><li>Tnsnames on both: </li></ul><ul><li>TMTST.VODACOM.CO.ZA = </li></ul><ul><li>(DESCRIPTION = </li></ul><ul><li>(ADDRESS_LIST = </li></ul><ul><li>(ADDRESS = (PROTOCOL = TCP)(HOST = = 1521)) </li></ul><ul><li>) </li></ul><ul><li>(CONNECT_DATA = </li></ul><ul><li>(SERVICE_NAME = tmtst_ DGMGRL </li></ul><ul><li>) </li></ul><ul><li>) </li></ul><ul><li>TMSTBY.VODACOM.CO.ZA = </li></ul><ul><li>(DESCRIPTION = </li></ul><ul><li>(ADDRESS_LIST = </li></ul><ul><li>(ADDRESS = (PROTOCOL = TCP)(HOST = = 1521)) </li></ul><ul><li>) </li></ul><ul><li>(CONNECT_DATA = </li></ul><ul><li>(SERVICE_NAME = tmstby_ DGMGRL </li></ul><ul><li>) </li></ul><ul><li>) </li></ul>
    39. 39. Demo: Configure Observer <ul><li>#> dgmgrl </li></ul><ul><li>DGMGRL> connect sys/xxx@tmtst </li></ul><ul><li>Connected. </li></ul><ul><li>DGMGRL> CREATE CONFIGURATION TMDRTEST AS </li></ul><ul><li>> PRIMARY DATABASE IS tmtst -> SHOW PARAMETER DB_UNIQUE_NAME </li></ul><ul><li>> CONNECT IDENTIFIER IS tmtst; -> tns entry </li></ul><ul><li>Configuration &quot;tmdrtest&quot; created with primary database &quot;tmtst&quot; </li></ul><ul><li>DGMGRL> ADD DATABASE tmstby AS </li></ul><ul><li>> CONNECT IDENTIFIER IS tmstby </li></ul><ul><li>> MAINTAINED AS PHYSICAL; </li></ul><ul><li>Database &quot;tmstby&quot; added </li></ul><ul><li>DGMGRL> ENABLE CONFIGURATION; </li></ul><ul><li>DGMGRL> SHOW CONFIGURATION; </li></ul><ul><li>DGMGRL> SHOW DATABASE VERBOSE tmtst; </li></ul><ul><li>DGMGRL> EDIT DATABASE tmtst SET PROPERTY 'LogXptMode'='SYNC'; </li></ul><ul><li>DGMGRL> EDIT DATABASE tmtst SET PROPERTY FastStartFailoverTarget='tmstby'; </li></ul><ul><li>DGMGRL> EDIT DATABASE tmstby SET PROPERTY FastStartFailoverTarget='tmtst'; </li></ul><ul><li>DGMGRL> ENABLE FAST_START FAILOVER; </li></ul><ul><li>DGMGRL> START OBSERVER; --> warning, prompt will not be returned! </li></ul>
    40. 40. Demo: Switchover <ul><li>DGMGRL> SWITCHOVER TO tmstby; ------  duration 90 seconds! </li></ul><ul><li>Performing switchover NOW, please wait... </li></ul><ul><li>Operation requires shutdown of instance &quot;tmtst&quot; on database &quot;tmtst&quot; </li></ul><ul><li>Shutting down instance &quot;tmtst&quot;... </li></ul><ul><li>ORA-01109: database not open </li></ul><ul><li>Database dismounted. </li></ul><ul><li>ORACLE instance shut down. </li></ul><ul><li>Operation requires shutdown of instance &quot;tmstby&quot; on database &quot;tmstby&quot; </li></ul><ul><li>Shutting down instance &quot;tmstby&quot;... </li></ul><ul><li>ORA-01109: database not open </li></ul><ul><li>Database dismounted. </li></ul><ul><li>ORACLE instance shut down. </li></ul><ul><li>Operation requires startup of instance &quot;tmtst&quot; on database &quot;tmtst&quot; </li></ul><ul><li>Starting instance &quot;tmtst&quot;... </li></ul><ul><li>ORACLE instance started. </li></ul><ul><li>Database mounted. </li></ul><ul><li>Operation requires startup of instance &quot;tmstby&quot; on database &quot;tmstby&quot; </li></ul><ul><li>Starting instance &quot;tmstby&quot;... </li></ul><ul><li>ORACLE instance started. </li></ul><ul><li>Database mounted. </li></ul><ul><li>Switchover succeeded, new primary is &quot;tmstby&quot; </li></ul>
    42. 42. Client Failover Best Practices <ul><li>SQL> exec DBMS_SERVICE.CREATE_SERVICE ( </li></ul><ul><li>service_name => '', </li></ul><ul><li>network_name => ' ', </li></ul><ul><li>aq_ha_notifications => true, </li></ul><ul><li>failover_method => 'BASIC', </li></ul><ul><li>failover_type => 'SELECT', </li></ul><ul><li>failover_retries => 180, </li></ul><ul><li>failover_delay => 1); </li></ul><ul><li>SQL> exec DBMS_SERVICE.START_SERVICE(''); </li></ul><ul><li>SQL> select value from v$parameter where name = 'service_names'; </li></ul><ul><li>VALUE </li></ul><ul><li>------------------------------------------------ </li></ul><ul><li>, </li></ul>
    43. 43. Client Failover Best Practices <ul><li>Configure startup trigger for service </li></ul><ul><li>SQL> CREATE OR REPLACE TRIGGER manage_OCIservice </li></ul><ul><li>after startup on database </li></ul><ul><li>DECLARE </li></ul><ul><li>role VARCHAR(30); </li></ul><ul><li>BEGIN </li></ul><ul><li>SELECT DATABASE_ROLE INTO role FROM V$DATABASE; </li></ul><ul><li>IF role = 'PRIMARY' THEN </li></ul><ul><li>DBMS_SERVICE.START_SERVICE(''); </li></ul><ul><li>ELSE </li></ul><ul><li>DBMS_SERVICE.STOP_SERVICE(''); </li></ul><ul><li>END IF; </li></ul><ul><li>END; </li></ul>
    44. 44. Client Failover Best Practices <ul><li>Client tns entry Configuration </li></ul><ul><li>TMOCI=(DESCRIPTION = </li></ul><ul><li>(ADDRESS_LIST = </li></ul><ul><li>(ADDRESS = (PROTOCOL = TCP) </li></ul><ul><li>(HOST = </li></ul><ul><li>(PORT = 1521)) </li></ul><ul><li>(ADDRESS = (PROTOCOL = TCP) </li></ul><ul><li>(HOST = </li></ul><ul><li>(PORT = 1521)) </li></ul><ul><li>(LOAD_BALANCE = yes)) </li></ul><ul><li>(CONNECT_DATA= SERVICE_NAME=tmOCI)) </li></ul><ul><li>) </li></ul>
    45. 45. Active Data Guard 11 g Investment in Improved Quality of Service
    46. 46. Active Data Guard <ul><li>Begin with a Data Guard 11 g physical standby database </li></ul><ul><ul><li>If redo apply is running, stop redo apply </li></ul></ul><ul><ul><li>Open the standby database read-only </li></ul></ul><ul><ul><li>Start redo apply </li></ul></ul>
    47. 47. Data Guard Broker & Enterprise Manager <ul><li>Data Guard Broker CLI </li></ul><ul><ul><li>Stop redo apply with the following command </li></ul></ul><ul><ul><li>EDIT DATABASE ‘TMSTBY' SET STATE=‘APPLY-OFF’ </li></ul></ul><ul><ul><li>Open standby read-only via SQL*Plus </li></ul></ul><ul><li>SQL> alter database open read only; </li></ul><ul><ul><li>Restart redo apply via broker CLI </li></ul></ul><ul><li>EDIT DATABASE ‘TMSTBY' SET STATE=‘APPLY-ON’ </li></ul><ul><li>Oracle Enterprise Manager 10 g </li></ul><ul><ul><li>Stop redo apply within Data Guard GUI </li></ul></ul><ul><ul><li>Open standby in read-only mode in Advanced Startup Options </li></ul></ul><ul><ul><li>Restart redo apply within Data Guard GUI </li></ul></ul>
    48. 48. Supported Operations for Read Only <ul><li>When connected to an Active Data Guard standby database, read-only applications can perform/use: </li></ul><ul><ul><li>Selects </li></ul></ul><ul><ul><li>Alter session / system </li></ul></ul><ul><ul><li>Set role </li></ul></ul><ul><ul><li>Lock table </li></ul></ul><ul><ul><li>Call stored procedures </li></ul></ul><ul><ul><li>DBlinks to write to remote databases </li></ul></ul><ul><ul><li>Stored procedures to call remote procedures via DBlinks </li></ul></ul><ul><ul><li>SET TRANSACTION READ ONLY for transaction level read consistency </li></ul></ul><ul><ul><li>Complex queries e.g. grouping set queries and with clause queries </li></ul></ul>
    49. 49. THANK YOU <ul><ul><ul><ul><ul><li>[email_address] </li></ul></ul></ul></ul></ul><ul><ul><ul><ul><ul><li> </li></ul></ul></ul></ul></ul>