Remove Availability Group -Replica -Databases-Listener-

Dropping the Availability Group will removeĀ all associated objects .

1.Database (s) will be removed from AG databases

2.Listener will be deleted (object will be dropped from Active Directory).

3.Replicas will be removed from the AG group configuration

 

USE [master]
GO
DROP AVAILABILITY GROUP [AG Group Name]
GO

Dropping Availability Group

USE [master]
GO
ALTER AVAILABILITY GROUP [Availability Group Name]
REMOVE LISTENER N'ListenerName'
GO

Removing Database from Availability Group Databases

USE [master]
GO
ALTER AVAILABILITY GROUP [Availability Group Name]
REMOVE DATABASE [Database Name]
GO

Remove Replica from Availability Groups

USE [master]
GO
ALTER AVAILABILITY GROUP [Availability Group Name]
REMOVE REPLICA ON 'Replica Name'
GO

Leave a Reply

Your email address will not be published. Required fields are marked *