Sync Job Failing with a an error in ReadCred
Hi Uriah,
There is more information on the SQL Azure Data Sync CTP tool for synchronizing SQL Server to SQL Azure here:
http://www.microsoft.com/windowsazure/sqlazure/datasync/default.aspx
If you are interested in our latest sync service to sync SQL Azure to SQL Azure, you can sign up the SQL Azure Data Sync service here:
Liam
Hi Jack,
Another thing you might want to try (just as a test) is to run the sync manually (outside of SQL Agent). To do this:
1) From SSMS right click on the properties of the SQL Agent
2) Choose Steps | Edit and copy the entire command line from the Command: text box
3) Open a cmd prompt (you might to run the cmdbox as Administrator just as an initial test)
4) Paste in the command line and execute it
The results from the command line should look something like this:
Local Table: dbo.videos Progress: SelectingChanges
Session Progress: ChangeEnumeration
Session Progress: ChangeApplication
Remote Table: dbo.videos Progress: SelectingChange
Session Progress: ChangeEnumeration
Session Progress: ChangeApplication
Sync stats:
Sync time: 0.0553722033333333
Uploaded - Total : 0, Succeed = 0 ,Failed : 0
Downloaded - Total : 0, Succeed = 0 ,Failed : 0
Liam
I have been having the ReadCred problem as well, so I changed the agent service to the admin login. Unfortunately in the Job monitor, the synch will still not work, and I get this from the command line (maybe its a timeout issue?)
C:\Users\Administrator>"C:\Program Files (x86)\Microsoft Sync Framework\Power Pa ck For SQL Azure November CTP\SyncLocalSqlAzureDatabase.exe" -localServer localh ost -localDb AZBLANK -SqlAzureDb AZBLANK -scope Sync_AZBLANK -SqlAzureServer f7r tdxk26z.database.windows.net -SqlAzureUser **USER** -SqlAzurePassword **PWD**-ConflictResolutionPolicy LocalServerWins Local Table: dbo.GUpdates Progress: SelectingChanges Local Table: dbo.SalesActions Progress: SelectingChanges Local Table: dbo.Docs Progress: SelectingChanges Local Table: dbo.Actions Progress: SelectingChanges Local Table: dbo.WorkDetail Progress: SelectingChanges Local Table: dbo.Install Progress: SelectingChanges Local Table: dbo.WorkGroup Progress: SelectingChanges Local Table: dbo.BidCodes Progress: SelectingChanges Local Table: dbo.CustSub Progress: SelectingChanges Local Table: dbo.ServiceSub Progress: SelectingChanges Local Table: dbo.RentalItems Progress: SelectingChanges Local Table: dbo.SalesBase Progress: SelectingChanges Local Table: dbo.ROOrder Progress: SelectingChanges Local Table: dbo.MaintEQ Progress: SelectingChanges Local Table: dbo.Zones Progress: SelectingChanges Local Table: dbo.CustSystem Progress: SelectingChanges Local Table: dbo.PMEQ Progress: SelectingChanges Local Table: dbo.SubContact Progress: SelectingChanges Local Table: dbo.BillStat Progress: SelectingChanges Local Table: dbo.CustCont Progress: SelectingChanges Local Table: dbo.ShipMeth Progress: SelectingChanges Local Table: dbo.SalesContacts Progress: SelectingChanges Local Table: dbo.Package Progress: SelectingChanges Local Table: dbo.SubContractor Progress: SelectingChanges Local Table: dbo.BusType Progress: SelectingChanges Local Table: dbo.MatDetail Progress: SelectingChanges Local Table: dbo.CustTrunk Progress: SelectingChanges Local Table: dbo.CustCustomLayout Progress: SelectingChanges Local Table: dbo.SLACategory Progress: SelectingChanges Local Table: dbo.QBFile Progress: SelectingChanges Local Table: dbo.SalesReasons Progress: SelectingChanges Local Table: dbo.TechBase Progress: SelectingChanges Local Table: dbo.OrderPack Progress: SelectingChanges Local Table: dbo.PO Progress: SelectingChanges Local Table: dbo.ROServices Progress: SelectingChanges Local Table: dbo.Defaults Progress: SelectingChanges Local Table: dbo.CallBack Progress: SelectingChanges Local Table: dbo.ProjStatus Progress: SelectingChanges Local Table: dbo.RentalTerms Progress: SelectingChanges Local Table: dbo.SalesStages Progress: SelectingChanges Local Table: dbo.TechType Progress: SelectingChanges Local Table: dbo.CustCustomTable Progress: SelectingChanges Local Table: dbo.SMPLink Progress: SelectingChanges Local Table: dbo.QBPayment Progress: SelectingChanges Local Table: dbo.SubDetail Progress: SelectingChanges Local Table: dbo.MatLink Progress: SelectingChanges Local Table: dbo.PropDetail Progress: SelectingChanges Local Table: dbo.Repair Progress: SelectingChanges Local Table: dbo.CustDefaults Progress: SelectingChanges Local Table: dbo.Service Progress: SelectingChanges Local Table: dbo.PropPack Progress: SelectingChanges Local Table: dbo.Terms Progress: SelectingChanges Local Table: dbo.PackItem Progress: SelectingChanges Local Table: dbo.Classes Progress: SelectingChanges Local Table: dbo.RecurDetail Progress: SelectingChanges Local Table: dbo.OrderServices Progress: SelectingChanges Local Table: dbo.SubFOS Progress: SelectingChanges Local Table: dbo.RecurServices Progress: SelectingChanges Local Table: dbo.SMPLinkSetup Progress: SelectingChanges Local Table: dbo.Reports Progress: SelectingChanges Local Table: dbo.InvenTrans Progress: SelectingChanges Local Table: dbo.RoTask Progress: SelectingChanges Local Table: dbo.Code Progress: SelectingChanges Local Table: dbo.Territories Progress: SelectingChanges Local Table: dbo.POItem Progress: SelectingChanges Local Table: dbo.SubLocation Progress: SelectingChanges Local Table: dbo.Parts Progress: SelectingChanges Local Table: dbo.RMA Progress: SelectingChanges Local Table: dbo.PropMat Progress: SelectingChanges Local Table: dbo.CommonService Progress: SelectingChanges Local Table: dbo.PropServices Progress: SelectingChanges Local Table: dbo.ToDo Progress: SelectingChanges Local Table: dbo.SubRegion Progress: SelectingChanges Local Table: dbo.CustDocs Progress: SelectingChanges Local Table: dbo.RecurMat Progress: SelectingChanges Local Table: dbo.PayDetail Progress: SelectingChanges Local Table: dbo.Emm Progress: SelectingChanges Local Table: dbo.ContPrefs Progress: SelectingChanges Local Table: dbo.SysDetails Progress: SelectingChanges Local Table: dbo.RecurTask Progress: SelectingChanges Local Table: dbo.RMAItem Progress: SelectingChanges Local Table: dbo.InvenXfer Progress: SelectingChanges Local Table: dbo.OrderStatus Progress: SelectingChanges Local Table: dbo.CustEQ Progress: SelectingChanges Local Table: dbo.UserGroups Progress: SelectingChanges Local Table: dbo.ContRoles Progress: SelectingChanges Local Table: dbo.InvoiceD Progress: SelectingChanges Local Table: dbo.SysMisc Progress: SelectingChanges Local Table: dbo.MatLinkD Progress: SelectingChanges Local Table: dbo.OrderTask Progress: SelectingChanges Local Table: dbo.POLink Progress: SelectingChanges Local Table: dbo.UserINI Progress: SelectingChanges Local Table: dbo.InvenXferD Progress: SelectingChanges Local Table: dbo.ContStatus Progress: SelectingChanges Local Table: dbo.EmmEvents Progress: SelectingChanges Local Table: dbo.PropSubs Progress: SelectingChanges Local Table: dbo.SysVersion Progress: SelectingChanges Local Table: dbo.Modules Progress: SelectingChanges Local Table: dbo.ROTech Progress: SelectingChanges Local Table: dbo.Issue Progress: SelectingChanges Local Table: dbo.VContact Progress: SelectingChanges Local Table: dbo.PropOrderLink Progress: SelectingChanges Local Table: dbo.CustEQTrans Progress: SelectingChanges Local Table: dbo.POStatus Progress: SelectingChanges Local Table: dbo.CPU Progress: SelectingChanges Local Table: dbo.Payment Progress: SelectingChanges Local Table: dbo.PropTask Progress: SelectingChanges Local Table: dbo.TaskStatus Progress: SelectingChanges Local Table: dbo.EmmLog Progress: SelectingChanges Local Table: dbo.mSearch Progress: SelectingChanges Local Table: dbo.InvFreqs Progress: SelectingChanges Local Table: dbo.RecurPack Progress: SelectingChanges Local Table: dbo.Vehicle Progress: SelectingChanges Local Table: dbo.PriceBook Progress: SelectingChanges Local Table: dbo.Proposal Progress: SelectingChanges Local Table: dbo.CustEquip Progress: SelectingChanges Local Table: dbo.TaxCodes Progress: SelectingChanges Local Table: dbo.CPUHard Progress: SelectingChanges Local Table: dbo.EmmRecip Progress: SelectingChanges Local Table: dbo.RMALink Progress: SelectingChanges Local Table: dbo.RecurTech Progress: SelectingChanges Local Table: dbo.InvKits Progress: SelectingChanges Local Table: dbo.Notify Progress: SelectingChanges Local Table: dbo.IssueNotify Progress: SelectingChanges Local Table: dbo.VendItem Progress: SelectingChanges Local Table: dbo.CPUMaint Progress: SelectingChanges Local Table: dbo.FAAssign Progress: SelectingChanges Local Table: dbo.SMPSystem Progress: SelectingChanges Local Table: dbo.IssueStatus Progress: SelectingChanges Local Table: dbo.OrderTax Progress: SelectingChanges Local Table: dbo.Projects Progress: SelectingChanges Local Table: dbo.Invoice Progress: SelectingChanges Local Table: dbo.PayMethod Progress: SelectingChanges Local Table: dbo.NotifyTypes Progress: SelectingChanges Local Table: dbo.ROCustEQ Progress: SelectingChanges Local Table: dbo.Recurring Progress: SelectingChanges Local Table: dbo.Vendor Progress: SelectingChanges Local Table: dbo.FADep Progress: SelectingChanges Local Table: dbo.TaxGroup Progress: SelectingChanges Local Table: dbo.CPUSoft Progress: SelectingChanges Local Table: dbo.SMPUser Progress: SelectingChanges Local Table: dbo.ItemStatus Progress: SelectingChanges Local Table: dbo.PayRoll Progress: SelectingChanges Local Table: dbo.OrderTech Progress: SelectingChanges Local Table: dbo.InvenCondition Progress: SelectingChanges Local Table: dbo.PropTax Progress: SelectingChanges Local Table: dbo.OrderAssets Progress: SelectingChanges Local Table: dbo.TaxGroupL Progress: SelectingChanges Local Table: dbo.Label Progress: SelectingChanges Local Table: dbo.RODetail Progress: SelectingChanges Local Table: dbo.CreditCards Progress: SelectingChanges Local Table: dbo.PayTypes Progress: SelectingChanges Local Table: dbo.FAMaint Progress: SelectingChanges Local Table: dbo.InvenDetail Progress: SelectingChanges Local Table: dbo.Tech Progress: SelectingChanges Local Table: dbo.LDCarriers Progress: SelectingChanges Local Table: dbo.PropTech Progress: SelectingChanges Local Table: dbo.Cust Progress: SelectingChanges Local Table: dbo.OrderDetail Progress: SelectingChanges Local Table: dbo.PayWages Progress: SelectingChanges Local Table: dbo.VFuel Progress: SelectingChanges Local Table: dbo.Fixed Progress: SelectingChanges Local Table: dbo.CustHours Progress: SelectingChanges Local Table: dbo.Department Progress: SelectingChanges Local Table: dbo.LeadSource Progress: SelectingChanges Local Table: dbo.PBDetail Progress: SelectingChanges Local Table: dbo.InvenGroup Progress: SelectingChanges Local Table: dbo.RoloDex Progress: SelectingChanges Local Table: dbo.Deposit Progress: SelectingChanges Local Table: dbo.LeadStatus Progress: SelectingChanges Local Table: dbo.Views Progress: SelectingChanges Local Table: dbo.CustIP Progress: SelectingChanges Local Table: dbo.ROMat Progress: SelectingChanges Local Table: dbo.InvenStatus Progress: SelectingChanges Local Table: dbo.Sales Progress: SelectingChanges Local Table: dbo.OrderInvLink Progress: SelectingChanges Local Table: dbo.PM Progress: SelectingChanges Local Table: dbo.Location Progress: SelectingChanges Local Table: dbo.CustItems Progress: SelectingChanges Local Table: dbo.DirectSales Progress: SelectingChanges Local Table: dbo.GUpdateGroup Progress: SelectingChanges Local Table: dbo.Inventory Progress: SelectingChanges Local Table: dbo.VMaint Progress: SelectingChanges Local Table: dbo.Accounts Progress: SelectingChanges Local Table: dbo.ServiceItem Progress: SelectingChanges Local Table: dbo.Division Progress: SelectingChanges Local Table: dbo.RentalHist Progress: SelectingChanges Local Table: dbo.OrderMat Progress: SelectingChanges Local Table: dbo.Maint Progress: SelectingChanges Local Table: dbo.CustServices Progress: SelectingChanges Session Progress: ChangeEnumeration System.InvalidOperationException: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed. at System.Data.SqlClient.SqlConnection.GetOpenConnection(String method) at System.Data.SqlClient.SqlConnection.ValidateConnectionForExecute(String me thod, SqlCommand command) at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean as ync) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult res ult, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at Microsoft.Synchronization.Data.SqlAzure.SqlAzureTVPChangeHandler.ExecuteCo mmandReturnRowcount(IDbCommand command, Boolean& found) at Microsoft.Synchronization.Data.SqlAzure.SqlAzureTVPChangeHandler.ExecuteCh angeApplicationCommandBase(IDbCommand command, SyncRowMetadata rowMetadata, Stri ng commandName) at Microsoft.Synchronization.Data.SqlAzure.ChangeHandlerBase.ExecuteChangeApp licationCommand(IDbCommand command, SyncRowMetadata rowMetadata, String commandN ame) at Microsoft.Synchronization.Data.SqlAzure.SqlAzureTVPChangeHandler.ApplyInse rt() at Microsoft.Synchronization.Data.SqlAzure.ChangeHandlerBase.ApplyChange() at Microsoft.Synchronization.Data.SqlAzure.SqlAzureSyncProvider.ApplyChangesO fType(DataSet changes, DbSyncScopeMetadata scopeMetadata, SqlAzureChangeApplicat ionType applyType) at Microsoft.Synchronization.Data.SqlAzure.SqlAzureSyncProvider.ApplyChangesF orDataSet(DataSet changes, DbSyncScopeMetadata scopeMetadata, Boolean isDataBatc hed) at Microsoft.Synchronization.Data.SqlAzure.SqlAzureSyncProvider.ApplyChangesI nternal(DataSet changes, DbSyncScopeMetadata scopeMetadata, Boolean isDataBatche d, Boolean isLastBatch) at Microsoft.Synchronization.Data.SqlAzure.SqlAzureSyncProvider.ProcessChange Batch(ConflictResolutionPolicy resolutionPolicy, ChangeBatch sourceChanges, Obje ct changeDataRetriever, SyncCallbacks syncCallbacks, SyncSessionStatistics sessi onStatistics) at Microsoft.Synchronization.KnowledgeProviderProxy.ProcessChangeBatch(CONFLI CT_RESOLUTION_POLICY resolutionPolicy, ISyncChangeBatch pSourceChangeManager, Ob ject pUnkDataRetriever, ISyncCallback pCallback, _SYNC_SESSION_STATISTICS& pSync SessionStatistics) at Microsoft.Synchronization.CoreInterop.ISyncSession.Start(CONFLICT_RESOLUTI ON_POLICY resolutionPolicy, _SYNC_SESSION_STATISTICS& pSyncSessionStatistics) at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWaySyncHelper(Syn cIdFormatGroup sourceIdFormats, SyncIdFormatGroup destinationIdFormats, Knowledg eSyncProviderConfiguration destinationConfiguration, SyncCallbacks DestinationCa llbacks, ISyncProvider sourceProxy, ISyncProvider destinationProxy, ChangeDataAd apter callbackChangeDataAdapter, SyncDataConverter conflictDataConverter, Int32& changesApplied, Int32& changesFailed) at Microsoft.Synchronization.KnowledgeSyncOrchestrator.DoOneWayKnowledgeSync( SyncDataConverter sourceConverter, SyncDataConverter destinationConverter, SyncP rovider sourceProvider, SyncProvider destinationProvider, Int32& changesApplied, Int32& changesFailed) at Microsoft.Synchronization.KnowledgeSyncOrchestrator.Synchronize() at Microsoft.Synchronization.SyncOrchestrator.Synchronize() at SyncLocalSqlAzureDatabase.Program.Main(String[] args)
Hi ,
I am facing same issue ,which is giving me error stating that "ReadCred failed with the error code 1168 : at SyncLocalAzureDatabase.Credentials.Credentials.ReadCred " and even i tried to login as administrator but still i am not getting root cause of problem.
thanks
Hi Shanu,
You need to set the SQL Agent job to run as the user that you were logged in as when you set up synchronization. For example if you were logged in as MyDomain\User1 then you would go into Services (services.msc) and set SQL Server Agent to run as MyDomain\User1.
Can you give that a try and see if it resolves your issue?
Liam
Hi Uriah,
There is more information on the SQL Azure Data Sync CTP tool for synchronizing SQL Server to SQL Azure here:
http://www.microsoft.com/windowsazure/sqlazure/datasync/default.aspx
If you are interested in our latest sync service to sync SQL Azure to SQL Azure, you can sign up the SQL Azure Data Sync service here:
Liam
|

