Cannot log in to Oracle as SYSDBA

Tech Knowledge
Last updated on October 23, 2025

Introduction

When executing sqlplus / as sysdba on an Oracle database on a Windows server,

ERROR:
ORA-01017: Invalid username/password; logon denied.


Enter username:

this error may appear.
If you can connect by specifying a username and password, it is highly likely that OS authentication is failing.

To use OS authentication, the logged-in account must belong to the local group ORA_DBA.

Add a Domain User to the ORA_DBA Group

1Check Users Belonging to ORA_DBA

net localgroup ORA_DBA

Example:

c:\hoge>net localgroup ORA_DBA
Alias name     ORA_DBA
Comment         Oracle DBA Group

Members

-------------------------------------------------------------------------------
Administrator
NT AUTHORITY\SYSTEM
The command completed successfully.

2Add a Domain User to ORA_DBA

Must be run as an administrator.

net localgroup ORA_DBA "DOMAIN\username" /add

Example:

c:\hoge>net localgroup ORA_DBA "hoge\Fuga" /add
The command completed successfully.

3Re-check Users Belonging to ORA_DBA

net localgroup ORA_DBA

Example:

c:\hoge>net localgroup ORA_DBA
Alias name     ORA_DBA
Comment         Oracle DBA Group

Members

-------------------------------------------------------------------------------
Hoge\fuga
Administrator
NT AUTHORITY\SYSTEM
The command completed successfully.

The addition is now complete.

Confirm Connection with sqlplus

c:\hoge>sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Thu Oct 23 10:57:18 2025

Copyright (c) 1982, 2016, Oracle.  All rights reserved.



Connected to Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production.
SQL>