I noticed there is a bug that when people asked about it, they were sent in the wrong direction (see final remarks below).

When trying to use SQL Server 2016 with SSMS 17.1 to create a mirrored database, the following errors might be received:

Database is not configured for database mirroring.
Database x cannot be opened. It is in the middle of a restore.

This error was a real PITA that cost me 2 weeks of searching as I am new to this DBA stuff, otherwise I would have gone the scripting path.

I think this is a bug in SSMS 17.1 because it works in SSMS 16.5.3. It took me quite some time to figure the real issue was the Management Studio itself, unfortunately. The interface of version 17.1 is much better compared to version 16.5.3!

Wrong suggestions and misleading solutions

Mostly it was the database mirroring/hadr_endpoint TCP://servername:port setup, restoring with NORECOVERY being forgotten in many cases, but was not the real issue when backup and restore were done correctly.

  • 1
    So this is still not fixed in SSMS 17.8.1!
    – TKo
    Jul 25, 2018 at 14:46
  • you can still use query console to create the mirroring thing till MS fixes the GUI..
    – elekgeek
    Jul 27, 2018 at 2:00
  • In case anyone is wondering what the SQL commands are, here they are. Remplace the variables in bold with the actual values for your scenario. On the secondary DB: ALTER DATABASE DBName SET PARTNER = 'TCP:// PRIMARY :5022' On the primary DB: ALTER DATABASE DBName SET PARTNER = 'TCP:// SECONDARY :5022' ALTER DATABASE DBName SET PARTNER SAFETY FULL If you're using a witness, run this on the primary DB: ALTER DATABASE DBName SET WITNESS = 'TCP:// WITNESS :5022' ALTER DATABASE DBName SET PARTNER TIMEOUT 10 Nov 14, 2019 at 15:40

3 Answers 3


The previous Connect item has been re-created in the Azure Feedback forum as:

If you are experiencing this issue, you may wish to Upvote the Azure item.

Also note that the problem shows up in the recently released SSMS 17.2, 17.4 and even 17.9 as well.

  • 1
    This answer was flagged for moderator attention a couple of times for "not really being an answer to the question". I have left it be on the basis that filing a bug report is a legitimate response to a question about a new bug. Assuming it is kept up to date with the bug report's progress, this may even become the answer. Just FYI everyone.
    – Paul White
    Aug 11, 2017 at 5:18

The solution is to use SSMS 16.5.3!

I don't know if it will be fixed in later versions. I am not aware if Microsoft is aware of this issue.

  • 1
    ...And, of course, if the problem is a bug in the latest version of SSMS, then this may be a valid answer at this moment, but (presumably) the bug will be fixed eventually. If, on the other hand, you can point to information that indicates it won't be fixed (for example, a Connect submission of the error the MS has closed), that would be very useful.
    – RDFozz
    Jun 9, 2017 at 1:01
  • SSMS version 17.9 and still not fixed.
    – John K. N.
    May 31, 2019 at 8:53

I think it's a bug and not yet resolved, just addressed.



Unique ports for both the instance ports and the mirroring ports.

Can you please check both the servers have the SQL Server service running under the same user or not?

  • I am aware of this bug, it hangs the whole application, but doesn't seem to have an impact on the mirroring bug.. explain how it's related please.
    – elekgeek
    Jun 9, 2017 at 20:07
  • What you mean? If there is a bug in SSMS 17.1 it has impact for Mirror setup. As per my knowledge, the better solution is try to connect using an older version of SSMS to run the mirroring wizard and it works better. We can set it up using command line but I never tried it may more complicated.
    – CR241
    Jun 9, 2017 at 20:48
  • 1
    not necessarily... why doesn't the mirroring bug affect availability group creation wizard, I have already used 17.1 and it works ok for availability groups? the mirroring bug im talking about has nothing to do with your link.. it's related to another issue
    – elekgeek
    Jun 9, 2017 at 20:52
  • Can you please edit your question with error screen shot that might help users for better understanding the issue what you are talking about? Thanks..!
    – CR241
    Jun 9, 2017 at 21:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.