1. 程式人生 > 其它 >19c上ADG主庫sys密碼修改會影響備庫同步嗎?

19c上ADG主庫sys密碼修改會影響備庫同步嗎?

一套Oracle 19c的ADG叢集要修改sys密碼,由於之前遇見過11g上sys密碼修改導致同步問題的情況,所以改之前特意查了下文件,發現其實12cR2開始,在主庫修改密碼就會自動同步到備庫了,以下是一段官方文字描述,可以參考。

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.

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.

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.

以下是驗證過程。

主庫密碼檔案:修改前
-rw-r----- 1 oracle oinstall     2048 Oct 11 18:21 orapwtsqldb
修改主庫sys密碼:
alter user sys identified by "EWRweRW#12#%";
主庫密碼檔案:修改後
-rw-r----- 1 oracle oinstall     2048 Nov  2 10:16 orapwtsqldb

此時備庫也跟著同步了密碼檔案:
-rw-r----- 1 oracle oinstall     2048 Oct 14 10:41 orapwtsqldb
修改後密碼檔案:
-rw-r----- 1 oracle oinstall     2048 Nov  2 10:16 orapwtsqldb

可見oracle還是用心的 :}