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

Georgy Bolyuba picture Georgy Bolyuba · Sep 4, 2008 · Viewed 529.3k times · Source

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

Answer

Matthew Watson picture Matthew Watson · Sep 4, 2008

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.