Solved

SP_WHO2

Posted on 2008-06-16
5
724 Views
Last Modified: 2008-06-30
Hi,
When SP_who2 is run,can it get the data from two weeks back or how is the time period determined?
is there a way to control the reult set time period? what does status RUNNABLE and Commands-- TASK Manger,AWAITING COMMAND,CHECKPOINT SLEEP mean?
0
Comment
Question by:crishna1
  • 3
  • 2
5 Comments
 

Author Comment

by:crishna1
ID: 21798356
Alos, by running sp_who or sp_who2 has a chance of corrupting the database , is that true?
0
 

Author Comment

by:crishna1
ID: 21798497
i found the answers for various stages in status i asked in my question, now i need to know,
1)When SP_who2 is run,can it get the data from two weeks back or how is the time period determined?
2)by running sp_who or sp_who2 these is a chance of corrupting the database , is that true??
0
 
LVL 46

Expert Comment

by:Vitor Montalvão
ID: 21801849
Answer for your questions:
1) Those SP's gives you a snapshot of the moment you execute them. It's always about the present so you can't have data from a determined period.
2) False. Those SP's wouldn't corrupte databases. No chances at all for that.
0
 

Author Comment

by:crishna1
ID: 21804263
on question #1
how far back does it go and how is the time period based on or determined?  when i execute SP_WHO2 on one of my servers i see login/SPID's from 4-5 months back.
0
 
LVL 46

Accepted Solution

by:
Vitor Montalvão earned 250 total points
ID: 21813298
The limit it's the last time SQL Server service was restarted.
It will show you the current connections. If you have SPID's from 4-5 months ago, that means they was never disconnected. Maybe those are system processes (usually low process number).
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now