Cannot copy a source database in an elastic pool to another server with no elastic pool
See original GitHub issueI need to copy a SQL Database in an elastic pool on one server to another server without an elastic pool. However, the following code fails, noting that the elastic pool name of the source database does not exist on the target server.
let copyDatabase =
targetSqlServer.Databases.Define(target.Name)
//.WithServiceObjective("P1") // Using 1.4.0
//.WithStandardEdition(SqlDatabasePremiumServiceObjective.P1) // Using 1.8.0
.WithSourceDatabase(sourceDatabase)
.WithMode(CreateMode.Copy)
.Create()
As you can see above, I tried to work around this by using the WithStandardEdition
(also tried the WithServiceObjective
) method. However, these return an interface that is not compatible with then specifying a source database. New-AzureRmSqlDatabaseCopy
allows specifying either a target service objective or elastic pool, so I expected the .NET Azure libraries would allow this as well.
This issue exists in versions 1.4.0 and 1.8.0.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Manage multiple databases with elastic pools - Azure SQL ...
Create a new SQL Database elastic pool by using the Azure portal · Go to the Azure portal to create an elastic pool....
Read more >Can't copy a SQL database from Azure portal - Microsoft Q&A
Hi, I'd like to copy a SQL database to create another with the same ... As you can see, the copied database will...
Read more >Error when trying to copy a database from an elastic pool ...
This works for every other database I try and copy but returns this error when I try and do it for database stored...
Read more >Four different methods to copy your Azure SQL database
Type in the database name; Target server; Choose “Yes” if you want to host it in the elastic database pool. If not, leave...
Read more >Deploy Azure SQL Elastic Pools for Azure SQL Database
Suppose you have an existing database in Azure SQL Server that is not part of the elastic pool. You can add that database...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @panesofglass the Azure SQL management service is inconsistent in regards to when setting a service objective while copying a database is allowed and when is not. I was able to successfully copy a SQL database within a premium Elastic Pool to a different SQL server also setting the service objective if the Elastic Pool edition is Premium. Any other edition settings seems to trigger a service error when invoking the createOrUpdate(). Having this inconsistency makes it difficult to model it in the Fluent .NET SDK. I can suggest an work around for now while I will try to see what can be done for v1.9:
Hello, is there any known compatibility issue between database in elastic pools and standalone server? I have issue when migrating one database in that way and it fails when updating.
Here is description: https://github.com/MicrosoftDocs/azure-docs/issues/51784