Specifying a new last-chance threshold procedure

You can use sp_modifythreshold to change the name of the procedure associated with the last-chance threshold. You cannot use it to change the amount of free space or the segment name for the last-chance threshold.

sp_modifythreshold requires that you specify the number of free pages associated with the last-chance threshold. Use sp_helpthreshold to determine this value.

The following example displays information about the last-chance threshold, and then specifies a new procedure, sp_new_thresh_proc, to execute when the threshold is crossed:

sp_helpthreshold logsegment
segment name   free pages   last chance?   threshold procedure
------------   ----------   ------------   -------------------
logsegment     40                      1   sp_thresholdaction

(1 row affected, return status = 0)

sp_modifythreshold mydb, logsegment, 40, sp_new_thresh_proc