Azure / Azure/azure-powershell

Cmdlets ralated to SqlServerDisasterRecoveryConfiguration say "deprecated" when running.

Open
#16,838 3 comments 0 reactions 0 assignees View on GitHub
act-observability-squad question Service Attention SQL - Backup & Restore
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
2d 17h
Merged PRs (30d)
51

Description

### Description

Cmdlets ralated to SqlServerDisasterRecoveryConfiguration say "40956: The Server Disaster Recovery Configuration feature is deprecated. Please use Failover Group instead". These cmdlets are:

"Set-AzSqlServerDisasterRecoveryConfiguration",
"Get-AzSqlServerDisasterRecoveryConfiguration",
"New-AzSqlServerDisasterRecoveryConfiguration",
"Remove-AzSqlServerDisasterRecoveryConfiguration",
"Get-AzSqlServerDisasterRecoveryConfigurationActivity".

### Script or Debug output

```PowerShell
PS> New-AzSqlServerDisasterRecoveryConfiguration -ResourceGroupName ziyuerg -ServerName ziyueserver1 -VirtualEndpointName ziyueendpoint -PartnerResourceGroupName ziyuerg -PartnerServerName ziyueserver2

DEBUG: 6:14:23 PM - NewAzureSqlServerDisasterRecoveryConfiguration begin processing with ParameterSet '__AllParameterSets'.
DEBUG: 6:14:23 PM - using account id 'xxx@xxx.com'...
DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
GET

Absolute Uri:
https://management.azure.com/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ziyuerg/providers/Microsoft.Sql/servers/ziyueserver1/disasterRecoveryConfiguration?api-version=2014-04-01

Headers:

Body:

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
NotFound

Headers:
Cache-Control : no-store, no-cache
x-ms-request-id : f9a2e819-f650-464c-ba11-4967e335fb1b
X-Content-Type-Options : nosniff
DataServiceVersion : 3.0;
Strict-Transport-Security : max-age=31536000; includeSubDomains
Server : Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-reads: 11999
x-ms-correlation-request-id : 08a8e72a-a952-4371-9b14-56a34697a6e2
x-ms-routing-request-id : EASTASIA:20220114T101425Z:08a8e72a-a952-4371-9b14-56a34697a6e2
Date : Fri, 14 Jan 2022 10:14:25 GMT

Body:
{
"code": "NotFound",
"message": "Disaster Recovery Configuration with name '' does not exist. To continue, specify a valid DisasterRecoveryConfiguration name.",
"target": null,
"details": [],
"innererror": []
}

DEBUG: ============================ HTTP REQUEST ============================

HTTP Method:
PUT

Absolute Uri:
https://management.azure.com/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ziyuerg/providers/Microsoft.Sql/servers/ziyueserver1/disasterRecoveryConfiguration/ziyueendpoint?api-version=2014-04-01

Headers:

Body:
{
"properties": {
"partnerServerId": "/subscriptions/11111111-1111-1111-1111-111111111111/resourceGroups/ziyuerg/providers/Microsoft.Sql/servers/ziyueserver2"
},
"location": "",
"tags": {}
}

DEBUG: ============================ HTTP RESPONSE ============================

Status Code:
BadRequest

Headers:
Cache-Control : no-store, no-cache
x-ms-request-id : 5f0bde87-06c5-41a1-aa78-ec118b155983
X-Content-Type-Options : nosniff
Preference-Applied : return-content
DataServiceVersion : 3.0;
Strict-Transport-Security : max-age=31536000; includeSubDomains
Server : Microsoft-HTTPAPI/2.0
x-ms-ratelimit-remaining-subscription-writes: 1199
x-ms-correlation-request-id : 75184d3f-0003-4e70-9d34-20670eca2e26
x-ms-routing-request-id : EASTASIA:20220114T101426Z:75184d3f-0003-4e70-9d34-20670eca2e26
Date : Fri, 14 Jan 2022 10:14:25 GMT

Body:
{
"code": "40956",
"message": "The Server Disaster Recovery Configuration feature is deprecated. Please use Failover Group instead.",
"target": null,
"details": [
{
"code": "40956",
"message": "The Server Disaster Recovery Configuration feature is deprecated. Please use Failover Group instead.",
"target": null,
"severity": "16"
}
],
"innererror": []
}

New-AzSqlServerDisasterRecoveryConfiguration: 40956: The Server Disaster Recovery Configuration feature is deprecated. Please use Failover Group instead.
DEBUG: AzureQoSEvent: Module: Az.Sql:3.6.0; CommandName: New-AzSqlServerDisasterRecoveryConfiguration; PSVersion: 7.2.1; IsSuccess: False; Duration: 00:00:03.1523639; Exception: 40956: The Server Disaster Recovery Configuration feature is deprecated. Please use Failover Group instead.;
DEBUG: Finish sending metric.
DEBUG: 6:14:31 PM - NewAzureSqlServerDisasterRecoveryConfiguration end processing.
```

### Environment data

```PowerShell
Name Value
---- -----
PSVersion 7.2.1
PSEdition Core
GitCommitId 7.2.1
OS Microsoft Windows 10.0.19044
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
```

### Module versions

```PowerShell
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 7.0.0 az
Script 3.6.0 Az.Sql {Add-AzSqlDatabaseToFailoverGroup, Add-AzSqlElasticJobStep, Add-AzSqlElasticJobTarget, Add-AzSqlInstanceKeyVaultKey…}
```

### Error output

```PowerShell
Resolve-AzError: Input string was not in a correct format.
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the New-AzSqlServerDisasterRecoveryConfiguration command from the report, then inspect the five listed SqlServerDisasterRecoveryConfiguration cmdlets and their Azure SQL API requests. Check how the deprecated-service response is handled across each cmdlet; done means the intended behavior for all five commands is established and covered by appropriate verification.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, powershell
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.