Active session in oracle

Below sql statement will show the active session for database

select user_name, status, osuser, machine, a.sql_text
from v$session b, v$open_cursor a where a.sid = b.sid AND status=’ACTIVE’

output

USER_NAME                      STATUS   OSUSER                         MACHINE                                                          SQL_TEXT
—————————— ——– —————————— —————————————————————- ————————————————————
KNS                            ACTIVE   kmanchikalapudi                WIN-SNRV23P3O51                                                  select pos#,intcol#,col#,spare1,bo#,spare2 from icol$ where
KNS                            ACTIVE   kmanchikalapudi                WIN-SNRV23P3O51                                                  select i.obj#,i.ts#,i.file#,i.block#,i.intcols,i.type#,i.fla
KNS                            ACTIVE   kmanchikalapudi                WIN-SNRV23P3O51                                                  select grantee#,privilege#,nvl(col#,0),max(mod(nvl(option$,0
KNS                            ACTIVE   kmanchikalapudi                WIN-SNRV23P3O51

Below sql statement will show the active session for database select user_name, status, osuser, machine, a.sql_text from v$session b, v$open_cursor a where a.sid = b.sid AND status=’ACTIVE’ output USER_NAME                      STATUS   OSUSER                         MACHINE                                                          SQL_TEXT —————————— ——– —————————— —————————————————————- ———————————————————— KNS                            ACTIVE   kmanchikalapudi                WIN-SNRV23P3O51                                                  select pos#,intcol#,col#,spare1,bo#,spare2 from icol$ where KNS                            ACTIVE   kmanchikalapudi                WIN-SNRV23P3O51                                                  select i.obj#,i.ts#,i.file#,i.block#,i.intcols,i.type#,i.fla KNS                            ACTIVE  …

Leave a Reply

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