Get Database Copy (classic)

 

Updated: October 5, 2016

THIS TOPIC APPLIES TO: noSQL Server yesAzure SQL DatabaseyesAzure SQL Data Warehouse noParallel Data Warehouse

Gets details for an Azure SQL Database copy.

This command uses the classic deployment model. You should use the newer Resource Manager based REST API commands located here. For more information, see Azure Resource Manager vs. classic deployment: Understand deployment models and the state of your resources.

The Get Database Copy request must be specified as follows:

MethodRequest URIHTTP Version
GEThttps://management.core.windows.net:8443/{subscriptionId}/services/sqlservers/servers/{serverName}/databases/{databaseName}/databasecopies/{linkID}HTTP/1.1

URI Parameters

None.

Request Headers

The following table describes the required and optional request headers:

Request HeaderDescription
x-ms-versionRequired. Specifies the version of the operation to use for this request. This header should be set to 2012-03-01.

Request Body

None.

The response includes an HTTP status code, a set of response headers, and a response body.

Status Code

Response Headers

The response for this operation includes the following headers. The response may also include additional standard HTTP headers. All standard headers conform to the HTTP/1.1 protocol specification.

Response HeaderDescription
x-ms-request-idA value that uniquely identifies a request made against the database management service. This request id is used for request tracking. If a failure occurs that requires the user to contact Microsoft Support, the request id should be provided to Microsoft to assist in tracking and resolving the failure for the request.

Response Body

The following is an example response body:

<ServiceResource xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">  
  <Name>2255b737-2539-45ac-a2fc-722e570f754e</Name>  
  <Type>Microsoft.SqlAzure.DatabaseCopy</Type>  
  <State>Normal</State>  
  <SelfLink>https://management.core.windows.net/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cjxrvozmbh/databases/dbtest1/databasecopies/2255b737-2539-45ac-a2fc-722e570f754e</SelfLink>  
  <ParentLink>https://management.core.windows.net/00000000-0000-0000-0001-000000000001/services/sqlservers/servers/cjxrvozmbh/databases/dbtest1</ParentLink>  
  <SourceServerName>cjxrvozmbh</SourceServerName>  
  <SourceDatabaseName>dbtest1</SourceDatabaseName>  
  <DestinationServerName>muez4w94zn</DestinationServerName>  
  <DestinationDatabaseName>dbtest1</DestinationDatabaseName>  
  <IsContinuous>True</IsContinuous>  
  <IsOfflineSecondary>True</IsOfflineSecondary >  
  <IsTerminationAllowed>False</IsTerminationAllowed>  
  <StartDate>2014-04-08T22:29:25.2530000Z</StartDate>  
  <ModifyDate>2014-04-08T22:29:25.2530000Z</ModifyDate>  
  <PercentComplete>0</PercentComplete>  
  <ReplicationState>0</ReplicationState>  
  <ReplicationStateDescription>PENDING</ReplicationStateDescription>  
  <LocalDatabaseId>5</LocalDatabaseId>  
  <IsLocalDatabaseReplicationTarget>False</IsLocalDatabaseReplicationTarget>  
  <IsInterlinkConnected>True</IsInterlinkConnected>  
</ServiceResource>  

The following table describes the elements in the response body:

NameThe link ID for the database copy. This is the same as the link ID in sys.dm_database_copies. It is a GUID which is used in the resource paths for the Get Database Copy, Update Database Copy, and Stop Database Copy requests.
TypeThe server-side type of the database copy.
StateDescribes the state of the resource. The value is always Normal for database copies.
SelfLinkThe URI to the database copy.
ParentLinkLink to the parent resource.
SourceServerNameThe server that is the source for the copy.
SourceDatabaseNameThe database that is the source for the copy.
DestinationServerNameThe server that is the destination for the copy.
DestinationDatabaseNameThe database that is the destination for the copy.
IsContinuousSpecifies that the copy is a continuous copy.
IsOfflineSecondaryWhen True, specifies that the copy should be a passive continuous copy.
IsTerminationAllowedWhen True, specifies that the passive continuous copy has permission to failover.
StartDateThe time the copy was started.
ModifyDateThe time the copy was last modified.
PercentCompletePercent complete of the copy. For continuous copies, this only applies to the SEEDING (initial copy) phase.
ReplicationStateAn integer representing the replication state of the database. Possible values are:

- 0: PENDING (the copy hasn't started yet)
- 1: SEEDING (the initial copy is in progress)
- 2: CATCH_UP (for continuous copies, indicates that the initial copy is complete and asynchronous commits are being propagated to the target)
- 4: TERMINATED

Other values (like 3) are possible. The corresponding ReplicationStateDescription would be NULL).

The meaning of these values will not change in future releases.
ReplicationStateDescriptionThe string description for the ReplicationState (see ReplicationState).
LocalDatabaseIdThe ID of the local database (the same as the id in sys.databases). If the resource path for the request is to the source database, this will be the ID of the source databases. If the resource path for the request is to the target database, this will be the ID of the target database.
IsLocalDatabaseReplicationTargetWhether or not the local database (see LocalDatabaseId) is the target for the copy.
IsInterlinkConnectedIf the database copy is interlink connected.

Common REST API Error Codes
Azure SQL Database
Operations for Azure SQL Databases
Copying Databases in Azure SQL Database
Geo-Replication in Azure SQL Database
Get-AzureSqlDatabaseCopy

Show: