Database copy provides a way to create a transactionally consistent snapshot of the source database as a new database on the same server or different server. It also enables copy across regions, subscriptions, and Azure tenants using the same or different service level objective.
On Azure SQL Hyperscale the time taken by database copy depends on the source and destination chosen for the copy
Below are some sample durations for database copy in Hyperscale:
Database size |
Source region |
Destination region |
Elapsed time (mins) |
1TB |
West US 2 |
Central US |
180 |
1 TB |
West US 2 |
West US 2 |
12 |
7.2TB |
West US 2 |
Central US |
269 |
7.2TB |
West US 2 |
West US 2 |
13 |
Database copy can be created started with PowerShell, Azure CLI, REST API, or T-SQL. Cross subscription and cross tenant copy is only supported using T-SQL. If you do not specify a service objective for the target database, the default service objective and configurations are used, which is HS_Gen5_2 with 1 additional replica which can be used for reads.
az sql db copy --resource-group "sourceRG" --server sourceServer --name "sourceDB" --dest-resource-group destDB --dest-server destServer --dest-name destDB --service-objective HS_Gen5_2 --read-replicas 0
New-AzSqlDatabaseCopy -ResourceGroupName "sourceRG" -ServerName sourceServer `-DatabaseName "sourceDB" `
-CopyResourceGroupName "destinationRG" -CopyServerName destServer -CopyDatabaseName "destDB"
CREATE DATABASE Database2 AS COPY OF SourceServer.Database1;
Another way to copy the database is via the Azure portal.
In the master database:
select * from sys.dm_operation_status
GO
Note: the progress status values are limited to 0/50/100%.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.