Share via


Sync Groups - List Logs

Gets a collection of sync group logs.

GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs?startTime={startTime}&endTime={endTime}&type={type}&api-version=2023-08-01
GET https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Sql/servers/{serverName}/databases/{databaseName}/syncGroups/{syncGroupName}/logs?startTime={startTime}&endTime={endTime}&type={type}&continuationToken={continuationToken}&api-version=2023-08-01

URI Parameters

Name In Required Type Description
databaseName
path True

string

The name of the database on which the sync group is hosted.

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.

subscriptionId
path True

string

The subscription ID that identifies an Azure subscription.

syncGroupName
path True

string

The name of the sync group.

api-version
query True

string

The API version to use for the request.

endTime
query True

string

Get logs generated before this time.

startTime
query True

string

Get logs generated after this time.

type
query True

SyncGroupsType

The types of logs to retrieve.

continuationToken
query

string

The continuation token for this operation.

Responses

Name Type Description
200 OK

SyncGroupLogListResult

Successfully retrieved sync group logs.

Other Status Codes

ErrorResponse

*** 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 InvalidSyncGroupName - The Sync Group name is invalid. This field can contain letters, numbers, dashes and underscores.

  • 400 InvalidSyncMemberName - The Sync Member name is invalid. This field can contain letters, numbers, dashes and underscores.

  • 400 MissingSyncMemberName - The Sync Member name is missing

  • 400 InvalidSyncGroupInterval - Sync Interval should be greater than or equal to 5 seconds.

  • 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 InvalidSyncGroup - Sync group is invalid.

  • 400 FeatureDisabledOnSelectedEdition - User attempted to use a feature which is disabled on current database edition.

  • 400 CannotCreateSyncGroupDueToQuotaExceeded - Cannot create sync group due to quota exceeded.

  • 400 SyncOperation_DuplicateSyncGroupDrop - The sync group is already being dropped.

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

  • 400 SyncOperation_UpdateSyncGroupWhenDropping - Cannot update the sync group because it is currently being dropped.

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

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

  • 400 SyncOperation_UnsupportedDataTypeColumnInSchema - Cannot add column to schema because the data type of the column is unsupported.

  • 400 SyncOperation_InvalidCredential - Credential of database is invalid.

  • 400 InvalidSyncMetadataDatabase - Sync metadata database is invalid.

  • 400 SyncOperation_InvalidSyncInterval - Cannot create or update sync group because the sync interval 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.

  • 404 SyncOperation_HubServerNotFound - Hub logical server does not exist.

  • 404 SyncOperation_InvalidHubDatabase - Hub database is invalid.

  • 409 SyncOperation_DuplicateSyncGroupName - Cannot create sync group because the sync group with the same name already exists.

Examples

Get sync group logs

Sample request

GET https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/syncgroupcrud-65440/providers/Microsoft.Sql/servers/syncgroupcrud-8475/databases/syncgroupcrud-4328/syncGroups/syncgroupcrud-3187/logs?startTime=2017-01-01T00:00:00&endTime=2017-12-31T00:00:00&type=All&api-version=2023-08-01

Sample response

{
  "value": [
    {
      "timestamp": "2017-05-30T07:16:08.25Z",
      "type": "Success",
      "source": "syncgroupcrud-8475.database.windows.net/hub",
      "details": "Schema information obtained successfully.",
      "tracingId": "c0480c8e-6269-424e-9404-b00efce0ebae",
      "operationStatus": "SchemaRefreshSuccess"
    },
    {
      "timestamp": "2017-05-30T07:03:37.5733333Z",
      "type": "Error",
      "source": "syncgroupcrud-8475.database.windows.net/member",
      "details": "Getting schema information for the database failed with the exception \"Failed to connect to server .\nInner exception: SqlException Error Code: -2146232060 - SqlError Number:53, Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) \nInner exception: The network path was not found\n For more information, provide tracing ID ‘cd3aa28c-0c31-471f-8a77-f1b21c908cbd’ to customer support.\"",
      "tracingId": "cd3aa28c-0c31-471f-8a77-f1b21c908cbd",
      "operationStatus": "SchemaRefreshFailure"
    }
  ]
}

Definitions

Name Description
ErrorAdditionalInfo

The resource management error additional info.

ErrorDetail

The error detail.

ErrorResponse

Error response

SyncGroupLogListResult

A list of sync group log properties.

SyncGroupLogProperties

Properties of an Azure SQL Database sync group log.

SyncGroupLogType

Type of the sync group log.

SyncGroupsType

The types of logs to retrieve.

ErrorAdditionalInfo

The resource management error additional info.

Name Type Description
info

object

The additional info.

type

string

The additional info type.

ErrorDetail

The error detail.

Name Type Description
additionalInfo

ErrorAdditionalInfo[]

The error additional info.

code

string

The error code.

details

ErrorDetail[]

The error details.

message

string

The error message.

target

string

The error target.

ErrorResponse

Error response

Name Type Description
error

ErrorDetail

The error object.

SyncGroupLogListResult

A list of sync group log properties.

Name Type Description
nextLink

string

Link to retrieve next page of results.

value

SyncGroupLogProperties[]

Array of results.

SyncGroupLogProperties

Properties of an Azure SQL Database sync group log.

Name Type Description
details

string

Details of the sync group log.

operationStatus

string

OperationStatus of the sync group log.

source

string

Source of the sync group log.

timestamp

string (date-time)

Timestamp of the sync group log.

tracingId

string (uuid)

TracingId of the sync group log.

type

SyncGroupLogType

Type of the sync group log.

SyncGroupLogType

Type of the sync group log.

Value Description
All
Error
Warning
Success

SyncGroupsType

The types of logs to retrieve.

Value Description
All
Error
Warning
Success