问题1:无法修改保护模式:
DGMGRL> edit configuration set protection mode as maxavailability;
Error: ORA-16627: operation disallowed since no standby databases would remain to support protection mode
DGMGRL> show database verbose tantest
Database - tantest
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
tantest1
tantest2
Properties:
DGConnectIdentifier = 'tantest'
ObserverConnectIdentifier = ''
LogXptMode = 'ASYNC'
DelayMins = '1'
Binding = 'optional'
MaxFailure = '0'
MaxConnections = '1'
ReopenSecs = '300'
NetTimeout = '30'
RedoCompression = 'DISABLE'
LogShipping = 'ON'
PreferredApplyInstance = ''
ApplyInstanceTimeout = '0'
ApplyParallel = 'AUTO'
StandbyFileManagement = 'MANUAL'
ArchiveLagTarget = '0'
LogArchiveMaxProcesses = '30'
LogArchiveMinSucceedDest = '1'
DbFileNameConvert = ''
LogFileNameConvert = ''
FastStartFailoverTarget = 'dgbro'
InconsistentProperties = '(monitor)'
InconsistentLogXptProps = '(monitor)'
SendQEntries = '(monitor)'
LogXptStatus = '(monitor)'
RecvQEntries = '(monitor)'
SidName(*)
StaticConnectIdentifier(*)
StandbyArchiveLocation(*)
AlternateLocation(*)
LogArchiveTrace(*)
LogArchiveFormat(*)
TopWaitEvents(*)
(*) - Please check specific instance for the property value
Database Status:
SUCCESS
DGMGRL> edit database tantest set property LogXptMode='SYNC';
修改上面的参数后正常
问题2:无法启动fast failover
DGMGRL> enable fast_start failover;
Error: ORA-16651: requirements not met for enabling fast-start failover
是因为没有
1.启用闪回数据库。
2.主库备库LogXptMode='SYNC';
3.应该最大可用模式 maxavailability;
关于闪回可参考下面的内容启用:
http://docs.oracle.com/cd/E11882_01/server.112/e17023/cli.htm#i1005573
ALTER SYSTEM SET UNDO_RETENTION=3600 SCOPE=SPFILE;
ALTER SYSTEM SET UNDO_MANAGEMENT='AUTO' SCOPE=SPFILE;
SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
SHOW PARAMETER UNDO;
ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=4320 SCOPE=BOTH;
ALTER DATABASE ARCHIVELOG;
ALTER SYSTEM SET db_recovery_file_dest_size=<size>;
ALTER SYSTEM SET db_recovery_file_dest=<directory-specification>;
ALTER DATABASE FLASHBACK ON;
ALTER DATABASE OPEN;
备库进行修改:
SQL> select flashback_on from V$database;
FLASHBACK_ON
------------------
NO
SQL> ALTER SYSTEM SET UNDO_RETENTION=3600 SCOPE=SPFILE;
SQL> startup mount;
SQL> ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=4320 SCOPE=BOTH;
SQL> ALTER SYSTEM SET db_recovery_file_dest='/u01/flashback' scope=both;
SQL> ALTER SYSTEM SET db_recovery_file_dest_size=500m scope=both;
SQL> alter database flashback on;
进行确认:
select flashback_on,name from v$database;
主库进行修改:
SQL> ALTER SYSTEM SET UNDO_RETENTION=3600 SCOPE=SPFILE;
SQL> startup mount;
SQL> ALTER SYSTEM SET DB_FLASHBACK_RETENTION_TARGET=4320 SCOPE=BOTH;
SQL> ALTER SYSTEM SET db_recovery_file_dest_size=500m scope=both;
SQL> ALTER SYSTEM SET db_recovery_file_dest='/u01/flashback' scope=both;
SQL> alter database flashback on;
并且修改以下内容
DGMGRL> edit database dgbro set property LogXptMode='SYNC';
DGMGRL> edit configuration set protection mode as maxavailability;
Succeeded.
DGMGRL> enable fast_start failover;
Enabled.
问题3:在备库上启动闪回时,遇到下面的问题:
SQL> alter database flashback on;
alter database flashback on
*
ERROR at line 1:
ORA-01153: an incompatible media recovery is active
执行了下面的操作,问题解决:
SQL> recover managed standby database cancel;
Media recovery complete.
SQL> alter database flashback on;
Database altered.
关于这个问题更多的解释(下面来源于网络,忘了出处).
Cause: Attempted to start an incompatible media recovery or open resetlogs
during media recovery or RMAN backup . Media recovery sessions are
incompatible if they attempt to recover the same data file. Incomplete media
recovery or open resetlogs is incompatible with any media recovery. Backup or
restore by RMAN is incompatible with open resetlogs
Action: Complete or cancel the other media recovery session or RMAN backup
SQL> recover managed standby database cancel;
SQL> recover automatic standby database ;
SQL> RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;
SQL> SELECT MESSAGE FROM V$DATAGUARD_STATUS;
问题4:没有设置observer
DGMGRL> enable fast_start failover;
Enabled.
DGMGRL> show configuration;
Configuration - DRSolution
Protection Mode: MaxAvailability
Databases:
tantest - Primary database
Warning: ORA-16819: fast-start failover observer not started
dgbro - (*) Physical standby database
Warning: ORA-16819: fast-start failover observer not started
Fast-Start Failover: ENABLED
Configuration Status:
WARNING
解决,启动即可
DGMGRL> start observer