Removes a free-space threshold from a segment.
sp_dropthreshold dbname, segname, free_space
is the database from which you are dropping the threshold. This must be the name of the current database.
is the segment whose free space is monitored by the threshold. Use quotes when specifying the “default” segment.
is the number of free pages at which the threshold is crossed.
Removes a threshold from segment1 of mydb. You must specify the database, segment, and amount of free space to identify the threshold:
sp_dropthreshold mydb, segment1, 200
You cannot drop the last-chance threshold from the log segment.
You can use the no free space acctg option of sp_dboption as an alternative to sp_dropthreshold. This option disables free-space accounting on non-log segments. You cannot disable free-space accounting on log segments.
The permission checks for sp_dropthreshold differ based on your granular permissions settings.
Granular permissions enabled |
With granular permissions enabled, you must be a user with manage database privilege. |
Granular permissions disabled |
With granular permissions disabled, you must be the database owner or a user with sa_role. |
Values in event and extrainfo columns from the sysaudits table are:
Event |
Audit option |
Command or access audited |
Information in extrainfo |
---|---|---|---|
38 |
exec_procedure |
Execution of a procedure |
|
System procedures sp_addthreshold, sp_dboption, sp_helpthreshold, sp_thresholdaction