Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

The Ultimate Running Requests Reporter

By Jesse Roberge,

*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
Util_RunningRequests
By Jesse Roberge - YeshuaAgapao@Yahoo.com

Reports all running requests along with the request's identifying information (SPID, login etc),
current resource consumption, query batch text, statement text, and XML query plan.
Can run from a central 'admin' database location.
Requires VIEW_SERVER_STATE permission to work. DB-owner does not have this permission.
Sysadmin does have this permission. VIEW_SERVER_STATE can be granted as a separate permission to some or all dbo users.

Update 2009-09-21:
Tweaked the pigging score - cpu*(reads+writes) is now cpu*(reads*10+writes*10+logical_reads)
Fixed EndPos for cases when it is -1
Added StatementTextLength

Update 2009-10-15:
Added DatabaseID, DatabaseName, BlockedBySessionID, BlockingRequestCount, WaitType, and PendingIOCount

Required Input Parameters
none

Optional Input Parameters
none

Usage:
EXECUTE Util.Util_RunningRequests

Copyright:
Licensed under the L-GPL - a weak copyleft license - you are permitted to use this as a component of a proprietary database and call this from proprietary software.
Copyleft lets you do anything you want except plagarize, conceal the source, or prohibit copying & re-distribution (NDAs etc) of this script/proc.

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.

see <http://www.fsf.org/licensing/licenses/lgpl.html> for the license text.

*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=

Total article views: 4603 | Views in the last 30 days: 3
 
Related Articles
FORUM

Licensing Question?

Network inventory software licensing

FORUM

SSIS Licensing Question

Licensing

ARTICLE

Easy Licenses

Software licensing can be complex and confusing. Even in Windows and SQL Server, where hard limits a...

FORUM

SQL licensing question

Licensing - Multiplexing - Pooling software

ARTICLE

Software Licensing Cuts - Database Weekly (Mar 16, 2009)

In the news this week, Microsoft is cutting some licensing costs for larger companies. A good move f...

 
Contribute