My Oracle Support Banner

ORA-01005: Connect Username AS SYSDBA Behaves Differently in 7.3.4, 8.1 and 9.2 (Doc ID 243083.1)

Last updated on FEBRUARY 23, 2023

Applies to:

Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Database Cloud Schema Service - Version N/A and later
Information in this document applies to any platform.
 


Symptoms

When logged in the OS as the oracle binary owner and CONNECT AS SYSDBA with an ordinary database username, is the password required ?

--> in 9.2 : NULL value or any value is allowed

--> in 8.X.X : NULL value results in an ORA-01005 error

--> in 7.3.4 : NULL value results in an ORA-01017 error

Different Possibilities
-----------------------
9.2.X

$ id
uid=127(ora92) gid=101(dba)

$ sqlplus /nolog

SQL*Plus: Release 9.2.0.3.0 - Production on Thu Jul 3 12:23:09 2003
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

SQL> connect <USER> as sysdba
Enter password: (enter NULL or any value)
Connected.

SQL> connect / as sysdba
Connected.


8.X.X

$ id
uid=118(ora817) gid=101(dba)

$ sqlplus /nolog

SQL*Plus: Release 8.1.7.0.0 - Production on Thu Jul 3 12:13:50 2003
(c) Copyright 2000 Oracle Corporation. All rights reserved.

SQL> connect <username> as sysdba
Enter password: (NULL value)
Enter password:
ERROR:
ORA-01005: null password given; logon denied

SQL> connect / as sysdba
Connected.


7.3.4

$ id
uid=164(ora734) gid=101(dba)

$ svrmgrl

SVRMGR> connect <username> as sysdba
Password: (NULL value)
ORA-01017: invalid username/password; logon denied

SVRMGR> connect / as sysdba
Connected.


Changes

7.3.4

SVRMGR> connect <username>/<password> as sysdba
Connected.
SVRMGR> connect <username>/<password> as sysdba
Connected.

SVRMGR> connect <username> as sysdba
Password: (Entered <password>)
Connected.
SVRMGR> connect <username> as sysdba
Password: (Entered <password>)
Connected.

SVRMGR> connect as sysdba
Username: (NULL value)
Connected.

SVRMGR> connect as sysdba
Username: /
Connected.
SVRMGR> connect as sysdba
Username: (NULL value)
Connected.

SVRMGR> connect as sysdba
Username: <username>
Password: (NULL value)
ORA-01017: invalid username/password; logon denied

8.X.X

Any database user when the OS user belongs to the dba group can connect as
sysdba as long as the user provides his user password :

SQL> connect <username>/<password> as sysdba
Connected.
SQL> connect <username>/<password> as sysdba
Connected.

SQL> connect <username> as sysdba
Enter password: (Entered password)
Connected.
SQL> connect <username>as sysdba
Enter password: (Entered <password>)
ERROR:
ORA-01017: invalid username/password; logon denied

SQL> connect as sysdba
Enter user-name: /
ERROR:
ORA-01017: invalid username/password; logon denied

SQL> connect as sysdba
Enter user-name: (NULL value)
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}] | [INTERNAL]
where ::= [/][@] | /

SQL> connect as sysdba
Enter user-name: <username>
Enter password:
Enter password:
ERROR:
ORA-01005: null password given; logon denied

Only the username's password is allowed in 8.X.X when not passing it in the
connect string.

9.2

You can enter any value for the password or null value: it connects.

All cases work , except when you do not provide any username:

SQL> connect as sysdba
Enter user-name: (NULL value)
SP2-0306: Invalid option.
Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER}]
where ::= [/][@] | /

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.