You should include a print statement near the beginning of your procedure to record the database name, segment name, and threshold size in the error log. If your procedure does not contain a print or raiserror statement, the error log will not contain any record of the threshold event.
The process that executes threshold procedures is an internal Adaptive Server process. It does not have an associated user terminal or network connection. If you test your threshold procedures by executing them directly (that is, using execute procedure_name) during a terminal session, you see the output from the print and raiserror messages on your screen. When the same procedures are executed by reaching a threshold, the messages go to the error log. The messages in the log include the date and time.
For example, if sp_thresholdaction includes this statement:
print "LOG DUMP: log for ’%1!’ dumped", @dbname
Adaptive Server writes this message to the error log:
00: 92/09/04 15:44:23.04 server: background task message: LOG DUMP: log for ’pubs2’ dumped