Every database in an Adaptive Server has a last-chance threshold and all databases allow transactions to be buffered in a user log cache. When you initially create a database with shared log and data segments, its last-chance threshold is based on the size of the model database. As soon as data is added and logging activity begins, the last-chance threshold is recalculated dynamically, based on available space and currently open transactions. The last-chance threshold of a database with separate log and data segments is based on the size of the log segment and does not vary dynamically.
To get the current last-chance threshold of any database, you can use lct_admin with the reserve parameter and a specification of 0 log pages:
select lct_admin("reserve",0)
The last-chance threshold for a database is stored in the systhresholds table and is also accessible through sp_helpthreshold. However, note that:
sp_helpthreshold returns user-defined thresholds and other data, as well as an up-to-date value for the last-chance threshold. Using lct_admin is simpler if you need only the current last-chance threshold. Either of these values produce the most current value for the last-chance threshold.
For a database with shared log and data segments, the last-chance threshold value in systhresholds may not be the current last-chance threshold value.