單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(1)
單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(10):http://space.itpub.net/81227/viewspace-702273
Data Guard 環境:
作業系統: RHEL5 X64
|
Primary資料庫 |
Standby資料庫 |
資料庫SID |
orcl |
stby |
DB_UNIQUE_NAME |
orcl |
stby |
一. Primary 端的配置
1. 主庫設定為force logging 模式
SQL> alter database force logging;
SQL> select force_logging from v$database;
2. 主庫設為歸檔模式
SQL> shutdown immediate
SQL> startup mount
SQL> alter database archivelog;
SQL> archive log list;
3. 建立備庫的密碼檔案和控制檔案
SQL> alter database create standby controlfile as '/tmp/control01.ctl';
--說明:判斷一個資料庫是Primary還是Standby,就是透過控制檔案來判斷的。
$ cp $ORACLE_HOME/dbs/orapworcl $ORACLE_HOME/dbs/orapwstby
4. 修改初始化引數檔案
SQL> create pfile='/tmp/init.ora' from spfile;
在init.ora 新增如下內容:
*.DB_UNIQUE_NAME='orcl'
*.log_archive_config='DG_CONFIG=(orcl,stby)'
*.log_archive_dest_1='LOCATION=/u1/app/oracle/oradata/arch valid_for=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=orcl'
*.log_archive_dest_2='SERVICE=stby LGWR ASYNC valid_for=(ONLINE_LOGFILES,PRIMARY_ROLES) DB_UNIQUE_NAME=stby'
*.log_archive_max_processes=2
*.standby_file_management='AUTO'
*.standby_archive_dest=' ?/dbs/arch' 此引數已過時,不用設定
*.FAL_SERVER='stby'
*.FAL_CLIENT='orcl'
*.log_file_name_convert='stby','orcl'
*.db_file_name_convert='stby','orcl'
-- 注意:orcl,stby是在tnsnames檔案中配置的
5. 用'/tmp/init.ora'這個pfile啟動資料庫,並生成spfile。
SQL> shutdown immediate
SQL> startup pfile='/tmp/init.ora';
SQL> create spfile from pfile='/tmp/init.ora';
6. 修改listener.ora 和tnsnames.ora 檔案
Listener.ora 檔案:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(SID_NAME = orcl)
)
(SID_DESC =
(GLOBAL_DBNAME = orcl)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(SID_NAME = stby)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = RHEL5)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
)
)
注意:SID_LIST_LISTENER配置的是靜態註冊,如果沒有該引數,而且Data Guard啟動順序又不正確,那麼在主庫可能會報 PING[ARC1]: Heartbeat failed to connect to standby 'stby'. Error is 12514. 錯誤,導致歸檔無法完成。
Tnsnames.ora 檔案
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST =RHEL5)(PORT = 1521))
)
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) )
)
STBY =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = RHEL5)(PORT = 1521))
)
(CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = stby))
)
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/81227/viewspace-713012/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(7)LinuxOracle
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(6)LinuxOracle
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(5)LinuxOracle
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(4)LinuxOracle
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(3)LinuxOracle
- 單機Linux平臺Oracle 11g DataGuard Physical Standby 搭建例項(2)LinuxOracle
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(1)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(10)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(9)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(8)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(7)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(6)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(5)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(4)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(3)LinuxOracle 10g
- 單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(2)LinuxOracle 10g
- Oracle Data Guard Linux 平臺 Physical Standby 搭建例項 -1OracleLinux
- Oracle Data Guard Linux 平臺 Physical Standby 搭建例項OracleLinux
- 單機Linux平臺Oracle 10g DataGuard Logical Standby 搭建例項LinuxOracle 10g
- Oracle Data Guard Linux 平臺 Physical Standby 搭建例項-3OracleLinux
- Oracle Data Guard Linux 平臺 Physical Standby 搭建例項 -2OracleLinux
- 單機Linux平臺Oracle10g DataGuard Logical Standby搭建例項(6)LinuxOracle
- 單機Linux平臺Oracle10g DataGuard Logical Standby搭建例項(5)LinuxOracle
- 單機Linux平臺Oracle10g DataGuard Logical Standby搭建例項(4)LinuxOracle
- 單機Linux平臺Oracle10g DataGuard Logical Standby搭建例項(3)LinuxOracle
- 單機Linux平臺Oracle10g DataGuard Logical Standby搭建例項(2)LinuxOracle
- 【DataGuard】Oracle 11g physical standby switchoverOracle
- Linux平臺Oracle 11g DataGuard Physical Standby 非正常關閉後的啟動LinuxOracle
- 【DG】在Linux平臺上搭建單例項的dataguard--duplicateLinux單例
- Oracle 11g Data Guard (physical standby - active dataguard) [final]Oracle
- Oracle 11g RAC 配置單例項 DataGuardOracle單例
- Oracle11g 搭建單例項DataGuardOracle單例
- DataGuard:Physical Standby Switchover
- 【DG】在Linux平臺上搭建單例項的dataguard--rman還原方式Linux單例
- Oracle 10G windows 平臺 DataGuard 例項Oracle 10gWindows
- DataGuard:Physical Standby FailoverAI
- ORACLE10g DataGuard 配置Physical Standby DatabaseOracleDatabase
- 配置 Oracle 10g 單例項物理dataguard和邏輯standbyOracle 10g單例