11.07.2015 Views

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

Oracle Database 11 g - Online Public Access Catalog

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 10 ■ DATA GUARD 441■Tip DBAs often get surprised when they realize that commands to DGMGRL can also be scripted. DBAs canissue commands in the command-line interface by invoking dgmgrl in Unix similar to what is shown here:DBA<strong>11</strong>g $ dgmgrl sys/oracle "edit database 'dba<strong>11</strong>g'set property faststartfailovertarget='DBA<strong>11</strong>gDR';"DGMGRL for Linux: Version <strong>11</strong>.1.0.4.0 - BetaCopyright (c) 2000, 2005, <strong>Oracle</strong>. All rights reserved.Welcome to DGMGRL, type "help" for information.Connected.Property "faststartfailovertarget" updateddgmgrl sys/oracle "edit database 'dba<strong>11</strong>gdr'set property faststartfailovertarget='DBA<strong>11</strong>g';"Initiate Fast-Start Failover from Applications<strong>Oracle</strong> <strong>Database</strong> <strong>11</strong>g also introduces the new DBMS_DG PL/SQL package, which can be customizedby applications to initiate a request for fast-start failover of the primary database. DataGuard Broker will perform some preliminary validations such as checking the readiness of thefailover state or checking that the lag limit is within the threshold on the primary database andcommunicates with the observer to initiate a failover. If no parameters are specified, the defaultstring of “Application Failover Requested” will be logged in the broker log file and in the databasealert log file. You can see from the function description here that the function expects acondition string for the fast-start failover:SQL> desc dbms_dgFUNCTION INITIATE_FS_FAILOVER RETURNS BINARY_INTEGERArgument Name Type In/Out Default?------------------- ------------- ---------------CONDSTR VARCHAR2 INThis function can return any one of the following return codes:• ORA-00000: Normal, successful completion.• ORA-16646: Fast-start failover is disabled.• ORA-16666: Unable to initiate fast-start failover on a standby database.• ORA-16817: Unsynchronized fast-start failover configuration.• ORA-16819: Fast-start failover observer not started.• ORA-16820: Fast-start failover observer is no longer observing this database.• ORA-16829: Fast-start failover configuration is lagging.You can query the V$FS_FAILOVER_STATS dynamic view on the primary database toobtain the cause of failure information and when it occurred, as shown here:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!