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
 Transact-SQL (2005)
 script used database space on a server

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-09-21 : 09:44:02
i am looking for a sql script that will list all the used database space on a server
thanks ;-)

Andreas
Starting Member

11 Posts

Posted - 2009-09-21 : 09:46:37
sp_spaceused
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-09-21 : 10:27:38
quote:
Originally posted by Andreas

sp_spaceused



i need the list all my Drive Space and list of my DB space

sp_spaceused give me information of one db.
Go to Top of Page

Andreas
Starting Member

11 Posts

Posted - 2009-09-21 : 10:40:12
Then run it once for every db, e.g.
master..sp_spaceused


If you want to see free disk space then you can either list it via the cmd shell or try
xp_fixeddrives
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-09-22 : 09:25:21
i need TABLE_A
disk used free
c 300G 100G

if used-free<10 then send mail

i need TABLEB

BD sized
DB1 10M
DB2 20G
...
...
..
if you have more info so added
Go to Top of Page
   

- Advertisement -