Showing posts with label bol. Show all posts
Showing posts with label bol. Show all posts

Tuesday, March 20, 2012

Referencing system message types

I need to handle system messages being put on my queue.

I have 2 ways of doing this, by message_type_id or by name.

As BOL only mentions names of message types I assume the only gauranteed method is the "by name" option. or can I guarantee the values of message_type_ids, the reason I thought the latter was possible was that Remus included ids in his recent performance blog post.

Thanks

The safest way is to look up the id by name at the procedure start and then use the id. The system message type ids are the same on all deployed SQL 2005 SKUs/versions, but we cannot guarantee this for future versions.

HTH,
~ Remus