0
This procedure can only affect thresholds in the current database. Say 'USE %1!', then run this procedure again.
Thresholds for a specified database can only be created or modified while in the database. Error 18031 occurs when you try to run sp_addthreshold, sp_dropthreshold, or sp_modifythreshold when you are not in the database for which you are running the command.
Determine the name of the current database:
1> select db_name() 2> go
Select the correct database:
1> use <database_name> 2> go
Where <database_name> is the name of the database for which you want to run the threshold command.
Rerun the sp_addthreshold, sp_dropthreshold, or sp_modifythreshold command.
All versions