Include the with_log option in sp_addmessage when you add a new user-defined message to sysusermessages. This parameter sets the Adaptive Server to log the message each time that the message appears.