Copy Password File From Primary ASM to Standby ASM in Oracle 19c

Copying the password file from a primary database to a standby database is required for Data Guard synchronization. When the password file is stored inside ASM, the process involves a few extra steps. This guide explains how to do it in a straightforward way.


Get the Password File From Primary Database

First, check the password file location in ASM:

srvctl config database -d <PRIMARY_DB> | grep Password

Then, as the grid user, copy the password file out of ASM to a filesystem location (e.g., /tmp):

su - grid
. oraenv   # set ORACLE_SID = +ASM1
asmcmd
 ASMCMD> pwcopy +DATA/PRIMARYDB/PASSWORD/pwdPRIMARY.256.867607273 
/tmp/orapwPRIMARY 
ASMCMD> exit

 Copy the Password File to Standby Node

Use scp to transfer the file from primary to standby:

scp /tmp/orapwPRIMARY oracle@standby1:/tmp/orapwSTANDBY

Copy the Password File Into ASM on Standby

On the standby node, as the grid user, copy the file into ASM:

su - grid
. oraenv   # set ORACLE_SID = +ASM1
asmcmd
 ASMCMD> pwcopy /tmp/orapwSTANDBY +DATA/STANDBYDB/orapwSTANDBY 
ASMCMD> ls -l +DATA/STANDBYDB/orapwSTANDBY

This ensures the password file is placed under the correct diskgroup and sub-directory for the standby DB unique name.

Update Clusterware With the Password File

Finally, update the clusterware resource to point to the new password file:

su - oracle
. oraenv   # set ORACLE_SID = STANDBY1

srvctl modify database -d STANDBYDB -pwfile +DATA/STANDBYDB/orapwSTANDBY
srvctl config database -d STANDBYDB

You should now see the updated password file location in the configuration output.






Please do like and subscribe to my youtube channel: https://www.youtube.com/@foalabs If you like this post please follow,share and comment