=2
*.db_create_file_dest='+DATADG'
*.db_create_online_log_dest_1='+DATADG'
suq1.thread=1
suq2.thread=2
### dg parameter
*.db_unique_name=suq1
*.log_archive_config='dg_config=(suq,suq1)'
*.standby_file_management='AUTO'
*.db_file_name_convert='/opt/oracle/oradata/suq','+DATADG/suq/datafile'
*.log_file_name_convert='/opt/oracle/oradata/suq','+DATADG/suq/datafile'
*.log_archive_dest_1='location=+datadg/suq/archivelog valid_for=(all_logfiles,all_roles) db_unique_name=suq1'
*.log_archive_dest_2='service=primary lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=suq'
*.fal_server=primary
*.fal_client=standby
?
注意:suq1、suq2的local_listener和remote_listener必须配置正确,否则打开库之后scan ip可能失效
3.配置主库的dg参数:
?
alter system set log_archive_config='dg_config=(suq,suq1)' scope=both;
alter system set log_archive_dest_1='location=/opt/arch valid_for=(all_logfiles,all_roles) db_unique_name=suq' scope=both;
alter system set log_archive_dest_2='service=standby lgwr async valid_for=(online_logfiles,primary_role) db_unique_name=suq1' scope=both;
alter system set fal_server=suq1 scope=both;
alter system set fal_client=suq scope=both;
?
4.在保证所有需要的目录都已经创建完成的情况下,将备库启动到nomount,并且测试tnsnames的连通性:
?
SQL>startup nomount pfile='/home/oracle/initsuq1.ora'
ORACLE instance started.
Total System Global Area 835104768 bytes
Fixed Size 2257840 bytes
Variable Size 553651280 bytes
Database Buffers 272629760 bytes
Redo Buffers 6565888 bytes
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
[oracle@suq1 ~]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 26-JUL-2015 21:27:45
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date 26-JUL-2015 18:58:27
Uptime 0 days 2 hr. 29 min. 17 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/11.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/suq1/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.110)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.56.111)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "suq1" has 1 instance(s).
Instance "suq1", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully
[oracle@11g1 ~]$ sqlplus sys/manager@standby as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Sun Jul 26 21:48:08 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining