400 LedgerNoDropPrimary - 데이터베이스에 원장 다이제스트 업로드가 활성화되어 있으므로 지역 주 데이터베이스를 삭제할 수 없습니다. 원장 다이제스트 업로드를 사용하지 않도록 설정하고 작업을 다시 시도합니다.
400 CannotMoveOrDropJobAccountDatabase - 작업 계정과 연결된 데이터베이스를 삭제할 수 없습니다.
400 ManagedInstanceStoppingOrStopped - 인스턴스가 중지/중지된 상태인 동안 제출된 충돌 작업
400 ManagedInstanceStarting - 인스턴스가 시작 상태에 있는 동안 제출된 충돌 작업
400 CannotDropDatabaseAKVError - 서버 {0} 데이터베이스 {1} 삭제하기 전에 더 이상 액세스할 수 없는 고객 관리형 키로 암호화되므로 안전하게 삭제할 수 없습니다. 서버에서 Azure Key Vault 액세스를 복원하고 키의 유효성을 다시 검사하여 이 데이터베이스에 액세스할 수 있도록 한 다음 삭제를 계속 진행하세요. 자세한 내용은 https://aka.ms/tdecmkrestorability 참조하세요.
400 CannotUseReservedDatabaseName - 이 작업에서 예약된 데이터베이스 이름을 사용할 수 없습니다.
400 CannotMoveOrDropSyncMetadataDatabase - 동기화 메타데이터 데이터베이스로 사용되는 데이터베이스를 삭제할 수 없습니다.
404 OperationIdNotFound - ID가 있는 작업이 없습니다.
404 ServerNotInSubscriptionResourceGroup - 지정된 서버가 지정된 리소스 그룹 및 구독에 없습니다.
404 ServerNotInSubscription - 지정된 서버가 지정된 구독에 없습니다.
409 CannotCancelOperation - 관리 작업이 취소할 수 없는 상태입니다.
409 OperationCancelled - 사용자가 작업을 취소했습니다.
409 OperationInterrupted - 동일한 리소스의 다른 작업에 의해 중단되었으므로 리소스에 대한 작업을 완료할 수 없습니다.
409 ConflictingServerOperation - 서버에 대한 작업이 현재 진행 중입니다.
409 ServerDisabled - 서버를 사용할 수 없습니다.
429 SubscriptionTooManyCreateUpdateRequests - 사용 가능한 리소스에서 처리할 수 있는 최대 요청을 초과하는 요청입니다.
429 SubscriptionTooManyRequests - 사용 가능한 리소스에서 처리할 수 있는 최대 요청을 초과하는 요청입니다.
500 OperationTimedOut - 작업 시간이 초과되고 자동으로 롤백됩니다. 작업을 다시 시도하세요.
503 TooManyRequests - 사용 가능한 리소스에서 처리할 수 있는 최대 요청을 초과하는 요청입니다.
503 TooManyRequests - 사용 가능한 리소스에서 처리할 수 있는 최대 요청을 초과하는 요청입니다.
using Azure;
using Azure.ResourceManager;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Identity;
using Azure.ResourceManager.Models;
using Azure.ResourceManager.Sql.Models;
using Azure.ResourceManager.Sql;
// Generated from example definition: specification/sql/resource-manager/Microsoft.Sql/stable/2023-08-01/examples/DeleteDatabase.json
// this example is just showing the usage of "Databases_Delete" operation, for the dependent resources, they will have to be created separately.
// get your azure access token, for more details of how Azure SDK get your access token, please refer to https://learn.microsoft.com/en-us/dotnet/azure/sdk/authentication?tabs=command-line
TokenCredential cred = new DefaultAzureCredential();
// authenticate your client
ArmClient client = new ArmClient(cred);
// this example assumes you already have this SqlDatabaseResource created on azure
// for more information of creating SqlDatabaseResource, please refer to the document of SqlDatabaseResource
string subscriptionId = "00000000-1111-2222-3333-444444444444";
string resourceGroupName = "Default-SQL-SouthEastAsia";
string serverName = "testsvr";
string databaseName = "testdb";
ResourceIdentifier sqlDatabaseResourceId = SqlDatabaseResource.CreateResourceIdentifier(subscriptionId, resourceGroupName, serverName, databaseName);
SqlDatabaseResource sqlDatabase = client.GetSqlDatabaseResource(sqlDatabaseResourceId);
// invoke the operation
await sqlDatabase.DeleteAsync(WaitUntil.Completed);
Console.WriteLine("Succeeded");