top of page

Find Current Session SID in Oracle

Sometimes when you are connected to Oracle database, you might need to find your own session SID and serial number. Below are the two queries that can help you find SID and serial number of current sessions that you connected with

Find SID in normal database

In a normal standalone database, use below query

select sid from v$mystat where rownum=1;

Find SID in RAC database

In a RAC database, you must also know the details of the instance that you are connected with. Below query will give you SID, serial # along with the instance number

WHERE sid=(select sid from v$mystat where rownum=1);

Related Posts

Heading 2

Add paragraph text. Click “Edit Text” to customize this theme across your site. You can update and reuse text themes.

bottom of page