Creating a Password File in ASM Disk Group
Oracle allows storing the password file in an ASM disk group, enhancing security, high availability, and centralized management for both RAC and non-RAC environments.
This post covers two methods to create a password file in ASM:
- Using ORAPWD (Command-Line Method)
- Using ASMCMD PWCREATE (Recommended for Oracle 12c and Above)
Step 1: Verify the Current Password File
Before creating a new password file, check if one already exists.
Run the following SQL command as SYSDBA:
Expected Output:
This confirms that the password file is enabled.
To check the privileged users:
Step 2: Identify the ASM Disk Group
List the available ASM disk groups where the password file can be stored:
Example Output:
Choose a disk group (e.g., +DATA
) to store the password file.
Method 1: Create a Password File Using ORAPWD
The orapwd
utility creates a password file in an ASM disk group.
Step 2.1: Create the Password File
Run the following command as the oracle user:
file='+DATA/PWDFILE/pwdPRDPRE'
→ Specifies the ASM disk group and filename.password=YourPassword
→ Sets the SYS user password.entries=10
→ Defines the maximum number of privileged users.force=y
→ Overwrites an existing password file if one exists.
Note: No specific format version is provided to ensure compatibility with all Oracle versions.
Step 2.2: Verify Password File Creation
Check if the password file exists in ASM:
Expected Output:
Method 2: Create a Password File Using ASMCMD PWCREATE (12c and Above)
Oracle 12c and above provide the ASMCMD pwcreate
command to create password files in ASM.
Step 2.1: Access ASMCMD
Log in to ASM Command Line:
Step 2.2: Create the Password File
Run the following command:
--dbuniquename PRDPRE
→ Specifies the database unique name.+DATA/PWDFILE/pwdPRDPRE
→ Defines the ASM location for the password file.YourPassword
→ Sets the SYS password.
Step 2.3: Confirm the Password File in ASM
Expected Output:
Step 3: Update the Database to Use the ASM Password File
Once the password file is created in ASM, update the remote_login_passwordfile
parameter:
Restart the database to apply changes:
Step 4: Verify Password File and Privileges
Check if the database is using the newly created password file:
If users like SYS
appear, the password file is functioning correctly.
Grant SYSDBA/SYSOPER access to additional users if required:
Step 5: Backup and Restore the Password File
Although ASM provides redundancy, it is advisable to back up the password file periodically.
To back up the password file:
To restore it:
Post a Comment
Post a Comment