custom sysmessages | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

custom sysmessages

More of a pool than a question, but just out of interest: How many experienced dba’s here regularly use their own custom messages in sysmessages (ie sp_addmessage)?
I do not, as I find them to a pain in terms of copying them server->server, etc. I’d rather just use custom RAISERRORs in code. However in previous jobs they have been used (not by my design). Rebuild a server, and there’s always an extra step, run shedloads of sp_addmessages. Not what you want when you’re in a DR situation at 2am, know what I mean? (assuming master isn’t being restored!) My 2 cents… Tom Pullen
DBA, Oxfam GB
Yeah, Im much of the same opinion. But also its rare that I want two scenarios to display the same error. If a user reports an error I want it to be so unique that i can pinpoint the proc just from the pasted text (or messagebox screenshot, as our users prefer <img src=’/community/emoticons/emotion-5.gif’ alt=’;-)’ /><br /><br />Also to RAISERROR(messageid instead of RAISERROR(varchar does not seem very good in terms of self documenting.<br /><br />Was just curious whether id missed the value in this method. Seems not <img src=’/community/emoticons/emotion-1.gif’ alt=’:)‘ /><br />Cheers<br />Paul
If you want to be nice to the end-users you should use the string manipulation techniques and remove the confusing parts of the message. We use a lot for few services with no issues.
Satya SKJ
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.