New-​Azure​Rm​Sql​Sync​Agent

Creates an Azure SQL Sync Agent.

Syntax

New-AzureRmSqlSyncAgent
   [-ResourceGroupName] <String>
   [-ServerName] <String>
   [-Name] <String>
   [-Confirm]
   -SyncDatabaseName <String>
   [-SyncDatabaseResourceGroupName <String>]
   [-SyncDatabaseServerName <String>]
   [-WhatIf]
New-AzureRmSqlSyncAgent
   [-ResourceGroupName] <String>
   [-ServerName] <String>
   [-Name] <String>
   [-Confirm]
   -SyncDatabaseResourceID <String>
   [-WhatIf]

Description

The New-AzureRmSqlSyncAgent cmdlet creates an Azure SQL Sync Agent.

Examples

Example 1: Create a sync agent for an Azure SQL server.

PS C:\> New-AzureRmSqlSyncAgent -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -Name "SyncAgent01" -SyncDatabaseServerName "syncDatabaseServer01" 
-SyncDatabaseName "syncDatabaseName01" -SyncDatabaseResourceGroupName "syncDatabaseResourceGroup01" | Format-List
ResourceId                  : subscriptions/{subscriptionId}/resourceGroups/{ResourceGroup01}/servers/{Server01}/syncAgents/{SyncAgent01}
ResourceGroupName           : ResourceGroup01
ServerName                  : Server01
DatabaseName                : Database01
SyncAgentName               : SyncAgent01
SyncDatabaseId              : subscriptions/{subscriptionId}/resourceGroups/{syncDatabaseResourceGroup01}/servers/{syncDatabaseServer01}/databases/{syncDatabaseName01}
LastAliveTime:              : 
Version                     : 4.2.0.0
IsUpToDate                  : True
ExpiryTime                  : 12/31/9999 11:59:59 PM
State                       : NeverConnected

This command creates a sync agent for an Azure SQL server.

Required Parameters

-Name

The sync agent name.

Type:String
Aliases:SyncAgentName
Position:2
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ResourceGroupName

The name of the resource group.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-ServerName

The name of the Azure SQL Server the sync agent is in.

Type:String
Position:1
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False
-SyncDatabaseName

The database used to store sync related metadata.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SyncDatabaseResourceID

The resource ID of the sync metadata database.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SyncDatabaseResourceGroupName

The resource group the sync metadata database belongs to.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SyncDatabaseServerName

The server on which the sync metadata database is hosted.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.Sql.DataSync.Model.AzureSqlSyncAgentModel