SQL Server Performance

custom sysmessages

Discussion in 'General DBA Questions' started by Chappy, Dec 13, 2004.

  1. Chappy New Member

    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)?
  2. thomas New Member

    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
  3. Chappy New Member

    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
  4. satya Moderator

    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
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.

Share This Page