SQL Server 7.0 Undocumented Stored Procedures

sp_tempdbspace

This stored procedure can be used to get the total size and the space used by the tempdb database. It is used without parameters.

Syntax

sp_tempdbspace

This is the example:

EXEC sp_tempdbspace

Here is the result set from my machine:

database_name database_size           spaceused

————- ———————– —————————–

tempdb           9.750000                   .562500

sp_who2

This stored procedure returns information about current SQL Server 2000 users and processes similar to sp_who, but it provides more detailed information. sp_who2 returns CPUTime, DiskIO, LastBatch and ProgramName in addition to the data provided by sp_who.

Syntax

sp_who [loginame]

where

loginame – the user’s login name. If not specified, the procedure reports on all active users of SQL Server.

This example returns information for the ‘sa’ login:

EXEC sp_who2 ‘sa’

Published with the explicit written permission of the author. Copyright 2001 Alexander Chigrik

Pages: 1 2 3 4




Array

No comments yet... Be the first to leave a reply!