5 如果有RAC环境,则START_OPTIONS必须设置为MOUNTLISTENER = (DESCRIPTION =(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=host_name)(PORT=port_num))))SID_LIST_LISTENER=(SID_LIST=(SID_DESC=(SID_NAME=sid_name)(GLOBAL_DBNAME=db_unique_name_DGMGRL.db_domain)(ORACLE_HOME=oracle_home))
srvctl add database -d -o -s mount或srvctl modify database -d -o -s mount
alter system set local_listener='(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=dg2)(PORT=1521)))'然后启动监听,查看监听状态,有dg2_XPT服务Service "dg2_XPT" has 1 instance(s).
Table 1-2 DGMGRL Commands
Command | Description |
---|---|
ADD | Adds a standby database to the broker configuration |
CONNECT | Connects to an Oracle instance |
CREATE | Creates a broker configuration |
DISABLE | Disables a configuration, a database, or fast-start failover |
EDIT | Edits a configuration, database, or instance |
ENABLE | Enables a configuration, a database, or fast-start failover |
EXIT | Exits the program |
FAILOVER | Changes a standby database to be the primary database |
HELP | Displays description and syntax for individual commands |
QUIT | Exits the program |
REINSTATE | Changes a disabled database into a viable standby database |
REM | Comments to be ignored by DGMGRL |
REMOVE | Removes a configuration, database, or instance |
SHOW | Displays information of a configuration, database, or instance |
SHUTDOWN | Shuts down a currently running Oracle instance |
START | Starts the fast-start failover observer |
STARTUP | Starts an Oracle database instance |
STOP | Stops the fast-start failover observer |
SWITCHOVER | Switches roles between the primary database and a standby database |
NAME TYPE VALUE
------------------------------------
dg_broker_start boolean TRUE
Password:
Connected.
Configuration
Name: dgconfig
Enabled: NO
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED
Databases:
dg1 - Primary database
dg2 - Physical standby database
Current status for "dgconfig":
DISABLED
Enabled.
DGMGRL> show configuration
Configuration
Name: dgconfig
Enabled: YES
Protection Mode: MaxPerformance
Fast-Start Failover: DISABLED
Databases:
dg1 - Primary database
dg2 - Physical standby database
Current status for "dgconfig":
SUCCESS
Table 4-1 Database States and Descriptions
Database Role | State Name | Description |
---|---|---|
Primary | The primary database is open for read/write access and redo transport services are archiving online redo log files to the standby databases. If this is a RAC database, all started instances are open in read/write mode and have redo transport services running. This is the default state for a primary database when it is enabled for the first time. | |
Primary | The primary database is open for read/write access, but redo transport services are not transmitting redo data to the standby databases. If this is a RAC database, all started instances are open in read/write mode and redo transport services are not running on any instances. | |
Physical standby | The physical standby database is mounted and Redo Apply is started. The standby database is not open for read-only queries. If the standby database is a RAC database, the broker starts log apply services on exactly one standby instance, called the apply instance. If this instance fails, the broker automatically chooses another started instance. This new instance then becomes the apply instance. This is the default state for a physical standby database when it is enabled for the first time. | |
Physical standby | The physical standby database is mounted, but Redo Apply is stopped. The standby database is not open for read-only queries. If this is a RAC database, there is no instance running log apply services until you change the database state to ONLINE. | |
Physical standby | The physical standby database is open for read-only queries, and Redo Apply is stopped. If this is a RAC database, one or more instances will be open in read-only mode. Redo Apply is not running on any instance. | |
Logical standby | The logical standby database is open for read-only queries and SQL Apply is started. The logical standby database guard is on. If this is a RAC database, SQL Apply is running on one instance, the apply instance. If this instance fails, the broker automatically chooses another started instance. This new instance becomes the apply instance. This is the default state for a logical standby database when it is enabled for the first time. | |
Logical standby | The logical standby database is open for read-only queries, and SQL Apply is not running. The logical standby database guard is on. If this is a RAC database, there is no instance running SQL Apply until you change the database state to ONLINE. | |
All | When you set the state of a standby database to OFFLINE, the broker automatically shuts down the database, turns off redo transport services to this database, and leaves the database as disabled in the broker configuration. The broker will not manage this database until you restart the database. When you set the state of a primary database to OFFLINE, the broker automatically shuts down the database. The primary database is not available, and the broker is no longer managing the entire Data Guard configuration. You need to restart the database to resume broker control. If this is a RAC database, all started instances are shutdown. |
ArchiveLagTarget = '0'
DGMGRL> EDIT DATABASE 'North_Sales' SET PROPERTY 'ArchiveLagTarget'=1200;
Property "ArchiveLagTarget" updated
DGMGRL> SHOW DATABASE 'North_Sales' 'ArchiveLagTarget';
ArchiveLagTarget = '1200'
AlternateLocation
Binding
Dependency
LogShipping
LogXptMode
MaxFailure
NetTimeout
ReopenSecs
DGMGRL> EDIT DATABASE 'dg2' SET PROPERTY 'LogXptMode'='SYNC';
DGMGRL> EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26239116/viewspace-749142/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26239116/viewspace-749142/