2

I have a 2-node SQL Server AlwaysOn Availability Group. When I execute this T-SQL command on the Primary server:

USE master 
go 
ALTER AVAILABILITY GROUP MyAG REMOVE DATABASE TestDB

it removes the TestDB from the Availability Group. Everything looks fine on the Primary server. However, on the Secondary replica, the TestDB has the status of "Restoring ..." next to it. The database is inaccessible. The status remains "Restoring..." for a while. Looks like the only thing I could do is to drop it, which I did.

My question is: after I remove the DB from MyAG, what do I need to do to make the TestDB available for use again on the secondary replica?

1

1 Answer 1

4

Simply run

RESTORE DATABASE TestDB WITH RECOVERY

on the secondary.

1
  • Hi Tony, thank you. It worked.
    – sydney
    Commented Feb 14, 2020 at 14:57

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.