How SID is different from Service name in Oracle tnsnames.ora

后端 未结 5 1816
迷失自我
迷失自我 2020-11-28 18:06

Why do I need two of them? When I have to use one or another?

5条回答
  •  没有蜡笔的小新
    2020-11-28 18:24

    Quote by @DAC

    In short: SID = the unique name of your DB, ServiceName = the alias used when connecting

    Not strictly true. SID = unique name of the INSTANCE (eg the oracle process running on the machine). Oracle considers the "Database" to be the files.

    Service Name = alias to an INSTANCE (or many instances). The main purpose of this is if you are running a cluster, the client can say "connect me to SALES.acme.com", the DBA can on the fly change the number of instances which are available to SALES.acme.com requests, or even move SALES.acme.com to a completely different database without the client needing to change any settings.

提交回复
热议问题