Remove-SqlAvailabilityDatabase ` -Path SQLSERVER:\Sql\SecondaryComputer\InstanceName\AvailabilityGroups\MyAg\Databases\MyDb
Unfortunately that wasn't the path to my DB (and yes, before you say 'did you change the parameters'...yes....yes I did).
So anyways, to make a long story shorter, to find the path to your AG database, open up SSMS, expand AlwaysOn High Availability > Availability Groups > <your group> and right-click on your database, choosing Start Powershell. The prompt in the window that opens is the path to your database! So copy that and try the PoSH command Remove-SqlAvailabilityDatabase again and it'll work.
I'll probably post my automated restore solution when I'm done but wanted to get this off my chest.
No comments:
Post a Comment