Azure / azure-libraries-for-net

Azure libraries for .Net
MIT License
377 stars 190 forks source link

Unable to copy an elastic pool database into an S1/Standard (with S1 allowed maxsizebytes) with createmode="copy" #1303

Open vinathar opened 2 years ago

vinathar commented 2 years ago

PREMISE: Server 1: Has an elastic pool Server 2: No elastic pool (Do NOT want to have an elastic pool)

Original Database: -- On server 1 -- database is on elastic pool -- MaxSizeBytes = 34359738368 (32 GB)

TASK: Trying to create a copy of original database into Server 2 with following properties: -- S1/Standard tier -- MaxSizeBytes = 268435456000 (250 GB) -- CreateMode = "Copy" -- SourceDatabaseId = Original Database.Body.Id

Performing this using Azure API "BeginCreateOrUpdateWithHttpMessagesAsync()"

ERROR/ISSUE: "The tier 'Standard' does not support the database max size '34359738368' (32 GB)". This means that it is not updating the MaxSizeBytes on the copy database to 268435456000.

NOTE 1: I am able to create this copy IF I don't set the CreateMode to "Copy" and don't set the SourceDatabaseId. But not setting these values creates an empty copy (without data) which defeats the whole purpose of a copy.

NOTE 2: I do NOT want to have an elastic pool on Server 2, and do NOT want to convert original database to an S1/Standard either.

What are my options and/or workarounds?

weidongxu-microsoft commented 2 years ago

The lib is in maintenance. Please plan switch to https://aka.ms/azsdk/dotnet/mgmt