Link to home
Start Free TrialLog in
Avatar of subine
subine

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of David Todd
David Todd
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of subine
subine

ASKER

Thanks for answer. we did fix it a bit different way, so not full points are assigned
Avatar of subine

ASKER

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