duplicate搭建DG最大效能(rac-單例項)
備庫操作:
一、建立pfile和密碼口令檔案
我建立的pfile如下:
*.control_files='/dup1/control01.ctl'
*.db_block_size=8192
*.db_create_file_dest='/dup1'
*.db_file_name_convert='+oradata','/dup1'
*.db_name='test'
*.db_recovery_file_dest='/arch'
*.db_recovery_file_dest_size=4621074432
*.fal_client='dup1'
*.fal_server='test'
*.log_archive_format='%t_%s_%r.dbf'
*.log_file_name_convert='+oradata','/dup1','+rcy','/dup2'
*.remote_login_passwordfile='exclusive'
*.standby_file_management='AUTO'
db_unique_name=testt
log_archive_config='DG_CONFIG=(testt,test)'
LOG_ARCHIVE_DEST_1='LOCATION=/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=testt';
建立密碼口令檔案:
orapwd file=$ORACLE_HOME/dbs/orapwtest password=oracle entries=3
在備庫上配置監聽
LISTENER=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.162.120)(PORT=1521))))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=dup1)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME=test)))
配置完成重啟監聽
[oracle@ora3 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 24-MAR-2017 04:33:42
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.162.120)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 01-JAN-2017 14:10:43
Uptime 81 days 14 hr. 23 min. 19 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/ora3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora3)(PORT=1521)))
Services Summary...
Service "test" has 1 instance(s).
Instance "test", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
[oracle@ora3 admin]$ lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 24-MAR-2017 04:33:49
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.162.120)(PORT=1521)))
The command completed successfully
[oracle@ora3 admin]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 24-MAR-2017 04:33:55
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/ora3/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.162.120)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.162.120)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 24-MAR-2017 04:33:55
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/ora3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.162.120)(PORT=1521)))
Services Summary...
Service "test" has 1 instance(s).
Instance "test", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
主庫操作:
1、開啟最小日誌
SQL> select log_mode,force_logging from v$database;
LOG_MODE FOR
------------ ---
ARCHIVELOG NO
SQL> alter database force logging;
Database altered.
SQL> select log_mode,force_logging from v$database;
LOG_MODE FOR
------------ ---
ARCHIVELOG YES
2、修改引數
主庫:
alter system set log_archive_config='DG_CONFIG=(test,testt)';
alter system set LOG_ARCHIVE_DEST_1='LOCATION=+RCY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=test';
alter system set LOG_ARCHIVE_DEST_2='SERVICE=dup1 arch SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=testt';
3、登入rman
rman target / auxiliary sys/oracle@dup1 nocatalog
4、開始複製
run
{
DUPLICATE TARGET DATABASE
FOR STANDBY
FROM ACTIVE DATABASE
DORECOVER;
}
恢復完之後備庫:
alter database recover managed standby database disconnect from session;
然後主庫切換日誌,備庫檢視告警是否已經傳輸日誌
一、建立pfile和密碼口令檔案
我建立的pfile如下:
*.control_files='/dup1/control01.ctl'
*.db_block_size=8192
*.db_create_file_dest='/dup1'
*.db_file_name_convert='+oradata','/dup1'
*.db_name='test'
*.db_recovery_file_dest='/arch'
*.db_recovery_file_dest_size=4621074432
*.fal_client='dup1'
*.fal_server='test'
*.log_archive_format='%t_%s_%r.dbf'
*.log_file_name_convert='+oradata','/dup1','+rcy','/dup2'
*.remote_login_passwordfile='exclusive'
*.standby_file_management='AUTO'
db_unique_name=testt
log_archive_config='DG_CONFIG=(testt,test)'
LOG_ARCHIVE_DEST_1='LOCATION=/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=testt';
建立密碼口令檔案:
orapwd file=$ORACLE_HOME/dbs/orapwtest password=oracle entries=3
在備庫上配置監聽
LISTENER=
(DESCRIPTION=
(ADDRESS_LIST=
(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.162.120)(PORT=1521))))
SID_LIST_LISTENER=
(SID_LIST=
(SID_DESC=
(GLOBAL_DBNAME=dup1)
(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)
(SID_NAME=test)))
[oracle@ora3 admin]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 24-MAR-2017 04:33:42
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.162.120)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 01-JAN-2017 14:10:43
Uptime 81 days 14 hr. 23 min. 19 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/ora3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ora3)(PORT=1521)))
Services Summary...
Service "test" has 1 instance(s).
Instance "test", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
[oracle@ora3 admin]$ lsnrctl stop
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 24-MAR-2017 04:33:49
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.162.120)(PORT=1521)))
The command completed successfully
[oracle@ora3 admin]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 24-MAR-2017 04:33:55
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Starting /u01/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 11.2.0.4.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/ora3/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.162.120)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.162.120)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 24-MAR-2017 04:33:55
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/ora3/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.162.120)(PORT=1521)))
Services Summary...
Service "test" has 1 instance(s).
Instance "test", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
主庫操作:
1、開啟最小日誌
SQL> select log_mode,force_logging from v$database;
LOG_MODE FOR
------------ ---
ARCHIVELOG NO
SQL> alter database force logging;
Database altered.
SQL> select log_mode,force_logging from v$database;
LOG_MODE FOR
------------ ---
ARCHIVELOG YES
主庫:
alter system set log_archive_config='DG_CONFIG=(test,testt)';
alter system set LOG_ARCHIVE_DEST_1='LOCATION=+RCY VALID_FOR=(ALL_LOGFILES,ALL_ROLES) DB_UNIQUE_NAME=test';
alter system set LOG_ARCHIVE_DEST_2='SERVICE=dup1 arch SYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE) DB_UNIQUE_NAME=testt';
rman target / auxiliary sys/oracle@dup1 nocatalog
4、開始複製
run
{
DUPLICATE TARGET DATABASE
FOR STANDBY
FROM ACTIVE DATABASE
DORECOVER;
}
alter database recover managed standby database disconnect from session;
然後主庫切換日誌,備庫檢視告警是否已經傳輸日誌
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29802484/viewspace-2137741/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- duplicate複製資料庫(rac-單例項)資料庫單例
- 【DG】在Linux平臺上搭建單例項的dataguard--duplicateLinux單例
- 搭建RAC到單例項DG單例
- Oracle DG搭建1(duplicate方式)Oracle
- 單例項的duplicate(non ASM)單例ASM
- RAC 例項 遷移到 單例項 -- 使用RMAN Duplicate單例
- RAC+DG(asm單例項)ASM單例
- rman duplicate搭建第二個 dg
- 11GR2 Active Duplicate過程(單例項對單例項)單例
- RAC+單例項DG的切換單例
- 【DG】備庫RMAN還原方式搭建DG(不使用duplicate命令)
- 一步一步搭建11gR2 rac+dg之配置單例項的DG(八)單例
- CentOS 7.3 ECS上搭建RAC 18c+單例項DG+EMCC+DG的FSFO快速故障轉移配置CentOS單例
- 單例項DG切換中的虛擬IP單例
- 11g 兩個節點RAC 搭建單例項DG詳細步驟以及注意事項單例
- 【DG】在Linux平臺上搭建單例項的dataguard--rman還原方式Linux單例
- dg搭建 單點-單點
- DG RAC - 單點搭建
- oracle 19c dg搭建duplicate過程中報錯Oracle
- OGG搭建(rac到-->單例項)單例
- Oracle 11g RAC 配置單例項 DataGuard(通過 DUPLICATE 方式)Oracle單例
- 11g兩個節點RAC搭建單例項DG過程問題以及解決方法單例
- Oracle11g 搭建單例項DataGuardOracle單例
- DG-duplicate操作注意事項(各種報錯應對方法)
- ORACLE 11G 建立 DATAGUARD(雙節點RAC-->單例項DG)Oracle單例
- 最大效能模式DATAGUARD 搭建 及SWITCH模式
- 單例項刪除ASM例項單例ASM
- 10g DG保護模式的切換:從最大效能到最大可用模式
- DG搭建
- DG rman duplicate 複製庫錯誤
- 每天日誌上T的環境用duplicate做DG的注意事項
- 單例與單例項之爭單例
- Kafka效能測試例項Kafka
- 【DG】搭建(一)
- Oracle 11g單主搭建物理DGOracle
- websocket簡單例項Web單例
- Hibernate(二):Hibernate搭建開發環境+簡單例項開發環境單例
- JavaScript單例模式概念與例項JavaScript單例模式