DGBroker修改数据库属性(2)-创新互联

A LITTLE EFFORT EVERY DAY.YOU WILL MAKE A BIG DIFFERENCE.

目前成都创新互联已为数千家的企业提供了网站建设、域名、网页空间、网站运营、企业网站设计、沂源网站维护等服务,公司将坚持客户导向、应用为本的策略,正道将秉承"和谐、参与、激情"的文化,与客户和合作伙伴齐心协力一起成长,共同发展。

一、修改数据库属性

EDIT DATABASE 'South_Sales' SET PROPERTY 'LogArchiveFormat'='log_%t_%s_%r_%d.arc';

二、操作步骤

2.1查看DG状态

dgmgrl /

DGMGRL> show configuration;

Configuration - dg_config

 Protection Mode: MaxAvailability

 Members:

 orcl  - Primary database

  orcldg - Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:

SUCCESS  (status updated 55 seconds ago)

2.2查看DG属性

DGMGRL> show database verbose orcldg;

Database - orcldg

 Role:        PHYSICAL STANDBY

 Intended State:   APPLY-ON

 Transport Lag:    0 seconds (computed 1 second ago)

 Apply Lag:      0 seconds (computed 1 second ago)

 Average Apply Rate: 24.00 KByte/s

 Active Apply Rate:  0 Byte/s

 Maximum Apply Rate: 0 Byte/s

 Real Time Query:   ON

 Instance(s):

  orcldg

 Properties:

  DGConnectIdentifier       = 'orcldg'

  ObserverConnectIdentifier    = ''

  LogXptMode            = 'sync'

  RedoRoutes            = ''

  DelayMins            = '0'

  Binding             = 'optional'

  MaxFailure            = '0'

  MaxConnections          = '1'

  ReopenSecs            = '300'

  NetTimeout            = '30'

  RedoCompression         = 'DISABLE'

  LogShipping           = 'ON'

  PreferredApplyInstance      = ''

  ApplyInstanceTimeout       = '0'

  ApplyLagThreshold        = '0'

  TransportLagThreshold      = '0'

  TransportDisconnectedThreshold  = '30'

  ApplyParallel          = 'AUTO'

  StandbyFileManagement      = 'AUTO'

  ArchiveLagTarget         = '0'

  LogArchiveMaxProcesses      = '4'

  LogArchiveMinSucceedDest     = '1'

  DbFileNameConvert        = ''

  LogFileNameConvert        = ''

  FastStartFailoverTarget     = ''

  InconsistentProperties      = '(monitor)'

  InconsistentLogXptProps     = '(monitor)'

  SendQEntries           = '(monitor)'

  LogXptStatus           = '(monitor)'

  RecvQEntries           = '(monitor)'

  StaticConnectIdentifier     = '(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=roidb02)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=orcldg_DGMGRL)(INSTANCE_NAME=orcldg)(SERVER=DEDICATED)))'

  StandbyArchiveLocation      = '+DATADG/arch'

  AlternateLocation        = ''

  LogArchiveTrace         = '0'

   LogArchiveFormat         = '%t_%s_%r.dbf'

  TopWaitEvents          = '(monitor)'

Database Status:

SUCCESS

2.3查看归档日志格式

SQL> show parameter log_archive_format;

NAME                 TYPE     VALUE

------------------------------------ ----------- ------------------------------

log_archive_format          string    %t_%s_%r.dbf

SQL>

2.4使用DGMGRL修改数据库属性

DGMGRL> EDIT DATABASE 'orcldg' SET PROPERTY 'LogArchiveFormat'='log_%t_%s_%r_%d.arc';

Warning: ORA-16675: database instance restart required for property value modification to take effect

Property "LogArchiveFormat" updated

DGMGRL>

DGMGRL> EDIT DATABASE 'orcl' SET PROPERTY 'LogArchiveFormat'='log_%t_%s_%r_%d.arc';

Warning: ORA-16675: database instance restart required for property value modification to take effect

Property "LogArchiveFormat" updated

DGMGRL>

2.5查看是否生效

SQL> show parameter log_archive_format;

NAME                 TYPE     VALUE

------------------------------------ ----------- ------------------------------

log_archive_format          string    %t_%s_%r.dbf

SQL>

2.6数据库重启

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL>

SQL>

SQL>

SQL> startup

ORACLE instance started.

Total System Global Area 1241513984 bytes

Fixed Size          2923872 bytes

Variable Size       452985504 bytes

Database Buffers      771751936 bytes

Redo Buffers        13852672 bytes

Database mounted.

Database opened.

SQL>

2.7查看是否生效

ASMCMD [+datadg/arch] > ls

1_12_954623021.dbf

....省略.........

1_61_954623021.dbf

log_1_62_954623021_585bafa7.arc  --格式发生变化

log_1_63_954623021_585bafa7.arc

log_1_64_954623021_585bafa7.arc

ASMCMD [+datadg/arch] >

SQL> show parameter log_archive_format;

NAME                 TYPE     VALUE

------------------------------------ ----------- ------------------------------

log_archive_format          string    log_%t_%s_%r_%d.arc

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


分享文章:DGBroker修改数据库属性(2)-创新互联
网址分享:http://azwzsj.com/article/ddcejd.html