0

My tnsnames.ora looks like this:

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)
    )
  )**

But when I try connecting using SQL Developer as follows I get the error: No more data to read from socket.

Role: SYSDBA ConnectionType: Basic

HostName: localhost Port: 1521 SID: CLRExtProc

Can you please let me know what I am doing wrong? I can connect using the service_name, or when using service name in SID, but why does it not work when I use the SID defined in tnsnames.ora.

As per my understanding, the SID corresponds to the instance name for the database. Is it not possible to connect using it?

Best Regards, Harshit

2
  • 1
    You should be supplying orcl as the SID; why are you using CLRExtProc?
    – Alex Poole
    Commented Jun 15, 2015 at 7:08
  • Yes I can connect when I supply orcl as SID. But isn't that the service name? And if so, are SID and Service name the same thing? Also, as tnsnames.ora shows SID as CLRExtProc, what does that signify? Commented Jun 15, 2015 at 7:14

1 Answer 1

0

The CLRExtProc entry in the tnsnames.ora is for external processes. That is not the database SID you use for normal client connections.

The ORCL entry is defined to use servicename orcl. The service name and SID may or may not be the same. The database instance has a single SID, while it can have multiple service names, which may include a domain.

In your case it seems there is no domain, and the SID and service name are the same. If you want to connect from SQL Developer with the SID then use orcl. I'm not sure why you would want use that instead of the service name though. Read more about accessing the database.

You are also connecting AS SYSDBA, possibly as SYS, which isn't something you should do routinely. Hopefully you are not creating objects under a built-in schema; create your own user/schema and do everything under that instead.

1
  • Thanks for your answer, and your suggestions. I am new to Oracle and just trying out things on my local database. This helps a lot! Commented Jun 15, 2015 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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