Restore failed for Server.(Microsoft.SqlServer.SmoExtended).
Restore failed with below error:
This error generally occurs when any of the user/process accessing the database you are trying to restore. In such case use ‘sp_who2’ or any other command and determine what users currently accessing the DB. Discuss with users and kill the SPID’s. (KILL <SPID number>). Once all sessions gets terminated it will allow to restore.
In general this error raises when you are trying to restore a DB to another instance of same machine and when the mdf/ldf files of the DB are pointing to the files already being used by default instance.
So make sure the mdf/ldf files of named instance are pointing to its own location rather the default instance file locations.