12.2 中的Data Guard Standby 密码文件自动同步 (Doc ID 2307365.1)
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)的更多相关文章
- 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 ...
- 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 ...
- 12.2新特性 使用DBCA duplicate创建物理备用数据库 (Doc ID 2283697.1)
Creating a Physical Standby database using DBCA duplicate (Doc ID 2283697.1) APPLIES TO: Oracle Data ...
- 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. ...
- mysql中的data下的数据文件(.FRM、.MYD、.MYI)恢复为数据
记一次mysql中的data文件操作经历 想拿到一个项目的最新的数据,做功能升级使用,备份一份数据同时也作为本地测试数据,文件有些大,我直接通过远程的phpmyadmin程序导出,不能愉快的玩耍,直接 ...
- linux系统中rsync+inotify实现服务器之间文件实时同步
最近需要对服务器上的文件实施动态备份,我又不想每次都手动来进行备份,在网上找了挺多资料,发现使用rsync就可以实现,如果想要实现实时同步,还可以使用rsync+inotify组合,本文就是以组合方式 ...
- data guard折腾记一
终于有空闲的机器腾出来了,生产环境上的一套Oracle环境终于可以鸟枪换炮了,生产环境有Data Guard,为了减少停机时间,而且避免重新构建Data Guard的麻烦(其实也不麻烦,就是浪费时间) ...
- [terry笔记]data guard基础知识
如下介绍了data guard的基础知识,整理自网络: Data Gurad 通过冗余数据来提供数据保护,Data Gurad 通过日志同步机制保证冗余数据和主数据之前的同步,这种同步可以是实时,延时 ...
- Oracle 19c Data Guard DML Redirection ADG备库上执行DML重定向(未来更好的进行读写分离)
资料来自官方网站: https://docs.oracle.com/en/database/oracle/oracle-database/19/sbydb/managing-oracle-data-g ...
随机推荐
- ARTS-S shell脚本实现循环
#!/bin/bash i=0 while [ "$i" != "100" ] && [ "$RESP" != " ...
- 经典常用SQL语句大全
创建表 --删除表 --DROP TABLE [dbo].[Test] --创建表 CREATE TABLE [dbo].[Test] ( ,) PRIMARY KEY, ----自增主键 ) NUL ...
- docker入门-安装篇
一.docker介绍 1:docker官网 www.docker.com 2:github https://github.com/docker/docker.github.io 3:开源的容器引擎, ...
- 【Java Web开发学习】Spring MVC 拦截器HandlerInterceptor
[Java Web开发学习]Spring MVC 拦截器HandlerInterceptor 转载:https://www.cnblogs.com/yangchongxing/p/9324119.ht ...
- CSS动态表达式
样式:style:expression(脚本) 如: 1 _top: expression(this.offsetHeight); _top: expression(eval(document.doc ...
- 3步轻松搞定Spring Boot缓存
作者:谭朝红 前言 本次内容主要介绍基于Ehcache 3.0来快速实现Spring Boot应用程序的数据缓存功能.在Spring Boot应用程序中,我们可以通过Spring Caching来快速 ...
- android之 xml文件一般用到的属性
android:layout_above 将该控件的底部至于给定ID的控件之上android:layout_below 将该控件的顶部至于给定ID的控件之下android:layout_toLeftO ...
- django----聚合查询 分组 F与Q查询 字段 及其 参数
目录 一.orm补充查询 聚合查询 1-1 分组查询 1-2 F与Q查询 1-3 二. 字段及其参数 常用字段 AutoField IntegerField CharField DateField D ...
- springboot-eureka交流机制
一 前言 这篇文章参考了官方文档,主要是描述了eureka client 和 eureka server 之间的交流机制: peer to peer 的 对等复制交流机制: eureka 官方文档 二 ...
- UWP GraphQL数据查询的实现
1. 缘起 Facebook 的移动应用从 2012 年就开始使用 GraphQL.GraphQL 规范于 2015 年开源,现已经在多种环境下可用,并被各种体量的团队所使用. 在这个链接可以看到更多 ...