1

Recently I've replaced a sql server (2008R2). I've reinstalled hosted apps and restored backups of databases. All seems to work as expected except that these events are shown in the eventlog :

id 18054 in MSSQLSERVER Error 150010, severity 16, state 96 was raised,
but no message with that error number was found in sys.messages.
If error is larger than 50000, make sure the user-defined message 
is added using sp_addmessage

I can get the message from the old server using select * from sys.messages where message_id='150010'

Now I'd like to know how to copy all the msg with id > 50000 on the new server? Do I have to restore a backup of the master db ?

Loïc MICHEL
  • 236
  • 3
  • 11

1 Answers1

1

Since you can still access the old server run something like this, save the output to a file and run that into the new server. You may have to adjust the varchar lenghts or the quotes for your messages but it's what I used for a recent migration.

select 'exec sp_addmessage ' + convert(varchar(6), message_id) + ', ' + convert(varchar(6), severity) + ', ''' + text + '''' 
from sys.messages where message_id > 50000 
Bruce
  • 511
  • 3
  • 3