Troubleshooting Authentication

Oracle provides troubleshooting steps for common authentication errors that can occur when connecting to the database.

Troubleshooting ORA-01017 When Connecting as SYSDBA

Problem

You receive ORA-01017: invalid username/password; logon denied when connecting to the database as SYSDBA.

Action

Perform the checks for the authentication method used by your connection.

Operating system authentication

  1. Verify that the operating system user is a member of the OSDBA group.

    • On Linux and UNIX systems: Run id to confirm that the OSDBA group (typically dba) is listed in the user’s groups:

      id
    • On Windows systems: Verify that the OS user is a member of ORA_DBA (all instances on the host) or ORA_<ORACLE_SID>_DBA. Before running the second command, set ORACLE_SID to the SID of the target instance.

      NET LOCALGROUP ORA_DBA
      NET LOCALGROUP ORA_%ORACLE_SID%_DBA
  2. Verify SQLNET.AUTHENTICATION_SERVICES in the active sqlnet.ora file.

    For local OS authentication on Linux and UNIX, verify that the setting permits BEQ. On Windows, verify that it permits NTS. The default setting, ALL, permits both methods on their respective platforms.

Password file authentication

From an existing administrative session, perform the following checks.

  1. Verify the REMOTE_LOGIN_PASSWORDFILE initialization parameter.

    In SQL*Plus, run:

    SHOW PARAMETER remote_login_passwordfile

    Password file authentication requires this parameter to be set to EXCLUSIVE or SHARED. If it is set to NONE, update it in the SPFILE or PFILE to EXCLUSIVE (or SHARED if sharing a password file across databases) and restart the database instance for this static parameter change to take effect.

  2. Verify that the password file exists in the expected location and is accessible.

    • Query V$PASSWORDFILE_INFO to check the exact location of the password file and whether it is stored in Oracle ASM:

      SELECT FILE_NAME, IS_ASM FROM V$PASSWORDFILE_INFO;
    • By default, filesystem password files are named orapw<ORACLE_SID> in $ORACLE_BASE/dbs (Linux and UNIX) or PWD<ORACLE_SID>.ora in %ORACLE_BASE%\database (Windows), falling back to $ORACLE_HOME/dbs or %ORACLE_HOME%\database if not found in ORACLE_BASE.
    • On Linux and UNIX systems, verify the password file’s ownership and permissions. Confirm that the Oracle software installation owner can read and write the file and that unauthorized users cannot access it.
    • If the password file is missing or corrupted, restore a known-good backup if one is available. If you must re-create the file using the orapwd utility, you may need to restore administrative grants for other users afterward.
  3. Verify that the connecting user is listed in the password file with the SYSDBA privilege.

    SELECT USERNAME, SYSDBA FROM V$PWFILE_USERS;

    Locate the user account whose connection failed and confirm that SYSDBA is TRUE.