Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 database information

Author  Topic 

nandac
Starting Member

27 Posts

Posted - 2008-11-28 : 11:16:59
guys, i would like to know how to find the following information on ms sql from the system tables :

database space - total size, used, free

long running transactions

blocked processes

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-11-28 : 11:21:16
use sp_spaceused

http://msdn.microsoft.com/en-us/library/ms188776.aspx

Go to Top of Page

nandac
Starting Member

27 Posts

Posted - 2008-11-28 : 13:44:13
i would actually like to get the information from either system tables or system views instead of system stored procedures.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-11-28 : 14:09:29
1) sys.master_files
2) sys.dm_exec_request
3)sys.sysprocesses
Go to Top of Page

nandac
Starting Member

27 Posts

Posted - 2008-12-01 : 14:50:42
i saw the information i wanted in sp_spaceused.

but cannot find the same information in sys.master_file!

btw sp_spaceused only gives information regarding the dataspace and not the log space?

that's exactly what i want - only data not log.

appreciate if someone could point out how i could get the database size and the space currently used up from the system tables.
Go to Top of Page

nandac
Starting Member

27 Posts

Posted - 2008-12-01 : 16:18:05
ok, i got the data size by dividing size in master_files by 128.

but where will i get the current space used up in a database?
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-12-01 : 16:52:39
sp_spaceused has that information.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
   

- Advertisement -