Forum Stats

  • 3,752,909 Users
  • 2,250,585 Discussions
  • 7,868,047 Comments

Discussions

Difference between Service Name and SID.

13»

Answers

  • jgarry
    jgarry Member Posts: 13,842
    edited Jun 1, 2017 12:55PM

    It is important in the context of this thread, since it may often be required to connect to 12c.  It is important to be explicit about the expanse of what the OP's driver has to connect to.

    I know I always forget about the LOCAL environment variable, too.

  • Dude!
    Dude! Member Posts: 22,826 Blue Diamond
    edited Jun 1, 2017 1:48PM

    You mean whether the OP's driver will connect using SID or service name? Sure thing. From what I understand, the SID corresponds to the Database, or Instance to be more precise. The terms Instance and Database are closely related, but don't refer to the same thing. You can connect to an Instance and sometimes have to, even thought the database does not exist.

    Regardless of whether you use the SID or TNS service name, the connections are managed through the database Instance, and in that context, 12c makes no difference. The TNS service name is an alias to an Instance. The Instance, depending on SID, Service Name or TWO_TASK, obviously decides where the connection is going.

  • jgarry
    jgarry Member Posts: 13,842
    edited Jun 1, 2017 6:39PM

    Maybe we're just having some language collision here, but the instance is on the receiving end of a connection.  There could be a listener involved deciding, there could be a connection manager, there could be neither, such as BEQ or more obscurity.  Connecting directly to a pdb requires a service.

  • Dude!
    Dude! Member Posts: 22,826 Blue Diamond
    edited Jun 2, 2017 1:37AM

    Explaining a complex thing like Oracle database is never easy, but I think we are saying the same. Of course the Instance is on the receiving end. Your comment regarding context was to my previous response, which was a response to rp0428 questioning my comment that connections are always made to the Instance. From what I understand, the client reaches the Instance through IPC or BEQ, or SQL*NET, but it still connects to the Database Instance, with emphasis on Instance.

This discussion has been closed.