SQL Server Mirroring - Principal Database is not configured for mirroring

travisGatesMcGee@hotmail.com 21 Reputation points
2020-08-29T02:45:56.157+00:00

Is there any way of figuring out what the real reason is for Mirroring to give up on the
Alter Database dbPrincipal Set Partner = 'TCP://Domain + server : Port , etc.

There are so many reason why you will get the same error: Principal Database is not configured for mirroring

This time, checked the sys.databases, etc..... nothing is weird with the Principal Database .... it turned out that the Query Store was turned on - so it did not complete the Mirroring process .... we are not using the GUI; all with SQL code.

Because Microsoft gave up on Mirroring, they are not giving you detailed messages about the failure of the Mirroring attempt.

Was just curious.....

Thank you

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,996 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. m 4,271 Reputation points
    2020-08-31T06:53:36.09+00:00

    Hi @travisGatesMcGee@hotmail.com ,

    Ensure that you are meeting all the prerequisites for database mirroring.

    And then please reference : troubleshoot-database-mirroring-configuration-sql-server

    More information about creating database mirroring:
    example-setting-up-database-mirroring-using-windows-authentication-transact-sql,
    create-database-mirroring

    If the reply is helped, please do “Accept Answer”.
    BR,
    Mia

    0 comments No comments

  2. travisGatesMcGee@hotmail.com 21 Reputation points
    2020-08-31T18:00:51.253+00:00

    Yuximiao-MSFT

    Of course, I was using code .... or GUI would give the same standard error message.

    Regardless of what is in the article.... there are probably 15+ reasons why the mirroring will fail with "Principal Database is not configured for mirroring"

    Our example was: Query Store was turned on.

    Can you do your internal research .... is there a compiled information showing Check List by version, of course?

    Because Mirroring as a Feature and its error messages have been frozen in time, but newer versions of SQL are adding new capabilities to databases that will prevent Mirroring being configured.

    Did you get my point?

    0 comments No comments

  3. m 4,271 Reputation points
    2020-09-01T01:24:03.863+00:00

    Hi @travisGatesMcGee@hotmail.com ,

    OK. Can you tell me the topology diagram and t_sql of your mirroring configuration?
    I will reproduce the mirrirong configuration on my own side.

    BR,
    Mia

    0 comments No comments