Automatic password file synchronization with Oracle Data Guard 12.2 AAA HOME ABOUT ME ARTICLES BOOKS SCRIPTS FORUMS(OTN) Uncategorized Automatic password file synchronization with Oracle Data Guard 12.2 nassyambasha@gmail.com March 23, 2017, 5 years ago 5 1 17.1K Tweet Automatic password file synchronization with Oracle Data Guard 12.2 – #orapwd Based on my experience when working with customers or checking the questions in community.oracle.com and majority of the questions are on LAG because of mismatch password file. Mismatch of password file can happen if the sys user or any sys related users password changed in primary and then every time we have to copy fresh file again on standby. But most of the cases DBA’s realize once the standby is out of sync. I can in Oracle 12.2 this is one of the best feature in Data Guard and it fixes many issues i guess. Challenges in copying the password file. No direct SCP from Oracle users.when we copy from Oracle user –> normal user –> scp –> normal user –> Oracle user. Changes in permissions Changes in groups. This blog post i have tested in November 7th 2016 but haven’t got chance to post them in my blog. We will see the demo how this feature is going to work and how reduces the overhead to DBA’s Check the password file permissions of primary database and also lets see what is the output of md5sum of password file. [oracle@ORA-C1 dbs]$ ls -ltr orapwobdb -rw-r-----. 1 oracle oinstall 3072 Nov 7 00:45 orapwobdb [oracle@ORA-C1 dbs]$ md5sum orapwobdb 3fbe96899db0e06ce8021107e337ecf7 orapwobdb [oracle@ORA-C1 dbs]$ The same like above we will check the output in standby database , we are expected to see the same output. [oracle@ORA-C2 dbs]$ ls -ltr orapwobdb -rw-r-----. 1 oracle oinstall 3072 Nov 7 01:53 orapwobdb [oracle@ORA-C2 dbs]$ md5sum orapwobdb 3fbe96899db0e06ce8021107e337ecf7 orapwobdb [oracle@ORA-C2 dbs]$ SQL> col username for a10 SQL> col profile for a12 SQL> col external_time for a20 SQL> col last_login for a20 SQL> col external_name for a20 SQL> select username,sysdba,sysoper,sysasm,sysbackup,sysdg,syskm,account_status,authentication_type,common,con_id from v$pwfile_users; USERNAME SYSDB SYSOP SYSAS SYSBA SYSDG SYSKM ACCOUNT_STATUS AUTHENTI COM CON_ID ---------- ----- ----- ----- ----- ----- ----- ------------------------------ -------- --- ---------- SYS TRUE TRUE FALSE FALSE FALSE FALSE OPEN PASSWORD YES 0 SYSDG FALSE FALSE FALSE FALSE TRUE FALSE OPEN PASSWORD NO 1 SYSBACKUP FALSE FALSE FALSE TRUE FALSE FALSE OPEN PASSWORD NO 1 SYSKM FALSE FALSE FALSE FALSE FALSE TRUE OPEN PASSWORD NO 1 SQL> If we see the output of md5sum is same on both primary and standby database. Until unless the output is same then we no need to worry. Next? In traditional Oracle versions or releases when we change the password in primary or if we grant the sysdba to any user then again we have to copy to all the available standby databases. In this example we will create new user and we grant SYSDG to the same user. SQL> create user c##nassyam identified by idgoug; User created. SQL> grant create session,sysdg to c##nassyam; Grant succeeded. SQL> SQL> select username,sysdba,sysoper,sysasm,sysbackup,sysdg,syskm,account_status,authentication_type,common,con_id from v$pwfile_users; USERNAME SYSDB SYSOP SYSAS SYSBA SYSDG SYSKM ACCOUNT_STATUS AUTHENTI COM CON_ID ---------- ----- ----- ----- ----- ----- ----- ------------------------------ -------- --- ---------- SYS TRUE TRUE FALSE FALSE FALSE FALSE OPEN PASSWORD YES 0 SYSDG FALSE FALSE FALSE FALSE TRUE FALSE OPEN PASSWORD NO 1 SYSBACKUP FALSE FALSE FALSE TRUE FALSE FALSE OPEN PASSWORD NO 1 SYSKM FALSE FALSE FALSE FALSE FALSE TRUE OPEN PASSWORD NO 1 C##NASSYAM FALSE FALSE FALSE FALSE TRUE FALSE OPEN PASSWORD NO 1 In above output we can see the new user is listed from the password file view. Hence it confirms that the changes are done on password file. Now if we see the md5sum output of primary password file and let’s see comparison with standby database. [oracle@ORA-C1 dbs]$ md5sum orapwobdb dc41f3a0622c66e8c27c9ad74cc4aa9c orapwobdb [oracle@ORA-C1 dbs]$ [oracle@ORA-C2 dbs]$ ls -ltr orapwobdb -rw-r-----. 1 oracle oinstall 3584 Nov 7 04:50 orapwobdb [oracle@ORA-C2 dbs]$ md5sum orapwobdb dc41f3a0622c66e8c27c9ad74cc4aa9c orapwobdb [oracle@ORA-C2 dbs]$ If we see the above output even though changes in the password file in primary and it is replicated to standby database without any changes such as copying or without using redo_transport_user so on. Am sure this feature is big relief for especially DBA’s. Happy Reading. Share Tweet Share Share I'm Newbie to GSM & Global Data Services, Where to start? Standby database deployment with DBCA - 12.2 Website Comments Foued March 23rd, 2017 Reply Thanks for the share. Raj April 26th, 2017 Reply Is this possible in 12.1, checking for alternate mechanism for 12.2 nassyambasha@gmail.com April 26th, 2017 Reply The same feature is not available in 12.1. But you can do similar with different approach i.e. “Redo Transport User” Azhar May 10th, 2020 Reply Bhai, Will this feature applicable for 18C and 19C? what is minimum password file format is required? nassyambasha@gmail.com May 10th, 2020 Reply Yes, Of course – This will be for all the future releases from 12.2 Thank You Post a comment CAPTCHA Code* Recent Posts bookauthority.org: Our book is, #1 in100 Best Oracle Database Books of All Time Troubleshooting Database Cloud Provisioning – Worthy TIP Which Primary Shards dependent to Which Standby Shards? – Oracle Sharding 12.2 How to start the full stack of Sharding Database Dissolving Sharding Configuration Troubleshooting Sharding Deployment Resetting the status in DGMGRL – GDS EM12c – Webtier is unable to start Riding on two horses – ODA Database Patching TFA is now optional with Oracle 12.2 RDBMS Installation Recent Comments.. nassyambasha@gmail.com on Script to Monitor Primary and Standby database(s) nassyambasha@gmail.com on Automatic password file synchronization with Oracle Data Guard 12.2 Azhar on Automatic password file synchronization with Oracle Data Guard 12.2 Balraj Singh Chahal on Script to Monitor Primary and Standby database(s) Balraj Singh Chahal on Script to Monitor Primary and Standby database(s) Blogroll Charles Hooper's Oracle Notes Christian Antognini Blog Ed Stevens Blog hemant chitale blog Jonathan Lewis Mahir M. Quluzade Michael Seberg Mohammed Houri Riyaj Shamsudeen Blog Syed Jaffar Hussain Blog Tanel Poder Blog Thomas Kyte Uwe Hesse Blog Popular Articles AIOUG – Chennai Chapter First Meet oracleUncategorized 4 bookauthority.org: Our book is, #1 in100 Best Oracle Database Books of All Time 12cAdministration 0 Troubleshooting Database Cloud Provisioning – Worthy TIP Uncategorized 0 Which Primary Shards dependent to Which Standby Shards? – Oracle Sharding 12.2 12cData Guard 0 How to start the full stack of Sharding Database 12cData Guard 2 Nassyam Basha – CKPT Nassyam Basha is a database administrator. He has about 10 years of IT experience, with the last eight years as a production Oracle DBA. He started working with dBase and FoxPr and has participated in several projects with FoxPro and Oracle Database starting from Oracle 7. He is an Oracle 11g Certified Master and was awarded the Oracle ACE Director title from Oracle. He is skilled with Oracle technologies such as Data Guard, RMAN, RAC, Cloud Control, and performance tuning. Recent Posts bookauthority.org: Our book is, #1 in100 Best Oracle Database Books of All Time October 3, 2020 Troubleshooting Database Cloud Provisioning – Worthy TIP May 6, 2018 Which Primary Shards dependent to Which Standby Shards? – Oracle Sharding 12.2 March 25, 2018 Twitter Feed Copyright ©2017 Oracle-ckpt.com. Designed by Casis