4

Today by mistake deleted The AlwaysOn Availability Database from live server.

Let I am explaining the Details.

In AlwaysON Availability Groups, there is 2 Availability Replica. That is

Primary Replica Server (That is SQLServer1)

Secondary Replica Server (That is SQLServer2)

In Primary Replica Server, there is 4 databases.

AlwaysOnTest 
Database2
Database3
Database4

In Secondary Replica Server (SQLServer2) , I can't say exactly because that is another SQLserver .But frankly i would like to say that i don't have access of that server.

When i got the accessibility of primary server it's already configured by Third party Vendor. As a DBA my task was to take backup of all databases in SQLServer1 . Also take backup of AlwaysONTest Database. Where AlwaysOnTest Database of Primary Replica Server(SQLServer1) is synchronize with Secondary Replica server (SQLServer2). This is only one database , which synchronize with secondary replica.

Today at 12:10 P.M at Qatar time by mistake AlwaysOn database deleted. I have Full backup of Yesterday of Primary Server. Note: The Backup Preference of Backup is Secondary Only.

After instance I have also taken full backup of primary replica.

Now i want to again configure AlwaysONTest Database with Secondary Replica.

Note: Only by mistake deleted AlwaysOn Availability database. The environment is as it is.

What i shall do . Any suggestion or help will be appreciated.

11

It is not possible to delete a database that currently resides in an availability group. It is also not possible to restore over top of it while it remains in the availability group. Thus, this database was not in an availability group to begin with.

What you are describing is not possible as you will get an error if the database is involved in Always On. You'll receive the following error:

Msg 3752, Level 16, State 1, Line 1 The database '<Database name>' is currently joined to an availability group. Before you can drop the database, you need to remove it from the availability group. You have to SET HADR OFF before issuing a drop database.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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