Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

How do I get "Last Batch" time from EM's Process Info, via T-SQL.

Posted on 2006-07-03
2
336 Views
Last Modified: 2008-02-01
Hi.

I've got 20 different databases on 5 different SQL servers.

I have a web page which examines all the databases on all the servers, reporting who is logged in to a specific set of applications. This is all working fine.

I want to add to my web page (which is an on demand page, not a constant refresh and is used probably once or twice a week) the idle time, based upon the datetime of the last batch in the Process Info page of EM.

I see that I can use "exec sp_who" to get the data about who's connected to the DBS and which DB they are using. That's fine. But I already have that (to a degree).

I can't see how to get the last batch column.

2 of the servers are SQL7, the rest are SQL2K. We will be adding an SQL2K3 to the network soon.

Any ideas?


0
Comment
Question by:Richard Quadling
2 Comments
 
LVL 2

Accepted Solution

by:
ewahner earned 500 total points
ID: 17030217
sp_who2
0
 
LVL 40

Author Comment

by:Richard Quadling
ID: 17030236
Well. That was easy! No documentation in BOL though.
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql, case when & top 1 14 26
SQL Log size 3 17
sql server query 18 36
Where is the Help Section? 8 25
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

856 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