< Back

Get-AzureRmSqlSyncSchema

Tue Jan 29, 2019 10:09 pm

NAME Get-AzureRmSqlSyncSchema



SYNOPSIS

Returns information about the sync schema of a member database or a hub database.





SYNTAX

Get-AzureRmSqlSyncSchema [-ResourceGroupName] <String> [-ServerName] <String> [-DatabaseName] <String> [-SyncGroupName] <String> [-DefaultProfile

<IAzureContextContainer>] [-SyncMemberName <String>] [<CommonParameters>]





DESCRIPTION

The Get-AzureRmSqlSyncSchema cmdlet returns information about the sync schema of a member database or a hub database.





PARAMETERS

-DatabaseName <String>

The name of the Azure SQL Database.



Required? true

Position? 2

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-ResourceGroupName <String>

The name of the resource group.



Required? true

Position? 0

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ServerName <String>

The name of the Azure SQL Server.



Required? true

Position? 1

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SyncGroupName <String>

The sync group name.



Required? true

Position? 3

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-SyncMemberName <String>

The sync member name.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.Sql.DataSync.Model.AzureSqlSyncFullSchemaModel





Tables: Microsoft.Azure.Commands.Sql.DataSync.Model.AzureSqlSyncFullSchemaTableModel





Columns: Microsoft.Azure.Commands.Sql.DataSync.Model.AzureSqlSyncFullSchemaColumnModel







NOTES









Example 1.1: Get the sync schema for a hub database



PS C:\\>Get-AzureRmSqlSyncSchema -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "database01" -SyncGroupName "syncGroup01"

Tables LastUpdateTime

------ --------------

{dbo.Table_1, dbo.Table_2} 6/13/2017 10:03:44 AM



This command gets the sync schema for the hub database in the sync group syncGroup01.





Example 1.2: Get the sync schema for a hub database, and expand Tables



PS C:\\>Get-AzureRmSqlSyncSchema -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "database01" -SyncGroupName

"syncGroup01" | select -ExpandProperty Tables

Columns : {column1, column2}

ErrorId : Schema_TableHasNoPrimaryKey

HasError : True

Name : dbo.Table_1

QuotedName : [dbo].[Table_1]



Columns : {column2, column4}

ErrorId : Schema_TableHasNoPrimaryKey

HasError : True

Name : dbo.Table_2

QuotedName : [dbo].[Table_2]



This command gets the sync schema for the hub database in the sync group syncGroup01 and expand Tables property.





Example 2: Get the sync schema for a member database



PS C:\\>Get-AzureRmSqlSyncSchema -ResourceGroupName "ResourceGroup01" -ServerName "Server01" -DatabaseName "database01" -SyncGroupName

"syncGroup01" -SyncMemberName "syncMember01"

The schema payload is the same as Example 1.



This command gets the sync schema for the member database in the sync member syncMember01.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... syncschema