ORA-01017: Invalid username/password
When attempting to connect to Oracle the following error is returned:
ORA-01017: invalid username/password; login denied
Possible Causes and Remedies:
- Normally this error indicates that either the username is not a
recognised username or that the password is incorrect.
- If this error is encountered when no username or password have been
specified (i.e. when trying to use operating system authentication)
then operating system authentication may not have been set-up correctly.
In this case:
- Consult the notes for
default username feature not supported.
- The user is not set-up to use operating system authentication.
- Check that the prefix used when defining the Oracle account
is the same as that specified by ‘
in the init-ora file. The default is ‘
- Check the value of the registry key ‘
In Oracle 7 this is located at ‘
ORACLE’, and for Oracle 8 at ‘
SOFTWARE\ ORACLE\ HOMEn’. If this parameter does not
exist in the registry the default is ‘
Oracle prior to 8.1.x, from 8.1.x onwards the deafult is ‘
If set ‘
TRUE’ then ensure that the user name defined
using Oracle security manager is of the form ‘
If the registry key is not set then it should be of the form
OPS$<Username>’. If the key ‘
does not exist and you wish to create it, it should be created
of type ‘
- Check that the initialisation parameter ‘
has been explicity set ‘
- Less likely to be a cause, but check also that the server and
client are both running the same version of Oracle.
- Some tools do not support the use of operating system authentication.
This includes the Oracle GUI tools. If a connection can be made
using operating system authentication with the command line server
svrmgr30) then it is likely to be that the
tool does not support it. Some possibilities to try (none of these
are guaranteed to work, but each has been found to work with some
- enter ‘
@<service>’ as the username.
- enter ‘
/’ as the username and do not provide
a password. Some applications (possibly depending on the version
of Oracle connecting to) may require a space before and after
- enter ‘
/@<service>’ as the username and do
not provide a password.
- If this error is encountered when a username and/or password have
been specified then the cause is likely to be one of the following:
- Check that an Oracle account has been created for the specified
- Check that the Oracle account is not ‘
If it is then Oracle is using operating system authentication for
the account. Try logging in specifying no username or password.
In this case the NT account name must be the same as the Oracle
account name (less the ‘
- If the Oracle account exists and the account is not named '
then the password must be incorrect.
- If this error is encountered whilst trying to connect to Oracle
SYSOPER (but connecting as
fine) then the account lacks the
SYSOPER privilege. To
SYSOPER privilege run Oracle security manager and
grant the system privilege
SYSOPER to the Oracle account.
- The database must not be running in parallel server mode and
the password file must not be shared.
- If the database is running in parallel server mode or the password
file is shared then only
This page represents one page of many pages of notes I made whilst working
with Oracle 7 through to 10i. I now no longer work with Oracle databases,
but hope that these notes will continue to be of benefit to others.
About the author: Brian Cryer
is a dedicated software developer and webmaster. For his day job he
develops websites and desktop applications as well as providing
IT services. He moonlights as a technical author and consultant.