I am trying to restore my database "SID" and its failing with the following error...
Restore failed for server 'SAP-Hostname'. (Microsoft.SqlServer.Smo)
System.Data.Sqlclient.SqlError: RESTORE cannot process database 'MIB' because it is in use by this session. It is recommended that the master darabase be used when performing this operation (Microsoft.SqlServer.Smo)
If any of you come across this issue, please help out to resolve the same.
Please refer[ this useful link|http://social.msdn.microsoft.com/Forums/en-CA/sqltools/thread/37ee8e24-7aaa-472b-861a-fc0cc513338a], which is describing the same symptom and suggesting the solution "changing the user default database to the master db resolved the issue".
Also, I hope you have selected "overwrite the existing database" while restoring DB.
Bhavik G. Shroff