[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[[["\u003cp\u003eThis guide explains how to set up the Data Guard broker, which is essential for managing the creation, control, and monitoring of Data Guard configurations.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves configuring the primary database by setting up the Data Guard monitor process, and configuring a location for the broker configuration files, then ensuring archive logs are not deleted prematurely.\u003c/p\u003e\n"],["\u003cp\u003eThe standby database setup mirrors the primary, including setting up the monitor process and configuring the broker file location.\u003c/p\u003e\n"],["\u003cp\u003eA broker configuration is created on the primary database using the Data Guard command line interface, including adding the standby database and enabling log shipping.\u003c/p\u003e\n"],["\u003cp\u003eOnce the configuration is created, you can validate that the configuration is working properly using multiple commands and enable flashback on the newly configured standby database.\u003c/p\u003e\n"]]],[],null,["# Configure and enable Data Guard broker\n======================================\n\nAfter you've set up the [primary](/bare-metal/docs/solutions/oracle/data-guard-setup/db-setup-primary)\nand [standby](/bare-metal/docs/solutions/oracle/data-guard-setup/db-setup-standby)\ndatabases for Data Guard, you need to set up its [broker](https://docs.oracle.com/en/database/oracle/oracle-database/19/dgbkr/oracle-data-guard-broker-concepts.html).\nThe Data Guard broker manages creation, control, and monitoring of Data Guard\nconfigurations.\n\nThe following examples are used throughout this guide:\n\nSet up the primary database\n---------------------------\n\nStart the Data Guard monitor process on the primary database:\n\n1. Log in to the first Bare Metal Solution server that hosts the primary database.\n\n2. In `/etc/oratab` check that an entry to enable environment variables for the\n primary database exists:\n\n \u003cvar class=\"readonly\" translate=\"no\"\u003eDBDG_SITE11\u003c/var\u003e:\u003cvar scope=\"oraclehome\" translate=\"no\"\u003e/apps/oracle/19.0.0/db_home1\u003c/var\u003e:N\n\n3. Set the `ORACLE_SID` environment variable so you can connect to the primary\n database:\n\n source oraenv \u003c\u003c\u003c \"\u003cvar translate=\"no\"\u003eDBDG_SITE11\u003c/var\u003e\"\n\n You should receive the response\n `The Oracle base has been set to `\u003cvar class=\"edit\" scope=\"oraclebase\" translate=\"no\"\u003e/apps/oracle/oracle_base\u003c/var\u003e.\n4. Use Recovery Manager to check that archive logs are not automatically\n deleted until they have been applied on all standby databases:\n\n rman target /\n\n CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY;\n EXIT;\n\n5. Start SQL\\*Plus, then configure a location for the broker configuration\n files and start the broker. RAC databases require the broker configuration\n files to reside on shared storage, preferably in an ASM diskgroup:\n\n sqlplus / as sysdba\n\n ALTER SYSTEM SET DG_BROKER_CONFIG_FILE1='+DATA/\u003cvar translate=\"no\"\u003eDBDG_SITE1\u003c/var\u003e/dr1\u003cvar translate=\"no\"\u003eDBDG_SITE1\u003c/var\u003e.dat' SID='*' SCOPE=BOTH;\n ALTER SYSTEM SET DG_BROKER_CONFIG_FILE2='+DATA/\u003cvar translate=\"no\"\u003eDBDG_SITE1\u003c/var\u003e/dr2\u003cvar translate=\"no\"\u003eDBDG_SITE1\u003c/var\u003e.dat' SID='*' SCOPE=BOTH;\n ALTER SYSTEM SET DG_BROKER_START=true SID='*' SCOPE=BOTH;\n EXIT;\n\nSet up the standby database\n---------------------------\n\nStart the Data Guard monitor process on the standby database:\n\n1. Log in to the first Bare Metal Solution server that hosts the standby database.\n\n2. Set the `ORACLE_SID` environment variable, so you can connect to the standby\n database:\n\n source oraenv \u003c\u003c\u003c \"\u003cvar translate=\"no\"\u003eDBDG_SITE21\u003c/var\u003e\"\n\n You should receive the response\n `The Oracle base has been set to `\u003cvar scope=\"oraclebase\" translate=\"no\"\u003e/apps/oracle/oracle_base\u003c/var\u003e.\n3. Log in to SQL\\*Plus, then configure a location for broker configuration\n files and start the broker.\n\n sqlplus / as sysdba\n\n ALTER SYSTEM SET DG_BROKER_CONFIG_FILE1='+DATA/\u003cvar translate=\"no\"\u003eDBDG_SITE2\u003c/var\u003e/dr1\u003cvar translate=\"no\"\u003eDBDG_SITE2\u003c/var\u003e.dat' SID='*' SCOPE=BOTH;\n ALTER SYSTEM SET DG_BROKER_CONFIG_FILE2='+DATA/\u003cvar translate=\"no\"\u003eDBDG_SITE2\u003c/var\u003e/dr2\u003cvar translate=\"no\"\u003eDBDG_SITE2\u003c/var\u003e.dat' SID='*' SCOPE=BOTH;\n ALTER SYSTEM SET DG_BROKER_START=true SID='*' SCOPE=BOTH;\n EXIT;\n\nCreate the broker configuration\n-------------------------------\n\n1. Log in to the first Bare Metal Solution server that hosts the primary database.\n\n2. Connect to the Data Guard command line interface, then to the primary\n database:\n\n dgmgrl\n\n CONNECT SYS@\u003cvar translate=\"no\"\u003eDBDG_SITE1\u003c/var\u003e\n\n When prompted for a password, enter your SYS remote login password for the\n primary database.\n3. Create the broker configuration:\n\n CREATE CONFIGURATION 'DBDG' AS PRIMARY DATABASE IS '\u003cvar translate=\"no\"\u003eDBDG_SITE1\u003c/var\u003e' CONNECT IDENTIFIER IS \u003cvar translate=\"no\"\u003eDBDG_SITE1\u003c/var\u003e;\n\n4. Add the standby database:\n\n ADD DATABASE \u003cvar translate=\"no\"\u003eDBDG_SITE2\u003c/var\u003e AS CONNECT IDENTIFIER IS \u003cvar translate=\"no\"\u003eDBDG_SITE2\u003c/var\u003e MAINTAINED AS PHYSICAL;\n\n5. Enable the configuration. Enabling this configuration directs the broker\n process to begin log shipping from the primary database, and apply the redo\n on the standby database as it is received:\n\n ENABLE CONFIGURATION;\n\n6. You can check if the configuration is successful with the following\n commands:\n\n SHOW CONFIGURATION;\n\n SHOW DATABASE \u003cvar translate=\"no\"\u003eDBDG_SITE1\u003c/var\u003e;\n\n SHOW DATABASE \u003cvar translate=\"no\"\u003eDBDG_SITE2\u003c/var\u003e;\n\n VALIDATE DATABASE \u003cvar translate=\"no\"\u003eDBDG_SITE1\u003c/var\u003e;\n\n VALIDATE DATABASE \u003cvar translate=\"no\"\u003eDBDG_SITE2\u003c/var\u003e;\n\n The `show configuration` command doesn't report a status of `SUCCESS` until\n the standby database is synchronized with the primary database. The amount\n of time required for the initial synchronization can vary, based on the\n amount of changes performed on the primary database or the latency between\n the primary and standby sites. Here is an example of a successful\n configuration: \n\n Configuration - DBDG\n\n Protection Mode: MaxPerformance\n Members:\n \u003cvar translate=\"no\"\u003eDBDG_SITE1\u003c/var\u003e - Primary database\n \u003cvar translate=\"no\"\u003eDBDG_SITE2\u003c/var\u003e - Physical standby database\n\n Fast-Start Failover: Disabled\n\n Configuration Status:\n SUCCESS (status updated 0 seconds ago)\n\n7. Enable flashback on the newly configured standby database:\n\n CONNECT SYS@\u003cvar translate=\"no\"\u003eDBDG_SITE2\u003c/var\u003e\n\n When prompted for a password, enter your SYS remote login password for the\n standby database. \n\n EDIT DATABASE \u003cvar translate=\"no\"\u003eDBDG_SITE2\u003c/var\u003e SET STATE=APPLY-OFF;\n SQL 'ALTER DATABASE FLASHBACK ON';\n EDIT DATABASE \u003cvar translate=\"no\"\u003eDBDG_SITE2\u003c/var\u003e SET STATE=APPLY-ON;\n\n8. Exit the Data Guard command line interface:\n\n EXIT;\n\nNext steps\n----------\n\nNext, [validate the Data Guard deployment](/bare-metal/docs/solutions/oracle/data-guard-setup/validate)."]]