在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进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
【专家有话说第五期】在不同年龄段,DBA应该怎样规划自己的职业发展?
墨天轮编辑部
1327次阅读
2025-03-13 11:40:53
Oracle RAC ASM 磁盘组满了,无法扩容怎么在线处理?
Lucifer三思而后行
803次阅读
2025-03-17 11:33:53
Oracle+Deepseek+Dify 实现数据库数据实时分析
bicewow
729次阅读
2025-03-06 09:41:49
2月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
469次阅读
2025-03-13 14:38:19
Oracle 如何修改 db_unique_name?强迫症福音!
Lucifer三思而后行
366次阅读
2025-03-12 21:27:56
Oracle DataGuard高可用性解决方案详解
孙莹
318次阅读
2025-03-26 23:27:33
Oracle分区和执行计划相关的几个问题
听见风的声音
311次阅读
2025-03-07 08:51:42
数据库管理-第299期 数据库是否需要定期重启(20250306)
胖头鱼的鱼缸
254次阅读
2025-03-06 09:09:35
切换Oracle归档路径后,不能正常删除原归档路径上的归档文件
dbaking
252次阅读
2025-03-19 14:41:51
风口浪尖!诚通证券扩容采购Oracle 793万...
Roger的数据库专栏
247次阅读
2025-03-24 09:42:53