Msg 3102, Level 16, State 1, Line 1
RESTORE cannot process database 'deseobikedb' because it is in use by this session. It is recommended that the master database be used when performing this operation.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Does this message mean that I have to restore the master database before I restore the MyDatabase backup?
A: No, you don’t have to restore the master database before you restore a user database. This message is telling you that your user database connection is using the MyDatabase database. SQL Server Express can't complete the restore operation because the user database has an active connection with your current session. You’ll need to change your database connection to a different database before you attempt to perform the restore. You can use the T-SQL USE command, as I show in the following code, to change your current database connection to the master database before you perform the restore.
RESTORE DATABASE MyDatabase FROM DISK = 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Backup\MyDatabase.bak'