Sql-server – Database msdb stuck in recovery

msdbrecoverysql server

I encountered a problem while testing recovering backups (Veritas BackUp Exec 2015, just for you to know).

Main Problem is: I couldnt restore the databases – looking on the target Server where I want to restore the DBs, SSMS tells me, 'msdb' database is being recovered.

I've already tried:

RESTORE DATABASE MSDB WITH NORECOVERY | ...WITH RECOVERY

The command was executed (no Errors), but nothing happened (even after restarting SQL Services & a Server restart).

I tried to set it offline, but running

ALTER DATABASE MSDB SET OFFLINE

tells me, that the msdb-Database can't be set as offline.

I need a way to get the msdb database out of recovery. Unless it will be recovered anyway, the current data is useless for me. Is there a way to just force it out of recovery (even if its damaged after executing the command)?

SELECT [state_desc] FROM [sys].[databases] WHERE [name] = N'msdb';

returns "RESTORING".

Best Answer

Converting my comment to answer :

restore database msdb with replace, recovery

Note : if the file location is same, then you dont need to use with move in the restore clause.