This is a discussion on Calculating freespace in a database within the Sybase forums, part of the Database Server Software category; --> Hi folks What is the most accurate method for calculating available free space (for data storage, excluding available log ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi folks What is the most accurate method for calculating available free space (for data storage, excluding available log space) within a SYBASE 12.x.x database? I am assembling a free space threshold procedure and would like to use the most accurate method available. Right now I am using current unreservered pages as my value, but the question I have about using this is if it includes unallocated log space as well. Thanks in advance for your help Larry Buss labuss@magothy.com |
| ||||
| labuss@magothy.com (Larry Buss) wrote in message news:<c8d75044.0312212120.78ba5b09@posting.google. com>... > Hi folks > > What is the most accurate method for calculating available free space > (for data storage, excluding available log space) within a SYBASE > 12.x.x database? > > I am assembling a free space threshold procedure and would like to use > the most accurate method available. > > Right now I am using current unreservered pages as my value, but the > question I have about using this is if it includes unallocated log > space as well. > > Thanks in advance for your help > > Larry Buss > labuss@magothy.com Hi, you can use this query(I have server with 2K page size): select 2*sum(unreservedpgs) from sysusages where dbid=db_id('dbname') and segmap = 3 but make sure data and log are on different locations, I really do not know what to do if log and data are in the same segment. From Sybase docs: Some possible values for segments containing data or logs are: Value Segment 3 Data only (system and default segments) 4 Log only 7 Data and log |