Data Guard Standby Automatic Password file Synchronization in 12.2 (Doc ID 2307365.1)

APPLIES TO:

Oracle Database - Enterprise Edition - Version 12.2.0.1 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.

GOAL

Automatic Password file synchronization in 12.2 Dataguard Standby database  12.2 Dataguard Standby数据库中的密码文件自动同步

SOLUTION

When password file is used for Redo Transport Authentication, the password of redo transport user should be same across primary and all its physical and snapshot standby databases. By default SYS user is used to authenticate redo transport sessions when password file is used.

当密码文件用于Redo传输身份验证时,Redo传输用户的密码在主数据库及其所有物理和快照备用数据库之间应该相同。默认情况下,使用密码文件时,SYS用户用于验证Redo传输会话

Till 12cR1 Dataguard setup, if there is a change in password file of Primary database like Changes in password or Changes in admin privileges, then the password file needs to be copied from Primary database to standby database server and rename it according to standby database Instance name. If the password file of Primary and Standby databases are not same, then errors will be seen.

直到12cR1 Dataguard 设置,如果主数据库的密码文件发生了更改(如“密码更改”或“管理员权限”更改),则需要将密码文件从主数据库复制到备用数据库服务器,并根据备用数据库实例名称重命名。如果主数据库和备用数据库的密码文件不同,则会看到错误

In 12cR2, the password file of standby database gets synchronized automatically when there is a change in Primary database password file. The password file change of Primary will be included in Redo and when the Redo is applied to standby, the synchronization happens in the background.

在12cR2中,当主数据库密码文件发生更改时,备用数据库的密码文件将自动同步。主库密码文件更改将包含在Redo中,并且当Redo应用于备用时,同步将在后台进行

Exception: Far-sync Instances (where the redo will not be applied). We need to manually copy the password file. Once the password file is sync at Far-Sync instance, the redo having password file information will get transmitted to standby which are suppose to receive from Far-sync instance.

例外:Far-sync实例(将不应用redo)。我们需要手动复制密码文件。一旦在Far-Sync实例上同步了密码文件,则具有密码文件信息的redo将被传输到备用数据库,该数据库应从Far-sync实例接收。

Example:

PRIMARY>select username, sysdba, sysoper, sysasm,sysbackup,authentication_type AT from v$pwfile_users;

USERNAME             SYSDB SYSOP SYSAS SYSBA AT
-------------------- ----- ----- ----- ----- --------
SYS TRUE TRUE FALSE FALSE PASSWORD
SYSDG FALSE FALSE FALSE FALSE PASSWORD
SYSBACKUP FALSE FALSE FALSE TRUE PASSWORD
SYSKM FALSE FALSE FALSE FALSE PASSWORD STANDBY>select username, sysdba, sysoper, sysasm,sysbackup,authentication_type AT from v$pwfile_users; USERNAME SYSDB SYSOP SYSAS SYSBA AT
---------- ----- ----- ----- ----- --------
SYS TRUE TRUE FALSE FALSE PASSWORD
SYSDG FALSE FALSE FALSE FALSE PASSWORD
SYSBACKUP FALSE FALSE FALSE TRUE PASSWORD
SYSKM FALSE FALSE FALSE FALSE PASSWORD

Let's grant a role to a user at Primary database which will make changes in Password file  让我们向Primary数据库中的用户授予一个角色,该角色将在Password文件中进行更改

PRIMARY>Grant SYSOPER to user1;

Grant succeeded.

PRIMARY>select username, sysdba, sysoper, sysasm,sysbackup,authentication_type AT from v$pwfile_users;

USERNAME             SYSDB SYSOP SYSAS SYSBA AT
-------------------- ----- ----- ----- ----- --------
SYS TRUE TRUE FALSE FALSE PASSWORD
SYSDG FALSE FALSE FALSE FALSE PASSWORD
SYSBACKUP FALSE FALSE FALSE TRUE PASSWORD
SYSKM FALSE FALSE FALSE FALSE PASSWORD
USER1 FALSE TRUE FALSE FALSE PASSWORD Password file of Primary database: -rw-r-----. 1 oracle oinstall 4096 /u01/app/oracle/product/12.2.0/dbhome_1/dbs/orapwprimdb

Switch the logfile, so that the Redo reach its standby databases  切换日志文件,以便Redo到达其备用数据库

PRIMARY>alter system switch logfile;

System altered.

At standby Media recovery is not active. Verify v$pwfile_users for the granted role   在待机状态下,介质恢复未激活。验证v$pwfile_users是否已授予角色

STANDBY>select username, sysdba, sysoper, sysasm,sysbackup,authentication_type AT from v$pwfile_users;

USERNAME   SYSDB SYSOP SYSAS SYSBA AT
---------- ----- ----- ----- ----- --------
SYS TRUE TRUE FALSE FALSE PASSWORD
SYSDG FALSE FALSE FALSE FALSE PASSWORD
SYSBACKUP FALSE FALSE FALSE TRUE PASSWORD
SYSKM FALSE FALSE FALSE FALSE PASSWORD Password file of Standby database: -rw-r-----. 1 oracle oinstall 3584 /u01/app/oracle/product/12.2.0/dbhome_2/dbs/orapwstdbydb

Newly granted role is not reflected in Standby, lets start Media recovery and then query v$pwfile_users.  新授予的角色未反映在Standby中,请启动媒体恢复,然后查询v$pwfile_users。

STANDBY>recover managed standby database disconnect;
Media recovery complete. STANDBY>select username, sysdba, sysoper, sysasm,sysbackup,authentication_type AT from v$pwfile_users; USERNAME SYSDB SYSOP SYSAS SYSBA AT
---------- ----- ----- ----- ----- --------
SYS TRUE TRUE FALSE FALSE PASSWORD
SYSDG FALSE FALSE FALSE FALSE PASSWORD
SYSBACKUP FALSE FALSE FALSE TRUE PASSWORD
SYSKM FALSE FALSE FALSE FALSE PASSWORD
USER1 FALSE TRUE FALSE FALSE PASSWORD Password file of standby database: -rw-r-----. 1 oracle oinstall 4096 /u01/app/oracle/product/12.2.0/dbhome_2/dbs/orapwstdbydb

We could see after media recovery v$pwfile_users has been updated  我们可以看到媒体恢复后v$pwfile_users已更新

12.2 中的Data Guard Standby 密码文件自动同步 (Doc ID 2307365.1)的更多相关文章

  1. 12c Data guard Switchover Best Practices using SQLPLUS (Doc ID 1578787.1)

    12c Data guard Switchover Best Practices using SQLPLUS (Doc ID 1578787.1) APPLIES TO: Oracle Databas ...

  2. Data Guard Physical Standby - RAC Primary to RAC Standby 使用第二个网络 (Doc ID 1349977.1)

    Data Guard Physical Standby - RAC Primary to RAC Standby using a second network (Doc ID 1349977.1) A ...

  3. 12.2新特性 使用DBCA duplicate创建物理备用数据库 (Doc ID 2283697.1)

    Creating a Physical Standby database using DBCA duplicate (Doc ID 2283697.1) APPLIES TO: Oracle Data ...

  4. How to remove a Data Guard Configuration from Primary Database (文档 ID 733794.1)

    APPLIES TO: Oracle Database - Enterprise Edition - Version 10.1.0.2 to 11.2.0.3 [Release 10.1 to 11. ...

  5. mysql中的data下的数据文件(.FRM、.MYD、.MYI)恢复为数据

    记一次mysql中的data文件操作经历 想拿到一个项目的最新的数据,做功能升级使用,备份一份数据同时也作为本地测试数据,文件有些大,我直接通过远程的phpmyadmin程序导出,不能愉快的玩耍,直接 ...

  6. linux系统中rsync+inotify实现服务器之间文件实时同步

    最近需要对服务器上的文件实施动态备份,我又不想每次都手动来进行备份,在网上找了挺多资料,发现使用rsync就可以实现,如果想要实现实时同步,还可以使用rsync+inotify组合,本文就是以组合方式 ...

  7. data guard折腾记一

    终于有空闲的机器腾出来了,生产环境上的一套Oracle环境终于可以鸟枪换炮了,生产环境有Data Guard,为了减少停机时间,而且避免重新构建Data Guard的麻烦(其实也不麻烦,就是浪费时间) ...

  8. [terry笔记]data guard基础知识

    如下介绍了data guard的基础知识,整理自网络: Data Gurad 通过冗余数据来提供数据保护,Data Gurad 通过日志同步机制保证冗余数据和主数据之前的同步,这种同步可以是实时,延时 ...

  9. Oracle 19c Data Guard DML Redirection ADG备库上执行DML重定向(未来更好的进行读写分离)

    资料来自官方网站: https://docs.oracle.com/en/database/oracle/oracle-database/19/sbydb/managing-oracle-data-g ...

随机推荐

  1. ACM小组的古怪象棋

    Description ACM小组的Samsara和Staginner对中国象棋特别感兴趣,尤其对马(可能是因为这个棋子的走法比较多吧)的使用进行深入研究.今天他们又在 构思一个古怪的棋局:假如Sam ...

  2. socket AcceptAsync方法的使用

    AcceptAsync与Accept很大的不一样 Accept是一个同步 阻塞的已经封装好底层的方法 AcceptAsync是一个异步 非阻塞未封装的底层连接入口,需要手动填入连接代码用于优化sock ...

  3. CMFCPropertyGridCtrl的属性改变事件代码

    //用于区分Prop, 使用SetData, GetData方法 CMFCPropertyGridProperty* pProp1 = new CMFCPropertyGridProperty(str ...

  4. 大数据学习笔记——Java篇之集合框架(ArrayList)

    Java集合框架学习笔记 1. Java集合框架中各接口或子类的继承以及实现关系图: 2. 数组和集合类的区别整理: 数组: 1. 长度是固定的 2. 既可以存放基本数据类型又可以存放引用数据类型 3 ...

  5. leetcode-164、最大间距

    export default (arr) => { // 如果数组长度小于2返回0 if (arr.length < 2) { return 0 } // 排序 arr.sort() // ...

  6. Java读取Properties文件 Java加载配置Properties文件

    static{ Properties prop = new Properties(); prop.load(Thread.currentThread().getContextClassLoader() ...

  7. 9月腾讯、百度、阿里高频的29道SSM框架面试题解析

    一.Spring面试题 1.Spring 在ssm中起什么作用? Spring:轻量级框架 作用:Bean工厂,用来管理Bean的生命周期和框架集成. 两大核心:1.IOC/DI(控制反转/依赖注入) ...

  8. webpack学习_webpack-dev-server自动编译代码

    之前每次修改完之后都要执行npm run build来编译,下面有三种方式可以实现代码变化后自动编译代码,下面只重点说webpack-dev-server,其他的请看webpack开发文档 1.web ...

  9. 《Java基础知识》Java方法重载和重写

    重写(Override) 重写是子类对父类的允许访问的方法的实现过程进行重新编写, 返回值和形参都不能改变.即外壳不变,核心重写! 重写的好处在于子类可以根据需要,定义特定于自己的行为. 也就是说子类 ...

  10. Java面试题_第一阶段(static、final、面向对象、多线程、集合、String、同步、接口、GC、JVM)

    1.1 简述static和final的用法? static:修饰属性,方法,代码块 (1)静态属性:也可叫类变量  类名.属性名  来访问 (共有的类变量与对象无关,只和类有关) 注意:类中的实例变量 ...