Sync data between azure database and local database using cloud power shell

早过忘川 提交于 2021-01-29 15:20:39

问题


We are trying to sync an azure database and local SQL database using power shell. We are referencing the following URL for the sync process.

https://docs.microsoft.com/en-us/azure/azure-sql/database/scripts/sql-data-sync-sync-data-between-azure-onprem

Up to the database schema section, we can execute the script successfully. But when we execute the following code it is showing an error.

$newSchema  = [AzureSqlSyncGroupSchemaModel]::new()

Error is “InvalidOperation: Unable to find type [AzureSqlSyncGroupSchemaModel]”.

Even we used the following statement in the script it is still showing error.

using namespace Microsoft.Azure.Commands.Sql.DataSync.Model
using namespace System.Collections.Generic

We have researched a lot for a solution but couldn’t find a proper one yet. We had tried “[System.Reflection.Assembly]::LoadWithPartialName( “ option also, but this also not lead us to success. Please let us know if you have a solution. It would be very helpful for us.


回答1:


I know it's a bit old thread but wanted to provide an update if you are still looking for a response on it.

I believe it is related to this thread so I recommend you to check answer in it and see if it resolves your issue.

On the other hand, I recommend you to share the document enhancement feedback for this Azure document by clicking on "This page" option (shown in below screenshot) that's available at the bottom of the referred Azure document so that related document's author would review the feedback and consider enhancing the document as appropriate with a note or with a workaround for the issue.



来源:https://stackoverflow.com/questions/62069898/sync-data-between-azure-database-and-local-database-using-cloud-power-shell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!