PowerShell - Sync between Azure SQL Database and on-premises database - Unable to find type AzureSqlSyncGroupSchemaTableModel RRS feed

  • Question

  • Hi ,

    i am trying to set up azure sync to other database using powers shell script and getting the error

    my code is below

    using namespace Microsoft.Azure.Commands.Sql.DataSync.Model
    using namespace System.Collections.Generic
    Write-Host "Adding tables and columns to the sync schema..."
    $databaseSchema = Get-AzSqlSyncSchema -ResourceGroupName "myresource" -ServerName "myservername" `
        -DatabaseName "mydatabase" -SyncGroupName "TestSync" `
    $databaseSchema | ConvertTo-Json -depth 5 -Compress | Out-File "syncSchema.json"
    $newSchema = [AzureSqlSyncGroupModel]::new() 
    $newSchema.Tables = [List[AzureSqlSyncGroupSchemaTableModel]]::new();

    • Edited by Sanal. A Friday, May 29, 2020 7:03 AM
    Friday, May 29, 2020 5:42 AM