Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I installed Oracle 11G on my Windows 2008 R2 Server. I also installed Oracle Client Libraries using separate installation media. After the client installation, when I try to log into the database using

C:\>sqlplus / as sysdba

I get a following error:

ERROR:
ORA-01031: insufficient privileges

This worked before the client installation. My account is on the ORA_DBA group. I have an sqlnet.ora file like this in the folder

C:\app\myaccount\product\11.2.0\dbhome_1\NETWORK\ADMIN

sqlnet.ora

# sqlnet.ora Network Configuration File: C:\app\myaccount\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
# Generated by Oracle configuration tools.

# This file is actually generated by netca. But if customers choose to 
# install "Software Only", this file wont exist and without the native 
# authentication, they will not be able to connect to the database on NT.

SQLNET.AUTHENTICATION_SERVICES= (NTS)

NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

tnsnames.ora

# tnsnames.ora Network Configuration File: C:\app\myaccount\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
# Generated by Oracle configuration tools.

LISTENER_ORCL =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))


ORACLR_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
      (SID = CLRExtProc)
      (PRESENTATION = RO)
    )
  )

ORCL =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = orcl.mydb.com)
    )
  )

listener.ora

# listener.ora Network Configuration File: C:\app\myaccount\product\11.2.0\dbhome_1\network\admin\listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = C:\app\myaccount\product\11.2.0\dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:C:\app\myaccount\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = C:\app\myaccount

From the windows registry (using regedit), from the path Computer > HKEY_LOCAL_MACHINE > SOFTWARE > Wow6432Node > ORACLE I can find two Keys:

KEY_OraClient11g_home1
KEY_OraDb11g_home1

And under those keys I can find ORACLE_HOME variables. So it seem that the Client installation generated also ORACLE_HOME so that I have now two ORACLE_HOME's. I don't know if this has something to do with this problem?

How to resolve this error on my Windows machine?

share|improve this question
    
Yes, my account is also in the Administrator group. –  jrara Mar 27 '13 at 7:07
    
I added those files into the question. –  jrara Mar 27 '13 at 7:16
2  
Do you have environment variable ORACLE_SID set? You can figure it out saying echo %ORACLE_SID% on the console or just set. –  Yasir Arsanukaev Mar 27 '13 at 7:17
    
No, I don't have that variable on my environmental variables list. Does it have to be? This worked before the client installation, and I did not have that variable at that time either. –  jrara Mar 27 '13 at 7:22
1  
You don't need to install the client on the same box - all the required files come with a server install. –  Phil Mar 27 '13 at 8:35

1 Answer 1

The problem is that your Oracle Client installation is in the system PATH before your Oracle Server installation (in fact, you even mention that it worked before you installed the client).

Proceed as follows:

  1. Remove the Oracle Client as it's only confusing things. Use the uninstall option but afterwards check that the directory and the Oracle Client registry key is gone and remove by hand if necessary.

    (It's possible to get this working by having the Oracle client home in the path after the server home, but it's much simpler to just have the single install. An Oracle server installation already contains a complete Oracle client anyway).

  2. Make sure that the path to the server's home is in your PATH. And no other Oracle home is in the path.

  3. Make sure that your account is in the ORA_DBA group. Double check this, especially if you are using domains.

  4. If all else fails, you could remove SQLNET.AUTHENTICATION_SERVICES=(NTS) from your sqlnet.ora as this will force you to use password authentication.

share|improve this answer
    
Where I can find the Uninstall-option. When I follow this guide (docs.oracle.com/cd/B28359_01/install.111/b32007/deinstall.htm) it says to use oui.exe. Tried to use it from the unzipped client folder, but it does not give an option to choose 'uninstall'. How to uninstall the client? –  jrara Apr 3 '13 at 8:13
    
There should be a start menu entry that was created under the Oracle Client home "program group", sub group Oracle Universal Installer or something similar. I start that and it gives me a Remove Software option. Failing that, is there a "deinstall" directory in the Oracle Client home directory? –  Colin 't Hart Apr 3 '13 at 11:13
    
Yes, but there is not this Universal Installer. I installed instant client from the installation media, and as the documentation says, instant clinet installation does not install oui.exe. But running oui.exe from the installation media does not give me a choice to uninstall. I'll have to check that deinstall directory. –  jrara Apr 4 '13 at 4:34
    
No, there is no "deinstall" directory in the oracle client directory. There seems to be no way to deinstall oracle client? –  jrara Apr 4 '13 at 12:43
    
You can delete it by hand; remove the directory and the associated registry key. Or you can just remove it from the path and make sure your Oracle Server install is only in the path. –  Colin 't Hart Apr 4 '13 at 12:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.