Monitoring free space with the last-chance threshold

All databases, including master, have a last-chance threshold. The threshold is an estimate of the number of free log pages that are required to back up the transaction log. As you allocate more space to the log segment, Adaptive Server automatically adjusts the last-chance threshold.

When the amount of free space in the log segment falls below the last-chance threshold, Adaptive Server automatically executes a special stored procedure called sp_thresholdaction. (You can use sp_modifythreshold to specify a different last-chance threshold procedure.)

Figure 17-1 illustrates a log segment with a last-chance threshold. The shaded area represents used log space; the unshaded area represents free log space. The last-chance threshold has not yet been crossed.

Figure 17-1: Log segment with a last-chance threshold

Graphic showing the layout of the log segment and the placement of the last-chance threshold in the middle of the free space.