RAC同單一實例物理備庫的switchover

來源:互聯網
上載者:User

前面搭建好了rac同單一實例資料庫data guard的maa環境(見  ),為了方便切換操作,這裡配置使用data guard broker進行操作!rac環境下,需要將data guard broker的設定檔存放到共用儲存上!

一:修改data guard broker的設定檔參數,啟動dmon進程

[Oracle@rac1 ~]$ sqlplus sys/123456@rac as sysdba
SQL*Plus: Release 10.2.0.5.0 - Production on Sat Jan 14 21:11:34 2012
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options

SQL> show parameter dg_broker_config;

NAME                                 TYPE
------------------------------------ ---------------------------------
VALUE
------------------------------
dg_broker_config_file1               string
+DATA/rac/dgbroker/dg_config_f
ile1.dat
dg_broker_config_file2               string
+FRA/rac/dgbroker/dg_config_fi
le2.dat

SQL> alter system set dg_broker_start=true;
System altered.

SQL> conn sys/123456@orcl as sysdba
Connected.

SQL> show parameter dg_broker_config;

NAME                                 TYPE
------------------------------------ ---------------------------------
VALUE
------------------------------
dg_broker_config_file1               string
/u01/app/oracle/product/10.2.0
/db1/dbs/dg_config_file1.dat
dg_broker_config_file2               string
/u01/app/oracle/product/10.2.0
/db1/dbs/dg_config_file2.dat

SQL> alter system set dg_broker_start=true;
System altered.

二:使用srvctl命令修改rac資料庫的啟動選項,如果備庫也是rac環境,同樣需要相應的修改
[oracle@rac1 ~]$ srvctl modify database -d rac -s open -r primary -o $ORACLE_HOME
[oracle@rac1 ~]$ srvctl stop database -d rac -o immediate
[oracle@rac1 ~]$ srvctl start database -d rac

三:建立dg broker設定檔

[oracle@server49 ~]$ dgmgrl sys/123456@rac
DGMGRL for Linux: Version 10.2.0.5.0 - 64bit Production
Copyright (c) 2000, 2005, Oracle. All rights reserved.

Welcome to DGMGRL, type "help" for information.
Connected.
DGMGRL> create configuration maa as primary database is rac connect identifier is rac;
Configuration "maa" created with primary database "rac"

DGMGRL> add database orcl as connect identifier is orcl maintained as physical;
Database "orcl" added

DGMGRL> show configuration;

Configuration
  Name:                maa
  Enabled:             NO
  Protection Mode:     MaxPerformance
  Fast-Start Failover: DISABLED
  Databases:
    rac  - Primary database
    orcl - Physical standby database

Current status for "maa":
DISABLED

DGMGRL> show database verbose rac;

Database
  Name:            rac
  Role:            PRIMARY
  Enabled:         NO
  Intended State:  ONLINE
  Instance(s):
    rac2
    rac1

  Properties:
    InitialConnectIdentifier        = 'rac'
    ObserverConnectIdentifier       = ''
    LogXptMode                      = 'ASYNC'
    Dependency                      = ''
    DelayMins                       = '0'
    Binding                         = 'OPTIONAL'
    MaxFailure                      = '0'
    MaxConnections                  = '1'
    ReopenSecs                      = '300'
    NetTimeout                      = '180'
    LogShipping                     = 'ON'
    PreferredApplyInstance          = ''
    ApplyInstanceTimeout            = '0'
    ApplyParallel                   = 'AUTO'
    StandbyFileManagement           = 'auto'
    ArchiveLagTarget                = '0'
    LogArchiveMaxProcesses          = '5'
    LogArchiveMinSucceedDest        = '1'
    DbFileNameConvert               = '+DATA/rac, /u01/app/oracle/oradata/orcl'
    LogFileNameConvert              = '+FLASH/rac, /u01/app/oracle/flash_recover_area/orcl, +DATA/rac,

/u01/app/oracle/oradata/orcl'
    FastStartFailoverTarget         = ''
    StatusReport                    = '(monitor)'
    InconsistentProperties          = '(monitor)'
    InconsistentLogXptProps         = '(monitor)'
    SendQEntries                    = '(monitor)'
    LogXptStatus                    = '(monitor)'
    RecvQEntries                    = '(monitor)'
    HostName(*)
    SidName(*)
    LocalListenerAddress(*)
    StandbyArchiveLocation(*)
    AlternateLocation(*)
    LogArchiveTrace(*)
    LogArchiveFormat(*)
    LatestLog(*)
    TopWaitEvents(*)
    (*) - Please check specific instance for the property value

Current status for "rac":
DISABLED

  • 1
  • 2
  • 下一頁

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.