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 SAP ASE 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, which include the data and time, go to the error log.
print "LOG DUMP: log for '%1!' dumped", @dbname
SAP ASE 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