cancel
Showing results for 
Search instead for 
Did you mean: 

MSSQL Restore issue

Former Member
0 Kudos

I have two system A & B. B is exact copy of A with same Sid & DBSID created with the Database instance export/import method. Now I am using to restore B using A’s Backup, I am getting below error, If anyone can advise me the solution.

DB- MSSQL 2012

NW- Unicode NW 7.20

Regards

Sury

Accepted Solutions (1)

Accepted Solutions (1)

Matt_Fraser
Active Contributor
0 Kudos

Sury,

This means that someone (probably you) is logged on to the SQL Server (likely via Management Studio) with a user whose default database is the one you are trying to restore. Either that, or you haven't shut down the application.

If you are logged on to the server console via the sidadm user, this would cause this, as sidadm by default will have the DBSID database as default, and thus has an open connection to it.

Either change sidadm's default database temporarily to master, or logon with a different Windows user (i.e., perform the restore from your own desktop via a remote Management Studio).

Cheers,

Matt

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Matt & Sriram,

Followed the step & able to restore now.

Regards

Sury

Sriram2009
Active Contributor
0 Kudos

Hi Sury,

On target system Stop the SAP instance and restore the db in single user mode.or you can enable the MS Sql Alwayon DB. refer the SAP note

1772688 - SQL Server AlwaysOn and SAP applications

Regards

SS