Home » RDBMS Server » Security » Cannot connect with SYS password (Oracle 11.2.0.1.0 Win Server 2016)
Cannot connect with SYS password [message #685476] Sun, 23 January 2022 07:51 Go to next message
Andrey_R
Messages: 441
Registered: January 2012
Location: Israel
Senior Member
Hi all,
Initially I have my SQLNET.ora file with

SQLNET.AUTHENTICATION_SERVICES = (NONE)

I am trying to login as sys but it doesn't work:

C:\Windows\system32>set ORACLE_SID=MYSID

C:\Windows\system32>sqlplus sys/pass123 AS SYSDBA

SQL*Plus: Release 11.2.0.1.0 Production on Sun Jan 23 15:48:26 2022

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

ERROR:
ORA-01031: insufficient privileges


Enter user-name:


So I try to


1. Change my SQLNET.ORA file to

SQLNET.AUTHENTICATION_SERVICES = (NTS)
2. I can connect as SYS:

C:\Windows\system32>sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sun Jan 23 15:43:58 2022

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


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show user
USER is "SYS"
SQL>
I am trying to set it password pass123:

SQL> alter user sys identified by pass123;

User altered.

3. Change back SQLNET.ora file to

SQLNET.AUTHENTICATION_SERVICES = (NONE)
4. Connect with my credentials:

C:\Windows\system32>sqlplus sys/pass123 AS SYSDBA

SQL*Plus: Release 11.2.0.1.0 Production on Sun Jan 23 15:48:26 2022

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

ERROR:
ORA-01031: insufficient privileges


Enter user-name:

Any idea what am I doing wrong here ?


Thanks
Andrey
Re: Cannot connect with SYS password [message #685477 is a reply to message #685476] Sun, 23 January 2022 09:51 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Post the result of:
show parameter sec_case_sensitive_logon
show parameter password
Re: Cannot connect with SYS password [message #685478 is a reply to message #685477] Sun, 23 January 2022 10:16 Go to previous messageGo to next message
Andrey_R
Messages: 441
Registered: January 2012
Location: Israel
Senior Member
SQL> show parameter sec_case_sensitive_logon

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
sec_case_sensitive_logon             boolean     TRUE
SQL>
SQL> show parameter password

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
remote_login_passwordfile            string      EXCLUSIVE
SQL>
Re: Cannot connect with SYS password [message #685479 is a reply to message #685478] Sun, 23 January 2022 11:44 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Post the result of:
select * from v$pwfile_users;
Check if password file exists (PWD<SID>.ORA); default location is %ORACLE_HOME%\database but can be overridden with registry values (Hkey_Local_Machine\Software\Oracle\Home<x>\ORA[_<SID>]_PWFILE).

In both cases (it exists or not) (re)create it, in the appropriate location, with the given password and retry the connection.

Re: Cannot connect with SYS password [message #685480 is a reply to message #685479] Sun, 23 January 2022 13:09 Go to previous message
Andrey_R
Messages: 441
Registered: January 2012
Location: Israel
Senior Member
It's working ( although created in SYSTEM32 path, where I was, because I had to run CMD as administrator, because I weren't granted with appropriate privileges by the sysadmin Embarassed ).
I had to copy it over to the database folder, where it was expected.


Thank you very much Michel
Previous Topic: one of the HSM server down - hardware failure
Next Topic: TDE wallet creation and setup
Goto Forum:
  


Current Time: Thu Mar 28 14:27:27 CDT 2024