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
-
Verify that the operating system user is a member of the OSDBA group.
-
On Linux and UNIX systems: Run
idto confirm that the OSDBA group (typicallydba) 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) orORA_<ORACLE_SID>_DBA. Before running the second command, setORACLE_SIDto the SID of the target instance.NET LOCALGROUP ORA_DBA NET LOCALGROUP ORA_%ORACLE_SID%_DBA
-
-
Verify
SQLNET.AUTHENTICATION_SERVICESin the activesqlnet.orafile.For local OS authentication on Linux and UNIX, verify that the setting permits
BEQ. On Windows, verify that it permitsNTS. The default setting,ALL, permits both methods on their respective platforms.
Password file authentication
From an existing administrative session, perform the following checks.
-
Verify the
REMOTE_LOGIN_PASSWORDFILEinitialization parameter.In SQL*Plus, run:
SHOW PARAMETER remote_login_passwordfilePassword file authentication requires this parameter to be set to
EXCLUSIVEorSHARED. If it is set toNONE, update it in the SPFILE or PFILE toEXCLUSIVE(orSHAREDif sharing a password file across databases) and restart the database instance for this static parameter change to take effect. -
Verify that the password file exists in the expected location and is accessible.
-
Query
V$PASSWORDFILE_INFOto 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) orPWD<ORACLE_SID>.orain%ORACLE_BASE%\database(Windows), falling back to$ORACLE_HOME/dbsor%ORACLE_HOME%\databaseif not found inORACLE_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
orapwdutility, you may need to restore administrative grants for other users afterward.
-
-
Verify that the connecting user is listed in the password file with the
SYSDBAprivilege.SELECT USERNAME, SYSDBA FROM V$PWFILE_USERS;Locate the user account whose connection failed and confirm that
SYSDBAisTRUE.