[Oracle][DATAGUARD]关于REDO_TRANSPORT_USER参数
大家可能已经知道,在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参数的更多相关文章
- Oracle Dataguard之switchover
Oracle Dataguard的角色转换包含两类:Switchover和Failover.Switchover指主备之间角色转换,主库降为备库,备库升级为主库.而failover则是指主库出现问题时 ...
- Oracle Dataguard之Real-Time Apply
Oracle Dataguard一共支持三种模式:最大可用模式(Maximum Availability),最大性能模式(Maximum Performance),最大保护模式(Maximum Pro ...
- Oracle Dataguard之物理standby的基本配置
尽管网上有很多Oracle Dataguard的配置教程,但不难发现,很多采用的是rman duplicate这种方法,尽管此种方法较为简便.但在某种程度上,却也误导了初学者,虽说也能配置成功,但只知 ...
- Oracle DataGuard 物理Standby 搭建(上)
物理standby database 环境搭建 Arch asysnc Oracle Dataguard host IP Oracle_sid DB_unique_name FAL_server FA ...
- Oracle DataGuard搭建(一)
第一次搭建oracle dataguard.学oracle很长时间,却没有完整的搭过dg,说起来让人笑.总得有第一次,而且第一次总是很痛苦的. 数据库版本: Oracle Database 11g E ...
- Oracle DataGuard数据备份方案详解
Oracle DataGuard是一种数据库级别的HA方案,最主要功能是冗灾.数据保护.故障恢复等. 在生产数据库的"事务一致性"时,使用生产库的物理全备份(或物理COPY)创建备 ...
- 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 ...
- 9. Oracle DataGuard的介绍
一. Oracle DataGuard简介 Oracle DataGuard:简称DG.是由一个Primary Database(主库)和一个或者多个Standby Database(备库)组成.对O ...
- oracle DataGuard 主从 踩过坑的
一.主机描述 dbprimary: 192.168.1.57 主机名称db1 dbstandby: 192.168.1.58 主机名成db2 SID: orcl 二.配置tns,配置好的文 ...
随机推荐
- SAP如何修改表的数据
修改表: 事务代码:se16n 输入表名字 输入 /h 进入维护模式 修改 GD-EDIT 和 GD-SAPEDIT 内容为大写X. se ...
- 关于bootstrap框架美化的实例教程(python)
经过上一章的内容,其实就页面层来说已结可以很轻松的实现功能了,但是很明显美观上还有很大的欠缺,现在有一些很好的前端css框架,如AmazeUI,腾讯的WeUI等等,这里推荐一个和flask集成很好的b ...
- JS getBoundingClientRect()
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- XP下 无法定位程序输入点WSAPoll于动态链接库ws2_32.dll 的解决办法
最近在给手机启用黑阈服务的时候出现了无法定位程序输入点WSAPoll于动态链接库ws2_32.dll这个错误,上网查了一下是因为SDK Platform Tools版本过高不能兼容windows xp ...
- CPU高的排查
之前有朋友反馈说发的内容希望有个梯度,逐步加深,前面发了几篇关于jvm源码分析的文章,可能我觉得我已经把内容写得浅显易懂了,但是对于某些没怎么接触的同学来说还是比较难理解,这个我以后慢慢改进吧,今天发 ...
- JDBC中execute、executeQuery和executeUpdate的区别
Statement 接口提供了三种执行 SQL 语句的方法:executeQuery.executeUpdate 和 execute.使用哪一个方法由 SQL 语句所产生的内容决定. 1>方法e ...
- 持续集成CI/CD
Gitlab+kubernetes+docker+jenkins+harbor搭建持续交付系统 http://blog.chenmiao.cf/2016/12/28/gitlab+kubernetes ...
- LeetCode--027--移除元素(java)
给定一个数组 nums 和一个值 val,你需要原地移除所有数值等于 val 的元素,返回移除后数组的新长度. 不要使用额外的数组空间,你必须在原地修改输入数组并在使用 O(1) 额外空间的条件下完成 ...
- pycharm运行Django项目,提示UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6
确认pycharm编码都是utf-8的情况下,需要修改项目中settings.py 'DIRS': [ ],默认是空,将路径加入即可解决. TEMPLATES = [ { 'BACKEND': 'dj ...
- vue eventBus使用
类似于iframe之间的possMessage方式传参 1.eventBus.js文件 //用于兄弟组件通信 import Vue from 'vue'; export default new Vue ...