TFS messages gone adfter MS SQL reinstalled

HI all,

after replacing failed HDD i had to reinstall MS SQL server application and reatah all the DBs to it. Since then i have no Team foundation specific messages in event logs. All it says is something like this:
A database error occurred (SQL error 18054) ---> Error 500031, severity 16, state 1 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.
Error 500022, severity 16, state 1 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.
No items were checked out

it was supposed to tell which user has the file already checked out.
subineAsked:
Who is Participating?
 
David ToddConnect With a Mentor Senior DBACommented:
Hi,

Did you restore/reattach the previous MSDB database? That is where the customer error message is kept iirc.

Cheers
  David
0
 
subineAuthor Commented:
Thanks for answer. we did fix it a bit different way, so not full points are assigned
0
 
subineAuthor Commented:
Thanks,

we took another fresh tfs server linked it, and inserted the messages. not sure but looks like the messages are in Master db.

DECLARE @Error AS VARCHAR(6)

DECLARE @Severity AS VARCHAR(5)

DECLARE @Message as VARCHAR(4000)

DECLARE curMessages CURSOR FOR

SELECT error, severity, description

FROM [WorkingTFSServer].master.dbo.sysmessages

WHERE error >= 40000

OPEN curMessages

FETCH NEXT FROM curMessages

INTO @Error, @Severity, @Message

WHILE @@FETCH_STATUS = 0

BEGIN

print @Error + ', ' + @Severity + ', ''' + REPLACE(@Message,'''','"') + ''''

SET @Message = REPLACE(@Message,'''','"')

EXEC ('sp_addmessage ' + @Error + ',' + @Severity + ', N''' + @Message + ''', @replace=''REPLACE'' ')

FETCH NEXT FROM curMessages

INTO @Error, @Severity, @Message

END

CLOSE curMessages

DEALLOCATE curMessages
0
All Courses

From novice to tech pro — start learning today.