赞
踩
[20150325]关于参数archive_lag_target.txt
--今天同事在测试设置参数archive_lag_target遇到一些问题,自己也做一些测试:
DGMGRL> show database test ArchiveLagTarget
ArchiveLagTarget = '0'
DGMGRL> edit database test set PROPERTY ArchiveLagTarget=30;
Error: ORA-16790: the value of the configurable property is invalid
Failed.
$ oerr ORA 16790
16790, 0000, "the value of the configurable property is invalid"
// *Cause: An invalid property value was entered, or a RESET was attempted
// on a property for which no Broker default value exists.
// *Action: Set the property to a correct value.
--而使用sqlplus设置:
SCOTT@test> alter system set archive_lag_target=30 scope=memory ;
System altered.
SCOTT@test> show parameter ARCHIVE_LAG_TARGET
NAME TYPE VALUE
------------------- -------- -------
archive_lag_target integer 60
--很明显这个参数最小是60.即使你设置30.
$ ll /u01/app/oracle11g/archivelog/
-rw-r----- 1 oracle11g oinstall 781312 2015-03-25 09:51:44 1_2499_798551880.dbf
-rw-r----- 1 oracle11g oinstall 42496 2015-03-25 09:52:39 1_2500_798551880.dbf
-rw-r----- 1 oracle11g oinstall 37888 2015-03-25 09:53:43 1_2501_798551880.dbf
-rw-r----- 1 oracle11g oinstall 147456 2015-03-25 09:54:43 1_2502_798551880.dbf
--另外在dg设置,不生效,也许在切换后生效.
DGMGRL> show configuration verbose
Configuration - study
Protection Mode: MaxPerformance
Databases:
test - Primary database
Warning: ORA-16792: configurable property value is inconsistent with database setting
testdg - Physical standby database
Properties:
FastStartFailoverThreshold = '30'
OperationTimeout = '30'
FastStartFailoverLagLimit = '30'
CommunicationTimeout = '180'
FastStartFailoverAutoReinstate = 'TRUE'
FastStartFailoverPmyShutdown = 'TRUE'
BystandersFollowRoleChange = 'ALL'
Fast-Start Failover: DISABLED
Configuration Status:
WARNING
$ oerr ORA 16792
16792, 0000, "configurable property value is inconsistent with database setting"
// *Cause: The values of one or more configurable properties were
// inconsistent with database in-memory settings or server parameter
// file settings. This may happen by directly altering initialization
// parameters instead of editing configurable property values using
// Data Guard broker.
// *Action: Query the InconsistentProperties property on the database or check
// the Data Guard broker log to find which properties are set
// inconsistently. Reset these properties to make them consistent
// with the database settings. Alternatively, enable the database
// or the entire configuration to allow the configurable property
// settings to be propagated to the initialization parameters.
--这样修改导致与dg配置不一致.我感兴趣的是如何确定那个参数不一致.看了一下帮助,很简单:
DGMGRL> show database test InconsistentProperties;
INCONSISTENT PROPERTIES
INSTANCE_NAME PROPERTY_NAME MEMORY_VALUE SPFILE_VALUE BROKER_VALUE
test ArchiveLagTarget 60 0 0
--也许是我修改到内存与spfile文件不一致.
DGMGRL> edit database test set PROPERTY ArchiveLagTarget=60;
Property "archivelagtarget" updated
DGMGRL> show database verbose test;
Database - test
Role: PRIMARY
Intended State: TRANSPORT-ON
Instance(s):
test
Properties:
DGConnectIdentifier = 'test'
ObserverConnectIdentifier = ''
LogXptMode = 'ASYNC'
DelayMins = '0'
Binding = 'optional'
MaxFailure = '0'
MaxConnections = '1'
ReopenSecs = '300'
NetTimeout = '30'
RedoCompression = 'DISABLE'
LogShipping = 'ON'
PreferredApplyInstance = ''
ApplyInstanceTimeout = '0'
ApplyParallel = 'AUTO'
StandbyFileManagement = 'auto'
ArchiveLagTarget = '60'
LogArchiveMaxProcesses = '4'
LogArchiveMinSucceedDest = '1'
DbFileNameConvert = '/u01/app/oracle11g/oradata/test, /u01/app/oracle11g/oradata/test'
LogFileNameConvert = '/u01/app/oracle11g/oradata/test, /u01/app/oracle11g/oradata/test'
FastStartFailoverTarget = ''
InconsistentProperties = '(monitor)'
InconsistentLogXptProps = '(monitor)'
SendQEntries = '(monitor)'
LogXptStatus = '(monitor)'
RecvQEntries = '(monitor)'
SidName = 'test'
StaticConnectIdentifier = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=hisdg)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=test_DGMGRL.com)(INSTANCE_NAME=test)(SERVER=DEDICATED)))'
StandbyArchiveLocation = '/u01/app/oracle11g/archivelog'
AlternateLocation = ''
LogArchiveTrace = '0'
LogArchiveFormat = '%t_%s_%r.dbf'
TopWaitEvents = '(monitor)'
Database Status:
SUCCESS
--收尾还原:
DGMGRL> edit database test set PROPERTY ArchiveLagTarget=0;
Property "archivelagtarget" updated
DGMGRL> edit database testdg set PROPERTY ArchiveLagTarget=0;
Property "archivelagtarget" updated
DGMGRL> show database verbose testdg ArchiveLagTarget;
ArchiveLagTarget = '0'
DGMGRL> show database verbose test ArchiveLagTarget;
ArchiveLagTarget = '0'
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/267265/viewspace-1472723/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/267265/viewspace-1472723/
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。