Skip to content

Commit 9901e21

Browse files
authored
fixed Disable SQL AG AutoProtection (#15241)
1 parent 8542248 commit 9901e21

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/RecoveryServices/RecoveryServices.Backup/Cmdlets/Item/DisableAzureRmRecoveryServicesBackupAutoProtection.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,10 @@ public override void ExecuteCmdlet()
123123
containerNameResponse = HelperUtils.GetContainerUri(
124124
keyValueDictResponse, itemResponse.Properties.ItemId);
125125

126-
if (String.Compare(itemNameResponse, itemName, true) == 0 &&
127-
String.Compare(containerUri.Split(';')[3], containerNameResponse.Split(';')[2], true) == 0)
128-
{
126+
if((String.Compare(itemNameResponse, itemName, true) == 0) &&
127+
((itemType.Contains("sqlavailabilitygroup") && String.Compare(containerUri.Split(';')[1], containerNameResponse, true) == 0)
128+
|| (String.Compare(containerUri.Split(';')[3], containerNameResponse.Split(';')[2], true) == 0)))
129+
{
129130
intentName = itemResponse.Name;
130131
break;
131132
}

src/RecoveryServices/RecoveryServices/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Fixed Disable SQL AG AutoProtection.
2122
* Added cross tenant DS Move.
2223
* Removed restriction to fetch recovery points only for a 30 days time range.
2324
* Enabled CRR for new regions.

0 commit comments

Comments
 (0)