Monday 27 November 2017

Unable to restore database "..because it is in use by this session."

Restore failed for server restore cannot process database because it is in use by this session

Your login to the server cannot have the database as its default. Go to Security > Logins > your login user. Right click to get properties and where it says Default, put the database back to "Master". It doesn't take you out of the other db, just takes it out of that connection for the restore. I'd routinely restored but must have one day changed the default thinking it wouldn't hurt anything. Now I know it hurts restores to that db if I log onto the server as that connection with that default! Hope this helps clear it up.




Reference : Unable to restore database "..because it is in use by this session."

No comments:

Post a Comment