Question : Determine when database is full

The project I'm working on handles transactions from a piece of hardware and logs these items into the database for reporting.  By default, our system installed MSDE (now SQL Express).  While we have provided a method for our uses to archive old transactions, out tech support group has gotten a few calls from users whose systems are not properly working - when investigated - we've determined the databases are 'full'.

Assuming the file properties allow for growth, and that we are limited by the SQL Version (ie.. MSDE allows for a DB up to 2GB) - is there a way to determine if a database is full - or perhaps something like 80% full - such that we can display a warning to the operator?

Answer : Determine when database is full

Hi,

Disk Space
for SQL 2000 there xp_FixedDrives to get free disk space.

1. Short Answer - either hard code or maintain a table. Note that only MSDE and SQL Express have a data limit. Other editions limited by disk

2. Yip, the sysfiles I refered to for SQL 2000 shows the growth settings of the individual files. The field to look at is maxsize - max number of 8k pages.

see
http://technet.microsoft.com/en-us/library/aa260411(SQL.80).aspx

HTH
  David
Random Solutions  
 
programming4us programming4us