Fixing the ORA 01017 and RMAN 04006 Errors in Data Guard Configuration

YouTube video

Introduction

In this article, we will discuss how to fix the “ORA-01017: invalid username/password; logon denied” and “RMAN-04006: error from auxiliary database” errors that occur during the confirmation of a data guard in Oracle Database. These errors often occur while duplicating the data guard and using RMAN to connect both the primary and standby databases.

Step 1: Identifying the Error

When attempting to connect the primary and standby databases using RMAN, you may encounter the “ORA-01017: invalid username/password; logon denied” error. This error indicates that the username or password provided is incorrect for the desired connection.

To troubleshoot this issue, check the status of the instances for both the primary and standby databases. If the primary database is up and running while the standby database is not mounted, you may face the same error.

Step 2: Creating orapw Files

To resolve this issue, you need to ensure that the orapw files, which store the password for the instances, are created and copied correctly.

  1. Open the command prompt and navigate to the Oracle Home dbs directory.

  2. Check if the orapw file exists. If it doesn’t, create the file using the following command:
    orapwd file=<path_to_orapw_file> password=<password> force=y
    It is recommended to copy the orapw file from the primary database to the standby database.

  3. Copy the orapw file from the primary database to the standby database using the following command:
    copy <primary_orapw_file_path> <standby_orapw_file_path>

  4. Verify that both the primary and standby orapw files have the same password.

Step 3: Connecting the Instances

After creating and copying the orapw files with the same password, attempt to connect both the primary and standby instances again.

  1. Start the primary and standby instances.

  2. Connect to the primary instance using the following command:
    rman target sys/<password>@<primary_tns_alias>

  3. Connect to the auxiliary instance using the following command:
    rman target sys/<password>@<standby_tns_alias> auxiliary /

  4. Verify that both the primary and standby instances are up and running.

Additional Considerations

  • In live server environments, the primary and standby databases are typically hosted on separate servers.

  • The orapw files should be named with a prefix of “orapw” or “orapw” for the password of the instance SID.

  • It is recommended to copy the orapw file from the primary database to the standby database, rather than creating a new file.

  • This solution is specifically for confirming the data guard or standby support standby server.

Conclusion

By following the steps outlined in this article, you should be able to resolve the “ORA-01017: invalid username/password; logon denied” and “RMAN-04006: error from auxiliary database” errors that occur during the confirmation of a data guard in Oracle Database. By ensuring that the orapw files have the same password for both the primary and standby instances, you can successfully connect and resolve the issue. Remember to adapt these steps to your specific environment, such as different server configurations, to achieve a stable data guard configuration.