How to restotre user-defined messages ?

  • Hello everybody,

    I'm having a problem with A SQL 2005 server. This weekend the server had to be reinstalled on a new machine. After installing  and restoring all the (user) databases we discovered that one of the applications  couldn't find some user-defined  error messages. 

    Does anyone knows how to restore these messages other than running the sp_addmessage scripts, which we haven't found yet.

    Tia Markus

    [font="Verdana"]Markus Bohse[/font]

  • the messages are in a system table within master, sys.messages or sysmessages ( your choice ) , you'd need to restore a previous master and copy the messages you need to your new master database.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • Colin,

    we tried that already, but it doesn't work on SQL 2005. We restored the old master database as Master2, but if we try "Select * FROM master2.sys.messages" we receive an error object does not exisits.

    Markus

    [font="Verdana"]Markus Bohse[/font]

  • in your restored database try the table 

    sysusermsgs

    I can't get data out of it in master ( yet )

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

  • Colin

    where do you have a table/view sysusermsgs. I can't find such a table on my server. And all I can find on the web about it points to Sybase.

    Markus

    [font="Verdana"]Markus Bohse[/font]

  • I haven't really spent any time examinaing the system tables within sql 2005, ms has made a pretty good job of hiding much of the system data. Views and stuff are all very fine but in a DR situation being able to extract data from the system ( for reference say ) can be very useful. I suspect making copies of ( the data within ) system views will become a required part of DR - your experiences with user defined messages seem to bear this out.

    I examined the system tables , sys.sysobjects to find the names of the underlying syatem tables within master.

    [font="Comic Sans MS"]The GrumpyOldDBA[/font]
    www.grumpyolddba.co.uk
    http://sqlblogcasts.com/blogs/grumpyolddba/

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply