Home » SQL & PL/SQL » SQL & PL/SQL » Session Status (10.2.0.2.0 ,windows)
Session Status [message #428666] Thu, 29 October 2009 06:52 Go to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member
Hi all,

Im creating index which is running for a long time in SQLPLUS session .
When i checked the status of the session from SQLPLUS session using

select sid,serial#,username,status from v$session
where status='ACTIVE' and username is not null
/

I could not see the status of session (where index is running) in SQLPLUS session.
So can i assume the session has expired or still active ?

Thanks
Re: Session Status [message #428667 is a reply to message #428666] Thu, 29 October 2009 07:01 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member

In another way , what to assume if we could not find the session status which is ACTIVE ?


Regards,
Re: Session Status [message #428668 is a reply to message #428667] Thu, 29 October 2009 07:08 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Hitman11 wrote on Thu, 29 October 2009 13:01

In another way , what to assume if we could not find the session status which is ACTIVE ?

The session is not in ACTIVE state.

Regards
Michel

Re: Session Status [message #428669 is a reply to message #428668] Thu, 29 October 2009 07:10 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member


thanks michel.

So can i assume the session has been expired ?

Regards,
Re: Session Status [message #428670 is a reply to message #428669] Thu, 29 October 2009 07:17 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
No, you have to check the status of the session.

Regards
Michel
Re: Session Status [message #428671 is a reply to message #428670] Thu, 29 October 2009 07:22 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member
But how to check the status of the session which is running for long time and i could not
find the session status using

select sid,serial#,username,status from v$session
where status='ACTIVE' and username is not null
/

Regards,
Re: Session Status [message #428674 is a reply to message #428671] Thu, 29 October 2009 07:43 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can't find it with your query because your restrict the result set to sessions that are ACTIVE and your session is not ACTIVE.
Conclusion?

Regards
Michel
Re: Session Status [message #428680 is a reply to message #428674] Thu, 29 October 2009 08:04 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member

Thnaks michel.

Its useless if i keep assuming the session is ACTIVE which is actually not.

Great support..
Re: Session Status [message #428700 is a reply to message #428666] Thu, 29 October 2009 09:17 Go to previous messageGo to next message
psingh7777
Messages: 22
Registered: August 2007
Location: New Delhi
Junior Member

You can also refer to tables

SELECT * FROM V$LOCK
and

SELECT * FROM V$PROCESS
Re: Session Status [message #428701 is a reply to message #428700] Thu, 29 October 2009 09:23 Go to previous messageGo to next message
Its_me_ved
Messages: 979
Registered: October 2009
Location: India
Senior Member
V$SESSION [ STATUS: ACTIVE/INACTIVE] should tell you in which status it is.
Re: Session Status [message #428708 is a reply to message #428701] Thu, 29 October 2009 10:10 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Its_me_ved wrote on Thu, 29 October 2009 15:23
V$SESSION [ STATUS: ACTIVE/INACTIVE] should tell you in which status it is.

There are other values for status and it is obvious OP now understood his error and solve his issue.

Regards
Michel

Re: Session Status [message #431674 is a reply to message #428674] Thu, 19 November 2009 01:39 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member
Hi,

Statistics were running for a long time (more than 2 hr).I was monitoring the status
of the ACTIVE session using v$session using another session.Quite after a long time,
i could see the ACTIVE session disappeared but the session is still running (session cursor is blinking).

What to assume during this scenario?

Regards,
Re: Session Status [message #431679 is a reply to message #431674] Thu, 19 November 2009 02:04 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You are between 2 calls.

Regards
Michel
Re: Session Status [message #431685 is a reply to message #431679] Thu, 19 November 2009 02:22 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member
yes michel;

How to find out the time duration of my ACTIVE session that could sustain?
Because i could see my ACTIVE session get disappeared after running for a long time.

Regards,
Re: Session Status [message #431698 is a reply to message #431685] Thu, 19 November 2009 03:29 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Hitman11 wrote on Thu, 19 November 2009 09:22
yes michel;

How to find out the time duration of my ACTIVE session that could sustain?
Because i could see my ACTIVE session get disappeared after running for a long time.

Regards,

I don't understand your concern and question.

Regards
Michel

Re: Session Status [message #431726 is a reply to message #431698] Thu, 19 November 2009 05:17 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member


I just want to know how long my ACTIVE session would sustain.


Regards,


Re: Session Status [message #431728 is a reply to message #431726] Thu, 19 November 2009 05:31 Go to previous messageGo to next message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
What do you mean "sustain"?

Regards
Michel
Re: Session Status [message #431731 is a reply to message #431728] Thu, 19 November 2009 05:38 Go to previous messageGo to next message
Hitman11
Messages: 94
Registered: October 2009
Location: norway
Member
Sustain -- Hold.

i mean how long the active session would be active? How to check this in database?

Regards,
Re: Session Status [message #431738 is a reply to message #431731] Thu, 19 November 2009 06:11 Go to previous message
Michel Cadot
Messages: 63810
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
No way to know it.

Regards
Michel
Previous Topic: Cursor Fetch For More than one tables
Next Topic: Column search based on column value
Goto Forum:
  


Current Time: Thu Sep 29 19:16:05 CDT 2016

Total time taken to generate the page: 0.10673 seconds