HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Database msdb stuck in recovery

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
databasestuckrecoverymsdb

Problem

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".

Solution

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.

Code Snippets

restore database msdb with replace, recovery

Context

StackExchange Database Administrators Q#124687, answer score: 2

Revisions (0)

No revisions yet.