大家可能已经知道,在Oracle的DATAGUARD(这里指的是PHYSICAL STANDBY)环境中,Primary端会把生成的REDO传到Standby端,然后由Standby端的MRP进程应用该Redo,以达到同期效果。

首先,REDO_TRANSPORT_USER参数的意义如下:

http://docs.oracle.com/database/122/REFRN/REDO_TRANSPORT_USER.htm#REFRN10269

REDO_TRANSPORT_USER specifies the name of the user whose password verifier is used when a remote login password file is used for redo transport authentication.

This user must have the SYSDBA or SYSOPER privilege。。。

翻译过来就是,Standby端使用密码认证来保证REDO传输认证的话,利用指定的REDO_TRANSPORT_USER来进行认证。

手册上写着,REDO_TRANSPORT_USER用户需要有SYSDBA 或者 SYSOPER权限。

但是通过实际测试来看,只有SYSDBA是不行的,必须有SYSOPEN权限才行。

测试的时候使用的是12.2的DATAGUARD环境。

关于REDO_TRANSPORT_USER这个参数,也可以看看这个Mos 文档

 Troubleshooting ORA-16191 and ORA-1017/ORA-1031 in Data Guard Log Transport Services or Data Guard Broker (Doc ID 1368170.1)

=============
6. If you have setup the 'REDO_TRANSPORT_USER'-Initialization  Parameter to a certain User,
this User must be granted the  'SYSOPER'-Role and the Setting for this Parameter must be the same on  the Primary and all Standby Databases.
=============

简单的测试如下:

Test Case
------------------
▼Primary:ORCL
--create password file(12.2)
cd $ORACLE_HOME/dbs
orapwd file=orapworcl format=12.2 password=ora_1234 force=y

--create user
create user ORASYS identified by ora_1234;
create user ORAOPER identified by ora_1234;
grant CONNECT,SYSDBA to ORASYS;
grant CONNECT,SYSOPER to ORAOPER;

--check if the user created can connect to database.
sqlplus SYS/"ora_1234@orcl as SYSDBA"
sqlplus ORASYS/"ora_1234@orcl as SYSDBA"
sqlplus ORAOPER/"ora_1234@orcl as SYSOPER"

--check V$PWFILE_USERS
col USERNAME format a7
select USERNAME,SYSDBA,SYSOPER from V$PWFILE_USERS where USERNAME like 'ORA%';

USERNAM SYSDB SYSOP
------- ----- -----
ORASYS  TRUE  FALSE  <<<<<ORASYS user does not have SYSOPER Role
ORAOPER FALSE TRUE   <<<<<ORAOPER user have SYSOPER Role

■create dataguard

▼Standby:ORCLST
--check V$PWFILE_USERS
col USERNAME format a7
select USERNAME,SYSDBA,SYSOPER from V$PWFILE_USERS where USERNAME like 'ORA%';

USERNAM SYSDB SYSOP
------- ----- -----
ORASYS  TRUE  FALSE
ORAOPER FALSE TRUE

--check if the user created can connect to database
sqlplus SYS/"ora_1234@orclst as SYSDBA"
sqlplus ORASYS/"ora_1234@orclst as SYSDBA"
sqlplus ORAOPER/"ora_1234@orclst as SYSOPER"

--SYS(default) REDO transportation
▼Primary:ORCL
create table scott.test(id number);
insert into scott.test values(1);
commit;
alter system archive log current;

▼Standby:ORCLST
select count(*) from scott.test;
=> REDO transportation was fine.

--SYSDBA[ORASYS] REDO transportation
▼Primary:ORCL
alter system set REDO_TRANSPORT_USER=ORASYS scope=spfile;
shutdown immediate

▼Standby:ORCLST
alter system set REDO_TRANSPORT_USER=ORASYS;

▼Primary:ORCL
startup
insert into scott.test values(1);
commit;
alter system archive log current;

▼Standby:ORCLST
select count(*) from scott.test;
-- REDO transportation failed on ORA-16191
-- You can see ORA-16191 from alert log of Primary.

--SYSOPER[ORAOPER] REDO transportation
▼Primary:ORCL
alter system set REDO_TRANSPORT_USER=ORAOPER scope=spfile;
shutdown immediate

▼Standby:ORCLST
alter system set REDO_TRANSPORT_USER=ORAOPER;

▼Primary:ORCL
startup

▼Standby:ORCLST
select count(*) from scott.test;
=> REDO transportation was fine.

▼Primary:ORCL
insert into scott.test values(1);
commit;
alter system archive log current;

▼Standby:ORCLST
select count(*) from scott.test;
=> REDO transportation was fine.

[Oracle][DATAGUARD]关于REDO_TRANSPORT_USER参数的更多相关文章

  1. Oracle Dataguard之switchover

    Oracle Dataguard的角色转换包含两类:Switchover和Failover.Switchover指主备之间角色转换,主库降为备库,备库升级为主库.而failover则是指主库出现问题时 ...

  2. Oracle Dataguard之Real-Time Apply

    Oracle Dataguard一共支持三种模式:最大可用模式(Maximum Availability),最大性能模式(Maximum Performance),最大保护模式(Maximum Pro ...

  3. Oracle Dataguard之物理standby的基本配置

    尽管网上有很多Oracle Dataguard的配置教程,但不难发现,很多采用的是rman duplicate这种方法,尽管此种方法较为简便.但在某种程度上,却也误导了初学者,虽说也能配置成功,但只知 ...

  4. Oracle DataGuard 物理Standby 搭建(上)

    物理standby database 环境搭建 Arch asysnc Oracle Dataguard host IP Oracle_sid DB_unique_name FAL_server FA ...

  5. Oracle DataGuard搭建(一)

    第一次搭建oracle dataguard.学oracle很长时间,却没有完整的搭过dg,说起来让人笑.总得有第一次,而且第一次总是很痛苦的. 数据库版本: Oracle Database 11g E ...

  6. Oracle DataGuard数据备份方案详解

    Oracle DataGuard是一种数据库级别的HA方案,最主要功能是冗灾.数据保护.故障恢复等. 在生产数据库的"事务一致性"时,使用生产库的物理全备份(或物理COPY)创建备 ...

  7. Oracle DataGuard 升级 [11.2.0.1 -> 11.2.0.4]

    Oracle DataGuard 升级 [11.2.0.1 -> 11.2.0.4] Primary: 11.2.0.1 单机,Site A. Standby: 11.2.0.1 单机,Site ...

  8. 9. Oracle DataGuard的介绍

    一. Oracle DataGuard简介 Oracle DataGuard:简称DG.是由一个Primary Database(主库)和一个或者多个Standby Database(备库)组成.对O ...

  9. oracle DataGuard 主从 踩过坑的

    一.主机描述 dbprimary: 192.168.1.57 主机名称db1    dbstandby: 192.168.1.58 主机名成db2    SID: orcl 二.配置tns,配置好的文 ...

随机推荐

  1. MySQL安装时MySQL server一直安装失败日志显示This application requires Visual Studio 2013 Redistributable

    使用MySQL社区版的msi包进行安装,试了好多次,别的组件都能正常安装,只有MySQL server的安装状态显示为fail.删除所有安装的程序,包括所依赖的各种Microsoft发布的包,删除所有 ...

  2. ORM以及Django使用ORM创建表

    day61 2018-04-28 1. 内容回顾 1. HTTP协议消息的格式: 1. 请求(request) 请求方法 路径 HTTP/1.1\r\n k1:v1\r\n ...\r\n \r\n ...

  3. html常用meat头

    <!-- 字体编码 --> <meta charset="utf-8" /> <!-- 关键字 --> <meta name=" ...

  4. Go-For Range 性能研究

    文章转载地址:https://www.flysnow.org/2018/10/20/golang-for-range-slice-map.html 如果我们要遍历某个数组,Map 集合.Slice 切 ...

  5. 使用VSCode调试Jest

    0. 环境 Node版本:8.12.0 操作系统:windows10 1. 配置launch.json { "version": "0.2.0", " ...

  6. Thinkphp5背景图片的引入~ 以及图片的引入

    将图片信息从数据库查询 再渲染于前台页面

  7. C++ 获取Unix时间戳

    什么是Unix时间戳? Unix时间戳(Unix timestamp),或称Unix时间(Unix time).POSIX时间(POSIX time),是一种时间表示方式,定义为从格林威治时间1970 ...

  8. (一)为什么要UML

    1 建模的意义 模型是对于现实的简化,建模是为了更好的理解系统 模型帮助我们按照实际情况或需求对系统可视化 模型允许我们详细说明系统的构造,行为 模型给出一个构造系统的模板 模型对我们做出的决策进行文 ...

  9. Java问题解决:"错误:编码GBK 的不可映射字符"

    参考资料:http://blog.csdn.net/l1028386804/article/details/46583279 场景: 在使用javac编译java文件时出现以下错误: 解决方法: 使用 ...

  10. day_其他操作符的重载

    #include <iostream> #include <stdlib.h> using namespace std; class A{ public: A(void) { ...