Yes, thanks to

Then, I can give simple and reasy way to make it.

Suppose hosts and IPs like that:

150.150.186.16 linux3 (primary)
150.150.186.26 linux4 (secondary or standby)

On primary node:

(1) parameter:
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string TEST
SQL> show parameter db_uniq
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_unique_name string TEST
SQL> show parameter LOG_ARCHIVE_CONFIG
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config string DG_CONFIG=(TEST,TESTDR)
SQL>show parameter LOG_ARCHIVE_DEST_1
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1 string LOCATION=/oracle/archive
SQL> show parameter LOG_ARCHIVE_DEST_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string SERVICE=TESTDR NOAFFIRM ASYNC
VALID_FOR=(ONLINE_LOGFILES,PRI
MARY_ROLE) DB_UNIQUE_NAME=TEST
DR

SQL> show parameter log_archive_dest_state_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2 string ENABLE
SQL> show parameter log_archive_forma
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_format string %t_%s_%r.arc
SQL> show parameter log_archive_max_processes
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_max_processes integer 30
SQL> show parameter remote_login_passwordfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string EXCLUSIVE
SQL> show parameter fal_server
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
fal_server string TESTDR
SQL> show parameter standby_file_management
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
standby_file_management string AUTO
SQL> show parameter service
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
service_names string TEST

The redo log would better like:
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/oracle/system/redo01.log
/oracle/system/redo02.log
/oracle/system/redo03.log
/oracle/system/standby_redo01.log
/oracle/system/standby_redo02.log
/oracle/system/standby_redo03.log
/oracle/system/standby_redo04.log

(2) listener and TNS
[oracle@linux3 admin]$ cat listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux3)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)

SID_LIST_LISTENER =
(SID_DESC =
(ORACLE_HOME = /oracle/app/product/11.2.0)
(SID_NAME = TEST)
)
)
ADR_BASE_LISTENER = /oracle
[oracle@linux3 admin]$ cat tnsnames.ora
TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux3)(PORT = 1521))
)
(CONNECT_DATA =
### (SID = TEST)
(SERVICE_NAME = TEST) (UR = A)
)
)
TESTDR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux4)(PORT = 1521))
)
(CONNECT_DATA =
### (SID = TEST)
(SERVICE_NAME = TESTDR) (UR = A)
)
)

On Secondary node:
(1) parameter
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string TEST
SQL> show parameter db_uniq
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_unique_name string TESTDR
SQL> show parameter LOG_ARCHIVE_CONFIG
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_config string DG_CONFIG=(TEST,TESTDR)
SQL> show parameter LOG_ARCHIVE_DEST_1
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_1 string LOCATION=/oracle/archive
SQL> show parameter LOG_ARCHIVE_DEST_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_2 string SERVICE=TEST NOAFFIRM ASYNC VA
LID_FOR=(ONLINE_LOGFILES,PRIMA
RY_ROLE) DB_UNIQUE_NAME=TEST
SQL> show parameter log_archive_dest_state_2
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_dest_state_2 string ENABLE
SQL> show parameter log_archive_format
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_format string %t_%s_%r.arc
SQL> show parameter log_archive_max_processes
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
log_archive_max_processes integer 30
SQL> show parameter remote_login_passwordfile
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile string EXCLUSIVE
SQL> show parameter fal_server
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
fal_server string TEST
SQL> show parameter standby_file_management
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
standby_file_management string AUTO
SQL> show parameter service
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
service_names string TESTDR
The redo log would better like:
SQL> select member from v$logfile;
MEMBER
--------------------------------------------------------------------------------
/oracle/system/redo01.log
/oracle/system/redo02.log
/oracle/system/redo03.log
/oracle/system/standby_redo01.log
/oracle/system/standby_redo02.log
/oracle/system/standby_redo03.log
/oracle/system/standby_redo04.log

(2) listener and TNS
[oracle@linux4 admin]$ cat listener.ora
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux4)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER =
(SID_DESC =
(ORACLE_HOME = /oracle/app/product/11.2.0)
(SID_NAME = TEST)
(SERVICE_NAME = TESTDR)
)
)
ADR_BASE_LISTENER = /oracle
[oracle@linux4 admin]$ cat tnsnames.ora
TEST =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux3)(PORT = 1521))
)
(CONNECT_DATA =
(SID = TEST)
(SERVICE_NAME = TEST) (UR = A)
)
)
TESTDR =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = linux4)(PORT = 1521))
)
(CONNECT_DATA =
(SID = TEST)
(SERVICE_NAME = TESTDR) (UR = A)
)
)

So , at the end, when both nodes are ready. You execute following command like:

SQL> startup nomount;
ORACLE instance started.
Total System Global Area 3657797632 bytes
Fixed Size 2258600 bytes
Variable Size 805308760 bytes
Database Buffers 2835349504 bytes
Redo Buffers 14880768 bytes
SQL> alter database mount standby database;
SQL> alter database recover managed standby database disconnect from session;
Database altered.
then you just get an normal style DG
SQL> select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
TEST MOUNTED PHYSICAL STANDBY

If we want to get active data guard. we should do like :
SQL> startup nomount;
ORACLE instance started.
Total System Global Area 3657797632 bytes
Fixed Size 2258600 bytes
Variable Size 805308760 bytes
Database Buffers 2835349504 bytes
Redo Buffers 14880768 bytes
SQL> alter database mount standby database;
Database altered.
SQL> alter database open read only;
Database altered.
SQL> alter database recover managed standby database disconnect from session;
Database altered.
SQL> select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
TEST READ ONLY WITH APPLY PHYSICAL STANDBY

Then , please enjoy yourself

A easy and simple way to establish Oracle ADG的更多相关文章

  1. Oracle ADG环境搭建

    部署 环境介绍 1,软件安装前基础部署 (两台做同样操作) 1.1,关闭selinux和防火墙 因为centos7里面没有/etc/sysconfig/iptables这个配置文件所以我们首先用yum ...

  2. 数据库周刊31丨openGauss 正式开源;7月数据库排行榜发布;浙江移动国产数据库AntDB迁移;oracle ADG跨版本搭建;PG解决社保问题;mysqlbinlog解析……

    摘要:墨天轮数据库周刊第31期发布啦,每周1次推送本周数据库相关热门资讯.精选文章.干货文档. 热门资讯 1.openGauss 正式开源,华为公开发布源代码[摘要]6月1日,华为正式宣布开源数据库能 ...

  3. oracle ADG启动顺序

    一.oracle ADG启动顺序 1.启动主备库监听 [oracle@dgdb1 ~]$ lsnrctl start [oracle@dgdb2 ~]$ lsnrctl start   2.启动备库 ...

  4. One simple health check for oracle with sql

    There are some sqls which is used for check the oracle database's health condition. ------numbers of ...

  5. Oracle ADG搭建

    Oracle Active Data Guard搭建 一:安装 1.基础环境配置 1.1.开启强制日志记录 DG日志发送方式中ARCH进程和LGWR进程的ASYNC模式都是基于日志同步的,所以我们必须 ...

  6. Oracle管理文件OMF (oracle managed files)

    简化dba的管理操作 1:启用 omf 23:16:04 SYS@orcl> show parameter DB_CREATE_FILE_DEST NAME TYPE VALUE ------- ...

  7. Ways to access Oracle Database in PostgreSQL

    Today, organizations stores information(data) in different database systems. Each database system ha ...

  8. Red Hat Enterprise Linux 6上安装Oracle 11G(11.2.0.4.0)缺少pdksh包的问题

    RHEL 6上安装Oracle 11G警告缺少pdksh包 前言 相信很多刚刚接触学习Oracle的人,在RHEL6上安装11.2.0.3 or 11.2.0.4这两个版本的时候, 都遇到过先决条件检 ...

  9. oracle 19c dataguard aws ORA-03186报错

    环境说明 在亚马逊云AWS上面安装了一套oracle 19c dataguard,linux centos 7.7的操作系统,开始时同步正常,实时应用redolog,一会儿之后就不行了.报错如下: o ...

随机推荐

  1. spring中@Component注解

    1.@controller 控制器(注入服务) 2.@service 业务(注入dao) 3.@repository dao(实现dao访问) 4.@component (把普通pojo实例化到spr ...

  2. 【HTML】输入密码访问

    <script> (function(){ if('{{ page.password }}'){ if (prompt('请输入文章密码') !== '{{ page.password } ...

  3. 行内元素的上下margin 和 img元素的上下margin

    行内元素的特点有: 1.与其他元素在同一行 2.宽度(width).高度(height).内边距的top/bottom(padding-top/padding-bottom)和外边距的top/bott ...

  4. workspace 打开的是我的电脑

    在system tree板块的空白处右键-->set root-->current workspace 即可恢复workspace.

  5. 对委托 以及 action func 匿名函数 以及 lambda表达式的简单记录

    class Program { public delegate void MyDelegate(string str); static void Main(string[] args) { // My ...

  6. Bugku-CTF加密篇之easy_crypto(0010 0100 01 110 1111011 11 11111 010 000 0 001101 1010 111 100 0 001101 01111 000 001101 00 10 1 0 010 0 000 1 01111 10 11110 101011 1111101)

    easy_crypto 0010 0100 01 110 1111011 11 11111 010 000 0 001101 1010 111 100 0 001101 01111 000 00110 ...

  7. 整合SSM

    SSM整合:Spring - SpringMVC -  MyBatis 1.Spring -  MyBatis   :    需要整合:将MyBatis的SqlSessionFactory 交给Spr ...

  8. MYSQL---外键 primary key 作用

    https://www.cnblogs.com/x739400043/p/4732158.html 外键和级联   关于外键写的不错的网址:http://blog.csdn.net/lidaasky/ ...

  9. java中使用静态字段和构造函数跟踪某个类所创建对象的个数

    对于这个问题,我们都知道java中使用类时会自动调用构造函数.按照这个思路我们可以定义一个static int 形的常量count 然后将count++放入这个类的构造函数中,这样只要输出count的 ...

  10. 开源代码License

    参考:https://mp.weixin.qq.com/s/Q29NGDIbyCwm6KiAKqI46A