Solved

SP_WHO2

Posted on 2008-06-16
5
723 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
Comment Utility
Alos, by running sp_who or sp_who2 has a chance of corrupting the database , is that true?
0
 

Author Comment

by:crishna1
Comment Utility
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 45

Expert Comment

by:Vitor Montalvão
Comment Utility
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
Comment Utility
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 45

Accepted Solution

by:
Vitor Montalvão earned 250 total points
Comment Utility
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
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 …
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

744 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

18 Experts available now in Live!

Get 1:1 Help Now