Custom Stored proc to run DBCC SQLPERF(LOGSPACE)/DBCC SHOWFILESTATS
$30-50 USD
Paid on delivery
I need a stored procedure which can do the following tasks
from a centralized server:
a. Run DBCC SQLPERF(LOGSPACE) and collect the transaction log space usage statistics for all
the databases on that specific server.
b. Run DBCC SHOWFILESTATS.
The procedure should iterate through a list of servers, and capture the information
on the databases on each server.
The list of servers should be a table where you cans set the server status.
For eg:
CREATE TABLE [dbo].[ServerList](
[ServerName] [nvarchar](128) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[IsActive] [bit] NULL
) ON [PRIMARY]
The proc should be SQL server 2000/2005 compatible.
Also the results should be dumped to a table on the central server.
Please do not use OPENQUERY to do this.
One of the ways could be either global temp tables or using sp_msforeachdb.
Take a look at this article for more ideas:
[url removed, login to view]
Project ID: #3296185