You can make a backup of the Oracle ASM password file, and if the Oracle ASM password file is lost or the disk group becomes inaccessible, then you can restore the backup password file.
This section describes the steps to back up the Oracle ASM password file to a disk group and the steps to restore the Oracle ASM password file.
The source and target disk groups must have the disk group attribute COMPATIBLE.ASM
set to 12.1
or higher.
-
Locate the password file using the ASMCMD pwget
command.
For example:
ASMCMD [+] > pwget --asm
+DATA/orapwasm
-
Back up the password file to another disk group with the pwcopy
command.
For example:
ASMCMD [+] > pwcopy +DATA/orapwasm +FRA/my_pwfile_backup
Using pwcopy
without the --asm
or --dbuniquename
option does not change the current location of the password file. If necessary after the copy is made, you can set the current password file location with the pwset
command.
-
Verify which password file is in the current location after making a backup with the pwcopy
command.
For example:
ASMCMD [+] > pwget --asm
+DATA/orapwasm
-
Verify the backup password file was created.
For example:
ASMCMD [+] > ls +fra/my_pwfile_backup
my_pwfile_backup
-
To restore the Oracle ASM password file, you can use pwset
or pwcopy
.
To restore the Oracle ASM password file from the backup and use the existing location, use the pwset
command with the --asm
option.
For example:
ASMCMD [+] > pwset --asm +FRA/my_pwfile_backup
To restore the Oracle ASM password file from the backup to another disk group, use the pwcopy
command with the --asm
option.
For example:
ASMCMD [+] > pwcopy --asm +FRA/my_pwfile_backup +DATA2/my_orapwasm
The --asm
option with the pwset
and pwcopy
command sets the password location for the Oracle ASM instance.
-
Verify the location of the current password file with the pwget
command if you have changed the location.
For example:
ASMCMD [+] > pwget --asm
+DATA2/my_orapwasm