I received the following trying to detach the msdb database in SQL Server 2005 :
Cannot detach an opened database when the server is in minimally configured mode
I was trying to move msdb according to kb224071. I finally found why.
When I opened my query in SQL Server Management Studio (SSMS) I was connecting to msdb database by default. Event if I do a use master; after that, it was too late, I always got an error doing a sp_detach_bd 'msdb';
So here's the trick :
- Click new query on the tool bar of SSMS
- Click on the Options >> buton in the Connect to Server dialog
- Select the Connection Properties tab
- Type master in the Connect to database field
- Click Connect
Et voilĂ ! You will now be able to detach the msdb database.
Note : Of course this will only work if you follow kb224071 and start SQL Server with the -c -m -T3608 startup options.