暂无图片
暂无图片
3
暂无图片
暂无图片
暂无图片

Oracle 12.2的新特性Refresh the Password File

DBA闲思杂想录 2021-10-14
952

  在Oracle 12.2 以前的版本,Oracle Data Guard如果要修改主库的sys用户口令时,不能只使用alter user 命令,同时还要手工将primary端的密码文件拷贝至standby端。否则,log传输时会报下面错误:

ORA-16191 Primary log shipping client not logged on standby

Oracle 12.2 中引入了一个有用的增强功能是密码文件在Data Guard环境中自动同步,官方文档中称其为Refresh the Password File,如果在主库(primary database)上更改了sys的密码,并且它自动也在备库(standby database)上进行了更改。

而在早期版本中必须手动完成的,通常通过使用主库(primary database) 密码文件替换备库(standby database)上的密码文件。当我们在主库(primary database)更改 sys,sysdg等用户口令后,它会自动传递到所有的standby端database的配置信息里,自动同步到所有standby端的所有密码文件中。

今天测试体验了下这个新特性,感觉这个小小新特性确实非常爽,在官方文档上也仔细看了这个特性的介绍,收集整理如下所示:

As of Oracle Database 12c Release 2 (12.2.0.1), passwordfile changes done on the primary database areautomatically propagated to standby databases. The onlyexception to this is far sync instances. Updated passwordfiles must still be manually copied to far sync instancesbecause far sync instances receive redo, but do not applyit. After the password file is up-to-date at the far syncinstance, the redo containing the password update at theprimary is automatically propagated to any standbydatabases that are set up to receive redo from that far syncinstance. The password file is updated on the standby whenthe redo is applied.
复制

10.3.7 Refresh the Password File

If the REMOTE_LOGIN_PASSWORDFILE database initialization parameter is set to SHARED orEXCLUSIVE, then the password file on a physical standby database is automaticallyreplaced with a fresh copy from the primary database.The file is replaced after administrative privileges are granted or revoked, or thepassword of a user with administrative privileges is changed. The only exception tothis is far sync instances. Updated password files must still be manually copied to farsync instances because far sync instances receive redo, but do not apply it. When apassword file is manually updated at a far sync instance, the redo containing the samepassword changes from the primary database is automatically propagated to anystandby databases that are set up to receive redo from that far sync instance. Thepassword file is updated on the standby when the redo is applied. In an Oracle Data Guard configuration, all physical and snapshot standbydatabases must use a copy of the password file from the primary database. As ofOracle Database 12c Release 2 (12.2.0.1) , password file changes done on theprimary database are automatically propagated to standby databases. (Passwordfile changes include when an administrative privilege (SYSDG, SYSOPER, SYSDBA, andso on) is granted or revoked, and when the password of any user withadministrative privileges is changed.)Far sync instances are an exception to the automatic updating feature. Updatedpassword files must still be manually copied to far sync instances because farsync instances receive redo, but do not apply it. When a password file is manuallyupdated at a far sync instance, the redo containing the same password changesfrom the primary database is automatically propagated to any standby databasesthat are set up to receive redo from that far sync instance. The password file isupdated on the standby when the redo is applied

复制


文章转载自DBA闲思杂想录,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论