Created
March 3, 2017 07:07
-
-
Save melvinlee/54a917a1c04c3454c8e3c6c91e95b403 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Remove database from Availability Group: | |
Alter Database [StackExchange.Bicycles.Meta] SET HADR OFF; | |
-- Apply t-logs to catch up. This can be done manually in SSMS or via: | |
RESTORE LOG [StackExchange.Bicycles.Meta] FROM DISK = '\\ny-back01\backups\SQL\_Trans\SENetwork_AG\StackExchange.Bicycles.Meta\StackExchange.Bicycles.Meta_LOG_20160217_033201.trn' WITH NORECOVERY; | |
-- Re-join database to availability group | |
ALTER DATABASE [StackExchange.Bicycles.Meta] SET HADR AVAILABILITY GROUP = [SENetwork_AG]; | |
ALTER DATABASE [StackExchange.Bicycles.Meta] SET HADR RESUME; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment