question

kevhouston avatar image
kevhouston asked

Database cannot be deleted or added to AlwaysOn Group

I have a SQL Server 2012 database that is in a limbo state. The database cannot be deleted from the alwaysOn group because it doesn't exist there, but it cannot be added either as it already exists. The database on the primary server says it isn't synchronizing. In the primary AlwaysOn group there is a yellow question mark next to it. On the secondary server it shows a red x in the alwaysOn group. If I try to suspend data movement on the secondary I receive the following error. a very similar error occurs when trying to remove it from the AlwaysOn group. ![SQL Error 35242][1] If I try to add it into the always on group from the primary [Right Click -> Add Database] it is available and says it meets the prerequisites. However at the very end I get an error message saying it cannot be added as it already exists. ![Adding Errort][2] How can I resolve the inconsistency? Thanks, Kev [1]: /storage/temp/4008-sql2.png [2]: /storage/temp/4009-sql4.png
sql server 2012always-on
sql2.png (76.9 KiB)
sql4.png (75.4 KiB)
2 comments
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Share the code so, it will be easy to find the problem.
0 Likes 0 ·
There is no code to share as this is using oob functionality of the always-on group for high availability.
0 Likes 0 ·

1 Answer

· Write an Answer
jason_clark03 avatar image
jason_clark03 answered
You may try to resume a suspended availability database in AlwaysOn Availability Groups by using SQL Server Management Studio, Transact-SQL, or PowerShell in SQL Server 2012. have a look here: https://msdn.microsoft.com/en-us/library/ff877956(v=sql.110).aspx Also for deleting a secondary database you may have a look: https://msdn.microsoft.com/en-in/library/hh231120(v=sql.110).aspx hope this works for you...
10 |1200 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.