sys.dm_database_copies (Azure SQL Database)
Updated: June 10, 2016
Returns information about the database copy.
|Column Name||Data Type||Description|
|database_id||int||The ID of the current database in the |
|start_date||datetimeoffset||The UTC time at a regional SQL Database datacenter when the database copying was initiated.|
|modify_date||datetimeoffset||The UTC time at regional SQL Database datacenter when the database copying has completed. The new database is transactionally consistent with the primary database as of this time. The completion information is updated every 1 minute.|
UTC time reflecting the last update of the percent_complete field.
|percent_complete||real||The percentage of bytes that have been copied. Values range from 0 to 100. SQL Database may automatically recover from some errors, such as failover, and restart the database copy. In this case, percent_complete would restart from 0.|
|error_code||int||When greater than 0, the code indicating the error that has occurred while copying. Value equals 0 if no errors have occurred.|
|error_desc||nvarchar(4096)||Description of the error that occurred while copying.|
|error_severity||int||Returns 16 if the database copy failed.|
|error_state||int||Returns 1 if copy failed.|
|copy_guid||uniqueidentifier||Unique ID of the copy operation.|
|partner_server||sysname||Name of the SQL Database server where the copy is created.|
|partner_database||sysname||Name of the database copy on the partner server.|
|replication_state||tinyint||The state of continuous-copy replication for this database. Values are:|
0=Pending. Creation of the database copy is scheduled but the necessary preparation steps are not yet completed or are temporarily blocked by the seeding quota.
1=Seeding. The copy database being seeded is not yet fully synchronized with the source database. In this state you cannot connect to the copy. To cancel the seeding operation in progress, the copy database must be dropped.
|replication_state_desc||nvarchar(256)||Description of replication_state, one of:|
|is_continuous_copy||bit||0 = Returns 0|
|is_target_role||bit||0 =Source database|
1 = Copy database
This view is only available in the master database to the server-level principal login.
You can use the sys.dm_database_copies view in the master database of the source or target SQL Database server. When the database copy completes successfully and the new database becomes ONLINE, the row in the sys.dm_database_copies view is removed automatically.