Tuesday, 2 February 2010

ORA-12560: TNS:protocol adapter error

These notes only apply to a problem I had with a local install of oracle on Windows.

Couldn't connect to local install of Oracle on windows with sqlplus, either with sqlplus / as sysdba or sqlplus sys/sys as sysdba.  Tried the usual stuff
  • Check that ORACLE_HOME environment variable is set 
  • Check that listener.ora configured correctly.
  • Check that sqlnet.ora ok.
  • Check the dba group to see if I was a member
All of these seemed to be configured correctly.
Out of desparation i removed the NTS authentication from sqlnet.ora

SQLNET.AUTHENTICATION_SERVICES= (NTS)

So i then try to connect to database with sqlplus / as sysdba but this time get ORA-01031: insufficient privileges.  So i tried using the database authentication and try connecting with sys as sysdba and supplying the database password.  Bingo I'm logged in.

Turns out all the above hassle was caused by the "NT LM Security Support Provider" service, turns out Oracle needs this service to be running to have transparent OS authentication.  When I started this service and restored the SQLNET.AUTHENTICATION_SERVICES= (NTS)into sqlnet.ora I found that I could use sqlplus / as sysdba and quickly login locally to db.

No comments: