In this article we are showing how to backup and restore password file of Oracle ASM with pwget command.

pwget

Purpose

Returns the location of the password file for the Oracle ASM or database instance.

pwcopy

Purpose

Copies an Oracle ASM or database instance password file to the specified location.

pwset

Purpose

Sets the location of the password file for an Oracle ASM or database instance.

1. Locate the password file using the ASMCMD pwget command.

For example:

2. Back up the password file to another disk group with the pwcopy command.
For example:

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.

3. Verify which password file is in the current location after making a backup with the pwcopy command.
For example:

4. Verify the backup password file was created.
For example:

5. 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:

To restore the Oracle ASM password file from the backup to another disk group, use the pwcopy command with the —asm option.

For example:

The —asm option with the pwset and pwcopy command sets the password location for the Oracle ASM instance.

6. Verify the location of the current password file with the pwget command if you have changed the location.
For example:

Leave a Reply