Skip to main content

sync_members

Creates, updates, deletes, gets or lists a sync_members resource.

Overview

Namesync_members
TypeResource
Idazure.sql.sync_members

Fields

NameDatatypeDescription
databaseNametextfield from the properties object
database_nametextfield from the properties object
database_typetextfield from the properties object
passwordtextfield from the properties object
private_endpoint_nametextfield from the properties object
resourceGroupNametextfield from the properties object
serverNametextfield from the properties object
server_nametextfield from the properties object
sql_server_database_idtextfield from the properties object
subscriptionIdtextfield from the properties object
syncGroupNametextfield from the properties object
syncMemberNametextfield from the properties object
sync_agent_idtextfield from the properties object
sync_directiontextfield from the properties object
sync_member_azure_database_resource_idtextfield from the properties object
sync_statetextfield from the properties object
use_private_link_connectiontextfield from the properties object
user_nametextfield from the properties object

Methods

NameAccessible byRequired ParamsDescription
getSELECTdatabaseName, resourceGroupName, serverName, subscriptionId, syncGroupName, syncMemberNameGets a sync member.
list_by_sync_groupSELECTdatabaseName, resourceGroupName, serverName, subscriptionId, syncGroupNameLists sync members in the given sync group.
create_or_updateINSERTdatabaseName, resourceGroupName, serverName, subscriptionId, syncGroupName, syncMemberNameCreates or updates a sync member.
deleteDELETEdatabaseName, resourceGroupName, serverName, subscriptionId, syncGroupName, syncMemberNameDeletes a sync member.
updateUPDATEdatabaseName, resourceGroupName, serverName, subscriptionId, syncGroupName, syncMemberNameUpdates an existing sync member.
refresh_member_schemaEXECdatabaseName, resourceGroupName, serverName, subscriptionId, syncGroupName, syncMemberNameRefreshes a sync member database schema.

SELECT examples

Lists sync members in the given sync group.

SELECT
databaseName,
database_name,
database_type,
password,
private_endpoint_name,
resourceGroupName,
serverName,
server_name,
sql_server_database_id,
subscriptionId,
syncGroupName,
syncMemberName,
sync_agent_id,
sync_direction,
sync_member_azure_database_resource_id,
sync_state,
use_private_link_connection,
user_name
FROM azure.sql.vw_sync_members
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND syncGroupName = '{{ syncGroupName }}';

INSERT example

Use the following StackQL query and manifest file to create a new sync_members resource.

/*+ create */
INSERT INTO azure.sql.sync_members (
databaseName,
resourceGroupName,
serverName,
subscriptionId,
syncGroupName,
syncMemberName,
properties
)
SELECT
'{{ databaseName }}',
'{{ resourceGroupName }}',
'{{ serverName }}',
'{{ subscriptionId }}',
'{{ syncGroupName }}',
'{{ syncMemberName }}',
'{{ properties }}'
;

UPDATE example

Updates a sync_members resource.

/*+ update */
UPDATE azure.sql.sync_members
SET
properties = '{{ properties }}'
WHERE
databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND syncGroupName = '{{ syncGroupName }}'
AND syncMemberName = '{{ syncMemberName }}';

DELETE example

Deletes the specified sync_members resource.

/*+ delete */
DELETE FROM azure.sql.sync_members
WHERE databaseName = '{{ databaseName }}'
AND resourceGroupName = '{{ resourceGroupName }}'
AND serverName = '{{ serverName }}'
AND subscriptionId = '{{ subscriptionId }}'
AND syncGroupName = '{{ syncGroupName }}'
AND syncMemberName = '{{ syncMemberName }}';