Reputation: 41
Could you please advise the PowerShell code which copies one database into another within the same elastic pool?
I was trying to use
Here is what I need:
Thank you very much for your help, in advance!!!
Upvotes: 0
Views: 1218
Reputation: 42153
I think New-AzureRmSqlDatabaseCopy
will work fine, if you want to copy the database within an elastic pool, the database and its copy should be in the same sql server.
You could try the command below, it works fine on my side.
New-AzureRmSqlDatabaseCopy -ResourceGroupName <ResourceGroupName> -ServerName <ServerName> -DatabaseName <databaseName of the db to be copied> -CopyDatabaseName <databaseName of the copy> -ElasticPoolName <ElasticPoolName>
Check in the portal:
Upvotes: 2