Sync Agents - List Linked Databases

Lists databases linked to a sync agent.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/syncAgents/{syncAgentName}/linkedDatabases?api-version=2021-11-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal.

serverName
path True

string

The name of the server on which the sync agent is hosted.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

syncAgentName
path True

string

The name of the sync agent.

api-version
query True

string

The API version to use for the request.

Responses

Name Type Description
200 OK

SyncAgentLinkedDatabaseListResult

Successfully retrieved sync agent linked SQL server databases.

Other Status Codes

*** Error Responses: ***

  • 400 InvalidSyncGroupCreateOrUpdateRequest - The create or update sync group request body is empty.

  • 400 InvalidSyncMemberCreateOrUpdateRequest - The create or update sync member request body is empty.

  • 400 InvalidSyncAgentCreateOrUpdateRequest - The create or update sync agent request body is empty.

  • 400 InvalidDatabaseResourceId - Invalid database resource identifier.

  • 400 MismatchingSubscriptionWithUrl - The provided subscription did not match the subscription in the Url.

  • 400 InvalidSyncAgentResourceId - Invalid sync agent resource identifier.

  • 400 MismatchingResourceGroupNameWithUrl - The provided resource group name did not match the name in the Url.

  • 400 MismatchingServerNameWithUrl - The provided server name did not match the name in the Url.

  • 400 InvalidParameterValue - An invalid value was given to a parameter.

  • 400 MissingServerName - The Server name is missing

  • 400 MissingDatabaseName - The Database name is missing

  • 400 MissingSyncGroupName - The Sync Group name is missing

  • 400 MissingConflictResolutionPolicy - The Conflict Resolution Policy is missing

  • 400 MissingSyncAgentName - The Sync Agent name is missing

  • 400 SyncOperation_GenericFailure - Failed to perform data sync operation.

  • 400 SyncOperation_WrongSyncDatabase - The sync database specified does not match the existing one.

  • 400 SyncOperation_DwInSyncGroup - Cannot use datawarehouse edition in data sync.

  • 400 SyncOperation_MasterDbInSyncGroup - Cannot use logical master in data sync.

  • 400 CannotDeleteInUseSyncAgent - Cannot delete sync agent because it is used by sync member.

  • 400 InvalidSyncAgent - Sync agent is invalid.

  • 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.

  • 404 ResourceNotFound - The requested resource was not found.

  • 404 SubscriptionDoesNotHaveServer - The requested server was not found

  • 404 DatabaseDoesNotExist - User has specified a database name that does not exist on this server instance.

  • 409 SyncOperation_AgentAlreadyExists - The sync agent with the same name already exists.

  • 409 SyncOperation_AgentIdAlreadyExists - The sync agent with the same id already exists.

Examples

Get sync agent linked databases

Sample request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncagentcrud-65440/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187/linkedDatabases?api-version=2021-11-01

Sample response

{
  "value": [
    {
      "properties": {
        "databaseType": "SqlServerDatabase",
        "databaseId": "55555555-6666-7777-8888-999999999999",
        "description": "",
        "serverName": "DummySqlServer",
        "databaseName": "DummySqlServerDb",
        "userName": "DummyUser"
      },
      "id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/Default-SQL-Onebox/providers/Microsoft.Sql/servers/syncagentcrud-8475/syncAgents/syncagentcrud-3187/linkedDatabases/55555555-6666-7777-8888-999999999999"
    }
  ]
}

Definitions

Name Description
SyncAgentLinkedDatabase

An Azure SQL Database sync agent linked database.

SyncAgentLinkedDatabaseListResult

A list of sync agent linked databases.

SyncMemberDbType

Type of the sync agent linked database.

SyncAgentLinkedDatabase

An Azure SQL Database sync agent linked database.

Name Type Description
id

string

Resource ID.

name

string

Resource name.

properties.databaseId

string

Id of the sync agent linked database.

properties.databaseName

string

Database name of the sync agent linked database.

properties.databaseType

SyncMemberDbType

Type of the sync agent linked database.

properties.description

string

Description of the sync agent linked database.

properties.serverName

string

Server name of the sync agent linked database.

properties.userName

string

User name of the sync agent linked database.

type

string

Resource type.

SyncAgentLinkedDatabaseListResult

A list of sync agent linked databases.

Name Type Description
nextLink

string

Link to retrieve next page of results.

value

SyncAgentLinkedDatabase[]

Array of results.

SyncMemberDbType

Type of the sync agent linked database.

Name Type Description
AzureSqlDatabase

string

SqlServerDatabase

string