How to Find SID in Oracle

How to find SID in Oracle | In Oracle we can find SID by using SQL * Plus just by typing a simple select query or we can use “key registry” (only in Windows).

The Oracle System ID (SID) is used to uniquely identify a particular database on a system. For this reason, one cannot have more than one database with the same SID on a computer system. When using RAC, all instances belonging to the same database must have unique SID’s. By default, Oracle SID is “orcl”.

To find SID or Global in the Oracle database by a query, Open SQL* Plus and log in to any user. Now execute the below query,

SELECT sys_context('userenv','instance_name') FROM dual;

If there are more then one word for sid/global name then use the first word as sid/global name.

Example:-

SQL> conn system/manager;
Connected.

SQL> SELECT sys_context('userenv','instance_name') FROM dual;

SYS_CONTEXT('USERENV','INSTANCE_NAME')
---------------------------------------
knowprogram

Using Windows Registory Editor

In Windows Operating system we can find sid or global by using “Registory Editor”. Windows operating system saves all the important information and settings as keys into the windows registries. To get this,

Step1:- Open Registory Editor.

Open Run command by using “Windows Key + R” and then open “REGEDIT”.

open run command

Now, Registory Editor will be opened.

Step2:- Go to HKEY_LOCAL_MACHINE => SOFTWARE => ORACLE

Registry editor

Step3:- In Oracle directory, we can find the key registry for your Oracle Home.

Oracle files

The ORACLE_SID contains the SID of ORACLE database.

find sid in Oracle

If you enjoyed this post, share it with your friends. Do you want to share more information about the topic discussed above or do you find anything incorrect? Let us know in the comments. Thank you!

Also Read,

Leave a Comment

Your email address will not be published. Required fields are marked *