备库TNS写错了,导致在dgmgrl中无法添加备库
主库bj,对应TNS为bj_DGMGRL.test.com
备库tj,对应TNS为tj_DGMGRL.test.com
错误写法
ADD DATABASE 'tj' AS CONNECT IDENTIFIER IS bj_DGMGRL.test.com;
正确写法
ADD DATABASE 'tj' AS CONNECT IDENTIFIER IS tj_DGMGRL.test.com;
备库对应的TNS写成了bj_DGMGRL.test.com,导致添加备库失败。
修正后,添加成功。show cconfiguration 备库是disable的,需要enable database tj,然后正常了。
========================================================================================
操作记录
odb1.test.com-PROD2>dgmgrl
DGMGRL for Linux: Version 11.2.0.3.0 - Production
Copyright (c) 2000, 2009, Oracle. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL>
DGMGRL> connect sys/oracle
Connected.
DGMGRL>
DGMGRL> CREATE CONFIGURATION 'dg_fsf' AS
PRIMARY DATABASE IS 'bj'
CONNECT IDENTIFIER IS bj_DGMGRL.test.com;
Configuration "dg_fsf" created with primary database "bj"
DGMGRL>
DGMGRL>
DGMGRL> ADD DATABASE 'tj' AS CONNECT IDENTIFIER IS bj_DGMGRL.test.com;
Error: ORA-16642: DB_UNIQUE_NAME mismatch
Failed.
DGMGRL>
DGMGRL> enable CONFIGURATION;
Enabled.
DGMGRL>
DGMGRL> show configuration
Configuration - dg_fsf
Protection Mode: MaxPerformance
Databases:
bj - Primary database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL>
DGMGRL> EDIT DATABASE 'bj' SET PROPERTY 'LogXptMode'='SYNC';
EDIT DATABASE 'tj' SET PROPERTY 'LogXptMode'='SYNC';
EDIT DATABASE 'bj' SET PROPERTY FastStartFailoverTarget='tj';
EDIT DATABASE 'tj' SET PROPERTY FastStartFailoverTarget='bj';
EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;
Property "LogXptMode" updated
DGMGRL> DGMGRL> Object "tj" was not found
DGMGRL> DGMGRL> Property "faststartfailovertarget" updated
DGMGRL> DGMGRL> Object "tj" was not found
DGMGRL> DGMGRL> Error: ORA-16627: operation disallowed since no standby databases would remain to support protection mode
Failed.
DGMGRL>
DGMGRL> ADD DATABASE 'tj' AS CONNECT IDENTIFIER IS tj_DGMGRL.test.com; --重新添加备库
Database "tj" added
DGMGRL> show configuration
Configuration - dg_fsf
Protection Mode: MaxPerformance
Databases:
bj - Primary database
tj - Physical standby database (disabled) --添加完备库后,状态为disabled,需要enable一下备库。
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL>
DGMGRL> enable database tj;
Enabled.
DGMGRL>
DGMGRL> show configuration
Configuration - dg_fsf
Protection Mode: MaxPerformance
Databases:
bj - Primary database
tj - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL>
DGMGRL> EDIT DATABASE 'bj' SET PROPERTY 'LogXptMode'='SYNC';
EDIT DATABASE 'tj' SET PROPERTY 'LogXptMode'='SYNC';
EDIT DATABASE 'bj' SET PROPERTY FastStartFailoverTarget='tj';
EDIT DATABASE 'tj' SET PROPERTY FastStartFailoverTarget='bj';
EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;
Property "LogXptMode" updated
DGMGRL> DGMGRL>
Property "LogXptMode" updated
DGMGRL> DGMGRL>
Property "faststartfailovertarget" updated
DGMGRL> DGMGRL>
Property "faststartfailovertarget" updated
DGMGRL> DGMGRL>
Succeeded.
DGMGRL> DGMGRL>
DGMGRL>
DGMGRL>
DGMGRL> show configuration
Configuration - dg_fsf
Protection Mode: MaxAvailability
Databases:
bj - Primary database
tj - Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS
DGMGRL>
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24626891/viewspace-2083015/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24626891/viewspace-2083015/
2044

被折叠的 条评论
为什么被折叠?



