單機Linux平臺Oracle 10g DataGuard Physical Standby 搭建例項(1)
作業系統: RHEL5,主機名:RHEL5
主庫SID:orcl,備庫SID:stby
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)
)
)
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 'orcl_st'. 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-701181/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【DG】在Linux平臺上搭建單例項的dataguard--duplicateLinux單例
- 【DG】在Linux平臺上搭建單例項的dataguard--rman還原方式Linux單例
- 搭建windows到linux的oracle 12c physical standby備庫WindowsLinuxOracle
- Oracle DG建立Physical Standby DatabaseOracleDatabase
- 【DG】Data Guard搭建(physical standby)
- Oracle 11.2.0.4 physical dataguard和snapshot dataguard切換Oracle
- dataguard 搭建 oracle_sid相同 2節點 primary+standbyOracle
- dataguard 搭建 oracle_sid不同 2節點 primary+standbyOracle
- Oracle 單機配置DataGuardOracle
- Convert a Physical Standby Database into a Snapshot Standby DatabaseDatabase
- Oracle 12.2 physical standby備庫收集AWR報告Oracle
- 單例項Primary快速搭建Standby RAC參考手冊(19.16 ADG)單例
- Oracle dataguard報錯:Error 1017 received logging on to the standbyOracleError
- oracle資料庫跨平臺(AIX)從RAC恢復至(linux)下的單例項Oracle資料庫AILinux單例
- Performing a Failover to a Physical Standby DatabaseORMAIDatabase
- Oracle 19C CBD Active DataGuard Standby passwd file 注意事項 ORA-01017Oracle
- ORACLE-LINUX環境字元介面單例項安裝OracleLinux字元單例
- Oracle 11.2 DataGuard RAC To RAC搭建Oracle
- 搭建ELK日誌平臺(單機)
- 【DG】Oracle11g異構平臺之Linux To Windows DataGuard安裝配置--duplicateOracleLinuxWindows
- 搭建自己的直播平臺,實現exe單例模式單例模式
- Linux平臺Oracle開機自啟動設定LinuxOracle
- oracle之 單例項監聽修改埠Oracle單例
- linux監控平臺搭建Linux
- DATAGUARD手記(PRIMARY+2STANDBY)(一)
- DATAGUARD手記(PRIMARY+2STANDBY)(二)
- oracle 10g在linux下的安裝及簡單命令Oracle 10gLinux
- Oracle Physical Database LimitsOracleDatabaseMIT
- 跨平臺級聯dataguard配置
- Physical Standby Switchover_status Showing Not Allowed. (Doc ID 1392763.1)
- 【DATAGUARD】Oracle21c Dataguard建立注意事項及主要引數介紹Oracle
- Oracle 12C RAC的單機Standby returning error ORA-16191OracleError
- 從nub備份恢復(同平臺)恢復RAC至單例項單例
- Oracle 11g RAC到單例項OGG同步Oracle單例
- 【Dataguard】DataGuard運維注意事項運維
- 4.1. Oracle例項Oracle
- Oracle Far Sync例項Oracle
- DataGuard---->物理StandBy的角色切換之switchover
- standby_file_management為manual造成dataguard延遲