Changing a free-space threshold

Use sp_modifythreshold to associate a free-space threshold with a new threshold procedure, free-space value, or segment. sp_modifythreshold drops the existing threshold and creates a new one in its place. Its syntax is:

sp_modifythreshold dbname , segname , free_space  
[, new_proc_name [, new_free_space  
[, new_segname]]]

where dbname is the name of the current database, and segname and free_space identify the threshold that you want to change.

For example, to execute a threshold procedure when free space on the segment falls below 175 pages rather than below 200 pages, enter:

sp_modifythreshold mydb, "default", 200, NULL, 175

In this example, NULL acts as a placeholder so that new_free_space falls in the correct place in the parameter list. The name of the threshold procedure is not changed.

The person who modifies the threshold becomes the new threshold owner. When the amount of free space on the segment falls below the threshold, Adaptive Server executes the threshold procedure with the owner’s permissions at the time he or she executed sp_modifythreshold, less any permissions that have since been revoked.