Oracle 10g Logical DataGuard 詳細搭建過程

來源:互聯網
上載者:User

logical standby是在physical standby基礎上搭建

Oracle10g Physical DataGuard 詳細搭建過程

--停止standby上的日誌應用

SQL> alter database recover managed standby database  cancel;


Database altered.

--修改主庫log_archive_dest_3參數,當切換為備庫時線上日誌歸檔路徑

SQL> alter system set log_archive_dest_3='LOCATION=/u01/app/oracle/oradata/dbserver/arch valid_for=(standby_logfiles,standby_role) db_unique_name=dbserver';


System altered.


SQL> alter system set log_archive_dest_state_3=enable;

System altered.

--主庫執行,alert.log顯示Logminer Bld: Done

SQL> execute dbms_logstdby.build;


PL/SQL procedure successfully completed.

--修改備庫log_archive_dest_3參數,備庫線上日誌歸檔路徑

SQL> alter system set log_archive_dest_3='LOCATION=/u01/app/oracle/oradata/standby/arch valid_for=(standby_logfiles,standby_role) db_unique_name=standby';


System altered.


SQL> alter system set log_archive_dest_state_3=enable;


System altered.

--如果備庫沒有暫存資料表空間需要建立

--在standby端將物理備庫轉為邏輯備庫,最後一個standby是邏輯備庫名稱

SQL> select status from v$instance;


STATUS
------------
MOUNTED


SQL> select database_role from v$database;


DATABASE_ROLE
----------------
PHYSICAL STANDBY


SQL> startup mount force
ORACLE instance started.


Total System Global Area  612368384 bytes
Fixed Size                  2085872 bytes
Variable Size            167775248 bytes
Database Buffers          436207616 bytes
Redo Buffers                6299648 bytes
Database mounted.
SQL> alter database recover to logical standby standby;


Database altered.


SQL> select status from v$instance;


STATUS
------------
STARTED


SQL> startup mount force
ORACLE instance started.


Total System Global Area  612368384 bytes
Fixed Size                  2085872 bytes
Variable Size            167775248 bytes
Database Buffers          436207616 bytes
Redo Buffers                6299648 bytes
Database mounted.
SQL> select database_role from v$database;


DATABASE_ROLE
----------------
LOGICAL STANDBY


SQL> alter database open resetlogs;


Database altered.


SQL> select name from v$database;


NAME
---------
STANDBY

 

 

 


--在主庫switch logfile

SQL> alter system switch logfile;


System altered.


SQL> /


System altered.


SQL> /


System altered.


SQL> /


System altered.


SQL> /


System altered.


SQL> /


System altered.

 

 

 


--standby alert.log

RFS[3]: Assigned to RFS process 10806
RFS[3]: Identified database type as 'logical standby'
Mon Mar  3 13:10:28 2014
RFS LogMiner: Client enabled and ready for notification
RFS[3]: Successfully opened standby log 6: '/u01/app/oracle/oradata/standby/standby03.log'
Mon Mar  3 13:10:28 2014
RFS LogMiner: Client enabled and ready for notification
Mon Mar  3 13:11:21 2014
RFS LogMiner: Client enabled and ready for notification
Mon Mar  3 13:11:22 2014
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 5: '/u01/app/oracle/oradata/standby/standby02.log'
Mon Mar  3 13:11:33 2014
RFS LogMiner: Client enabled and ready for notification
Mon Mar  3 13:11:34 2014
Primary database is in MAXIMUM PERFORMANCE mode
RFS[2]: Successfully opened standby log 5: '/u01/app/oracle/oradata/standby/standby02.log'

--在備庫啟用即時應用

SQL> alter database start logical standby apply immediate;


Database altered.

  • 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.