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.
| Author |
Topic |
|
gercr
Yak Posting Veteran
53 Posts |
Posted - 2003-08-06 : 18:06:21
|
Hi all, I am looking a way to get how much free space my db and log files have, this because I want to use this to make a alert to went the free space of my DB get to a X free space limit  |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-08-06 : 18:13:57
|
| Why don't you use the alerts that SQL Server already has to track this? Go to SQL Server Agent in Enterprise Manager then to Alerts. Check out both demo alerts. You can then setup the same alerts but for your databases.But sp_spaceused will give you the information that you need. You will need to run sp_spaceused @UPDATEUSAGE = TRUE occassionally as the data gets out of whack sometimes. Unallocated space is what you need to pay attention to for your MDF file.Tara |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-08-06 : 18:17:47
|
| Hmmm, just looked at the demo alerts again and noticed that they alert when the log is full. So use the alert for a full log file and use sp_spaceused for the data file.Tara |
 |
|
|
|
|
|