16

Can someone explain to me what's the difference of SID, DB Name, DB Domain, Global Database Name, Service Name, Service Alias and Instance Name in Oracle ?

Thanks Michael

Michael Ellick Ang
  • 1,839
  • 3
  • 13
  • 15

4 Answers4

12

SID = identifies the database instance (database name + instance number). So if your database name is somedb and your instance number is 3, then your SID is somedb3.

DB Name = Name of the database (database can be shared b/t multiple instances)

DB Domain = Usually the same as your company domain (somecompany.com)

Global Database Name = Database name + database domain (somedb.somecompany.com)

Service Name = A "connector" to one or more instances. It is often useful to create additional service names in a RAC environment since the service can be modified to use particular SIDs as primary or secondary connections, or to not use certain SIDs at all.

Service Alias = An alias to the service name (just like a CNAME, etc). Say you make your service name something meaningful to the dba, but perhaps it's a bit esoteric. Create a service alias and name it something that will be meaningful to the user.

Instance name = same as SID

jswoods7
  • 196
  • 1
  • 3
4

The way you describe SID is only the DEFAULT behaviour in a RAC config. The SID (== instance_name) is just that: The name of your instance.

I always look at it like this: An Instance, is an Instance of the RDBMS software. An instance MOUNTS a controlfile, (alter database mount) In this controfile are written the location of the datafiles. the collection of datafiles (okay, and the controlfile(s) ) == the database.

A database has a name, the db_name, and (optionally) a domain (db_domain) --> together global_db_name. Now imagine you're replicating (DataGuard) your database. You'd like to keep the DB_name the same, right? (I mean: data-wise, it's the SAME database) But then how to identify the two 'versions' of your database? Enter ' DB_UNIQUE_NAME'... Yes, it's getting confused...

My personal practice is to name the INSTANCE like the db_unique_name in a DataGuard setup, and stick with the RAC-names (db_name+Instance_Number) in a RAC setup. Then, the db_unique_names I make up, are generally like db_name + 1-letter-suffix (MYDBa MYDBb etc.)

Cheers, Paul

paul
  • 66
  • 2
0

SID is instance. Better avoid using the term 'database instance', just instance.

"SID = identifies the database instance (database name + instance number)" is wrong. "An Instance, is an Instance of the RDBMS software" is wrong. An uninstalled or an installed DBMS is just DBMS.

"DB Domain = Usually the same as your company domain" should be avoided. I experienced problem using domain, and the problems disappear when not using the domain.

"Global Database Name = Database name + database domain" is also wrong. Global Database Name is Service Name. It's that simple.

"SID = identifies the database instance (database name + instance number). So if your database name is somedb and your instance number is 3, then your SID is somedb3." is wrong. There is no such catenation of identity or name.

-1

I suggest you refer

Knowledge Xpert for Oracle Administration > Oracle Architecture > Oracle instance, files and processes

if you have Toad installed, even a trial version.

It describe the whole picture in thoroughly.

user25414
  • 41
  • 5