Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

DTA problem Expand / Collapse
Author
Message
Posted Saturday, May 3, 2014 7:55 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Saturday, May 3, 2014 11:38 PM
Points: 14, Visits: 59
Hi,

In my Instance Db engine Tuning Advisor is not opening. It's showing initialize MSDB for tuning error message. i have MSDB backup file i am using this cmd for Restore

USE master
GO
RESTORE DATABASE [msdb]
FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup\msdb.Bak'
WITH REPLACE, FILE = 1, REPLACE, STATS = 10
GO

error msg is:
Msg 3101, Level 16, State 1, Line 1
Exclusive access could not be obtained because the database is in use.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

what is the problem....
Post #1567265
Posted Monday, May 5, 2014 1:45 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:35 AM
Points: 5,014, Visits: 10,517
I have no idea why you need to restore msdb to work with DTA.
However, somebody is logged into that database and it probably is the SQL Server Agent login.
Stop the SQL Server Agent and you should be able to restore it.

The system databases are not as easy to restore as the user databases. You have to know what you're doing.
See here for some tips on restoring the msdb database: http://www.mssqltips.com/sqlservertip/2571/restoring-sql-server-system-databases-msdb-and-model/


--
Gianluca Sartori

Get your two-cent-answer quickly
spaghettidba.com
@spaghettidba
Post #1567429
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse