【DG】Oracle 19c使用dbca來搭建物理DG--主rac備rac
【DG】Oracle 19c使用dbca來搭建物理DG--主rac備rac
【DG】Oracle 19c使用dbca來搭建物理DG(單例項)參考: http://blog.itpub.net/26736162/viewspace-2638038/
以下內容為主庫是rac,備庫也是rac型別,通過dbca的方式來搭建物理DG:
SELECT CDB FROM V$DATABASE; alter database archivelog; alter database force logging; alter database flashback on; alter database open; alter pluggable database all open; alter pluggable database all save state; select thread#,group#,bytes/1024/1024 SIZE_MB, status,members from v$log; select thread#,group#,member from v$logfile; set line 9999 pagesize 9999 col db_id format a15 col GROUP# format 99999 select (select instance_name from gv$instance na where na.inst_id=a.INST_ID) instance_name, GROUP#, DBID db_id, THREAD#, SEQUENCE#, BYTES, USED, ARCHIVED, STATUS, FIRST_CHANGE#, NEXT_CHANGE#,LAST_CHANGE# from gv$standby_log a order by INST_ID,THREAD#,GROUP#; alter database add standby logfile thread 1 group 5 ('+DATA','+FRA') size 200M ,group 6 ('+DATA','+FRA') size 200M ,group 7 ('+DATA','+FRA') size 200M ; alter database add standby logfile thread 2 group 8 ('+DATA','+FRA') size 200M ,group 9 ('+DATA','+FRA') size 200M ,group 10 ('+DATA','+FRA') size 200M ; --------配置tns tns_rac19c = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.54)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.55)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = rac19c) ) ) tns_rac19cdg = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.54)(PORT = 1521)) (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.59.55)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = rac19cdg) ) ) --------配置監聽 SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = rac19c) (ORACLE_HOME = /u01/app/oracle/product/19.3.0/dbhome_1) (SID_NAME = rac19c1) ) (SID_DESC = (GLOBAL_DBNAME = rac19cdg) (ORACLE_HOME = /u01/app/oracle/product/19.3.0/dbhome_1) (SID_NAME = rac19cdg1) ) (SID_DESC = (GLOBAL_DBNAME = rac19c_DGMGRL) (ORACLE_HOME = /u01/app/oracle/product/19.3.0/dbhome_1) (SID_NAME = rac19c1) ) (SID_DESC = (GLOBAL_DBNAME = rac19cdg_DGMGRL) (ORACLE_HOME = /u01/app/oracle/product/19.3.0/dbhome_1) (SID_NAME = rac19cdg1) ) ) SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = rac19c) (ORACLE_HOME = /u01/app/oracle/product/19.3.0/dbhome_1) (SID_NAME = rac19c2) ) (SID_DESC = (GLOBAL_DBNAME = rac19cdg) (ORACLE_HOME = /u01/app/oracle/product/19.3.0/dbhome_1) (SID_NAME = rac19cdg2) ) (SID_DESC = (GLOBAL_DBNAME = rac19c_DGMGRL) (ORACLE_HOME = /u01/app/oracle/product/19.3.0/dbhome_1) (SID_NAME = rac19c2) ) (SID_DESC = (GLOBAL_DBNAME = rac19cdg_DGMGRL) (ORACLE_HOME = /u01/app/oracle/product/19.3.0/dbhome_1) (SID_NAME = rac19cdg2) ) ) srvctl stop listener -l LISTENER srvctl start listener -l LISTENER dbca -silent -createDuplicateDB \ -gdbName rac19c \ -sid rac19cdg \ -sysPassword lhr \ -primaryDBConnectionString 192.168.59.54:1521/rac19c \ -nodelist raclhr-19c-n1,raclhr-19c-n2 \ -adminManaged \ -databaseConfigType RAC \ -createAsStandby -dbUniqueName rac19cdg \ -datafileDestination '+DATA' \ -initParams db_create_file_dest=+DATA, db_create_online_log_dest_1=+DATA ---全引數 rac環境 set line 1000 set pagesize 1000 col name format a25 col VALUE format a100 SELECT a.NAME, i.instance_name, a.VALUE FROM gv$parameter a, gv$instance i WHERE a.inst_id = i.inst_id and a.name in ('dg_broker_start','db_name','db_unique_name','log_archive_config','log_archive_dest_1','log_archive_dest_2','log_archive_dest_state_1','log_archive_dest_state_2','log_archive_max_processes','remote_login_passwordfile','db_file_name_convert','log_file_name_convert','standby_file_management','fal_server','fal_client','dg_broker_config_file1','dg_broker_config_file2') ORDER BY a.name, i.instance_name; --主庫修改引數 alter system set LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=rac19c' sid='*'; alter system set LOG_ARCHIVE_DEST_2='service=tns_rac19cdg VALID_FOR=(online_logfiles,primary_role) DB_UNIQUE_NAME=rac19cdg' sid='*'; alter system set log_archive_config='dg_config=(rac19c,rac19cdg)' sid='*'; alter system set db_file_name_convert='+DATA','+DATA' scope=spfile sid='*'; alter system set log_file_name_convert='+DATA','+DATA' scope=spfile sid='*'; alter system set standby_file_management=auto scope=spfile sid='*'; alter system set fal_client='tns_rac19c' sid='*'; alter system set fal_server='tns_rac19cdg' sid='*'; ---建立路徑 ASMCMD> mkdir +DATA/dgshare/ --主庫 show parameter dg alter system set dg_broker_config_file1='+DATA/dgshare/dr1rac19c.dat' SID='*'; alter system set dg_broker_config_file2='+DATA/dgshare/dr2rac19c.dat' SID='*'; alter system set dg_broker_start=true sid='*'; --備庫 show parameter dg alter system set dg_broker_config_file1='+DATA/dgshare/dr1rac19cDG.dat' SID='*'; alter system set dg_broker_config_file2='+DATA/dgshare/dr2rac19cDG.dat' SID='*'; alter system set dg_broker_start=true sid='*'; --備庫修改引數 alter system set LOG_ARCHIVE_DEST_1='LOCATION=USE_DB_RECOVERY_FILE_DEST VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=rac19cdg' scope=spfile sid='*'; alter system set log_archive_config='dg_config=(rac19c,rac19cdg)'; alter system set db_file_name_convert='+DATA','+DATA' scope=spfile sid='*'; alter system set log_file_name_convert='+DATA','+DATA' scope=spfile sid='*'; alter system set standby_file_management=auto scope=spfile sid='*'; alter system set fal_client='tns_rac19cdg' sid='*'; alter system set fal_server='tns_rac19c' sid='*'; srvctl stop db -d rac19c srvctl start db -d rac19c srvctl stop db -d rac19cdg srvctl start db -d rac19cdg --備庫查詢實時應用 alter database recover managed standby database cancel; alter database recover managed standby database using current logfile disconnect; ! ps -ef|grep ora_mrp select INST_ID, dbid,name,DB_UNIQUE_NAME,current_scn,protection_mode,database_role,force_logging,open_mode,switchover_status from gv$database; COL NAME FOR A100 SET LINESIZE 9999 PAGESIZE 9999 COL NEXT_CHANGE# FOR 999999999999999 SELECT THREAD#, NAME, SEQUENCE#, ARCHIVED, APPLIED, A.NEXT_CHANGE# FROM V$ARCHIVED_LOG A WHERE A.SEQUENCE# >= (SELECT MAX(B.SEQUENCE#) - 3 FROM V$ARCHIVED_LOG B WHERE B.THREAD# = A.THREAD# AND B.RESETLOGS_CHANGE# = A.RESETLOGS_CHANGE# AND B.RESETLOGS_CHANGE# = (SELECT D.RESETLOGS_CHANGE# FROM V$DATABASE D) AND B.APPLIED = 'YES' GROUP BY B.THREAD#) ORDER BY A.THREAD#, A.SEQUENCE#; cp /u01/app/oracle/product/19.3.0/dbhome_1/network/admin/tnsnames.ora /u01/app/19.3.0/grid/network/admin/tnsnames.ora chown grid.oinstall /u01/app/19.3.0/grid/network/admin/tnsnames.ora dgmgrl sys/lhr@rac19c show configuration create configuration rac19c as primary database is rac19c connect identifier is tns_rac19c; add database rac19cdg as connect identifier is tns_rac19cdg maintained as physical; enable configuration show database verbose rac19c; show database verbose rac19cdg; alter database recover managed standby database cancel; alter database flashback on; select flashback_on,force_logging from v$database; alter database recover managed standby database using current logfile disconnect; edit database rac19c set property 'FastStartFailoverTarget'='rac19cdg'; edit database rac19cdg set property 'FastStartFailoverTarget'='rac19c';
About Me
........................................................................................................................ ● 本文作者:小麥苗,部分內容整理自網路,若有侵權請聯絡小麥苗刪除 ● 本文在itpub、部落格園、CSDN和個人微 信公眾號( xiaomaimiaolhr)上有同步更新 ● 本文itpub地址: http://blog.itpub.net/26736162 ● 本文部落格園地址: http://www.cnblogs.com/lhrbest ● 本文CSDN地址: https://blog.csdn.net/lihuarongaini ● 本文pdf版、個人簡介及小麥苗雲盤地址: http://blog.itpub.net/26736162/viewspace-1624453/ ● 資料庫筆試面試題庫及解答: http://blog.itpub.net/26736162/viewspace-2134706/ ● DBA寶典今日頭條號地址: http://www.toutiao.com/c/user/6401772890/#mid=1564638659405826 ........................................................................................................................ ● QQ群號: 230161599 、618766405 ● 微 信群:可加我微 信,我拉大家進群,非誠勿擾 ● 聯絡我請加QQ好友 ( 646634621 ),註明新增緣由 ● 於 2019-08-01 06:00 ~ 2019-08-31 24:00 在西安完成 ● 最新修改時間:2019-08-01 06:00 ~ 2019-08-31 24:00 ● 文章內容來源於小麥苗的學習筆記,部分整理自網路,若有侵權或不當之處還請諒解 ● 版權所有,歡迎分享本文,轉載請保留出處 ........................................................................................................................ ● 小麥苗的微店: https://weidian.com/s/793741433?wfr=c&ifr=shopdetail ● 小麥苗出版的資料庫類叢書: http://blog.itpub.net/26736162/viewspace-2142121/ ● 小麥苗OCP、OCM、高可用網路班: http://blog.itpub.net/26736162/viewspace-2148098/ ● 小麥苗騰訊課堂主頁: https://lhr.ke.qq.com/ ........................................................................................................................ 使用 微 信客戶端掃描下面的二維碼來關注小麥苗的微 信公眾號( xiaomaimiaolhr)及QQ群(DBA寶典)、新增小麥苗微 信, 學習最實用的資料庫技術。
........................................................................................................................ |
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2655725/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【DG】Oracle 19c使用dbca來搭建物理DGOracle
- Oracle 12c 使用RMAN搭建物理備庫(RAC to RAC)Oracle
- Oracle RAC+DG搭建Oracle
- 【DG】Oracle之級聯DG--(cascade dg) --(一主一備一級聯)Oracle
- ORACLE RAC TO RAC DG搭建過程中可能遇到的問題Oracle
- 【BUILD_ORACLE】Oracle 19c RAC搭建(六)建立RAC資料庫UIOracle資料庫
- Oracle 11.2 DataGuard RAC To RAC搭建Oracle
- ORACLE19C RAC+DGOracle
- Oracle RAC DG手動切換Oracle
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(四)Oracle
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(五)Oracle
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(三)Oracle
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(二)Oracle
- 【TUNE_ORACLE】Oracle 19c RAC搭建番外篇之RAC引數配置參考(一)Oracle
- 11G RAC+DG搭建
- 【BUILD_ORACLE】Oracle 19c RAC搭建(三)使用UDEV配置共享儲存UIOracledev
- Oracle 11g單主搭建物理DGOracle
- ORACLE RAC+DG調整redo大小Oracle
- 【DG】MAA-RAC to RAC ADG配置
- G003-ORACLE-INS-RAC-01 ORACLE 19C RAC Ins ON OEL 7.8Oracle
- Networker備份oracle racOracle
- Oracle 19c RAC INS-40724Oracle
- 【BUILD_ORACLE】Oracle 19c RAC搭建(五)DB軟體安裝UIOracle
- 【BUILD_ORACLE】Oracle 19c RAC搭建(四)Grid軟體安裝UIOracle
- Oracle RAC+DG 表空間擴容Oracle
- Oracle:Oracle RAC 11.2.0.4 升級為 19cOracle
- 【BUILD_ORACLE】Oracle 19c RAC搭建(一)安裝資源規劃UIOracle
- Oracle Linux 7.1 silent install 19C RACOracleLinux
- How To Deal With Split Brain In Oracle 19c RacAIOracle
- Disable Tfa In Oracle 19c RAC-20220112Oracle
- Oracle RAC+DG 調整redo/standby log fileOracle
- Overview of Oracle Flex ASM In Oracle 19c RAC-20220111ViewOracleFlexASM
- oracle RAC dbca的時候報錯提示cluster nodes are not accessibleOracle
- 一步一步搭建oracle 11gR2 rac+dg之環境準備(二)Oracle
- CRS Resource Introduction In Oracle 19c RAC-20220125Oracle
- Rename or Move a datafile In Oracle 19c RAC-20220117Oracle
- Disable Database Audit In Oracle 19c RAC-20220111DatabaseOracle
- Oracle 19C RAC腦裂問題分析Oracle