locked
DbNotProvisioned Exception on syncOrchestrator.Synchronize RRS feed

  • Question

  • I have been working on this problem for two days now, and I am not having any luck.

    I'm trying to set up synchronization between SQL Server and SQL Server CE.  When I provision the databases, the tracking table as well as the schema_info, scope_config, and scope_info tables are all created.  I can also see the stored procedures using SSMS on the SQL Server.

    When I execute the following code I receive a DbNotProvisioned exception.  Am I missing something? Please help.

    Dim syncOrchestrator As New SyncOrchestrator
    syncOrchestrator.LocalProvider = New SqlCeSyncProvider("tblScope", clientConn)
    syncOrchestrator.RemoteProvider = New SqlSyncProvider("tblScope", serverConn)
    syncOrchestrator.Direction = SyncDirectionOrder.UploadAndDownload
    Dim syncStats = syncOrchestrator.Synchronize

    Thank you in advance for any help you can give,

    Michael H.

    Thursday, January 22, 2015 8:17 PM

Answers

  • I've resolved the problem. Instead of setting the Initial Catalog in the connection string, I was using the connection.ChangeDatabase function.  This works fine for provisioning the database, but if used when defining the connections for the sync orchestrator it will throw this exception when use [databasename] is executed

    I added the Initial Catalog to the data string and all is synchronizing correctly now.

    • Marked as answer by mihamil86 Thursday, January 29, 2015 2:41 PM
    Thursday, January 29, 2015 2:41 PM

All replies

  • which DB is it complaining about? client or server?

    on your server, under what schema where the Sync Fx objects created? dbo?

    Friday, January 23, 2015 1:58 AM
  • On the server the objects are being created under the dbo schema. 

    I'm guessing it is the server causing the problem as the exception is being thrown on Microsoft.Synchronization.Data.SqlServer instead of SqlServerCE

    I've configured a SyncTracer and added the output for provisioning and synchronization.


    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:512, Version of connection detected to be Sql2008
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:517, ----- Populating Scope Provisioning from Scope Description for 'tblScope' -----
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:518, Adding Table Provisioning for '[tblProducts]'
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:533, --- END Populating Scope Provisioning from Scope Description for 'tblScope' ---
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:537, ----- Provisioning Scope 'tblScope' on Database 'RFQ' -----
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:542, Reading Schema Version Info
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:543,    Executing Command: SELECT [schema_major_version], [schema_minor_version], [schema_extended_info] FROM [schema_info]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:549, Reading Schema Version Info
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:550,    Executing Command: SELECT [schema_major_version], [schema_minor_version], [schema_extended_info] FROM [schema_info]
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:553, Enabling Snapshot Isolation if not already enabled
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:553,    Executing Command: IF EXISTS (SELECT NAME FROM sys.databases where NAME = N'RFQ' AND [snapshot_isolation_state] = 0)
    BEGIN
    	ALTER DATABASE [RFQ] SET ALLOW_SNAPSHOT_ISOLATION ON
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:560, Creating Scope Info Table '[scope_info]'
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:561,    Executing Command: IF NOT EXISTS (SELECT t.name FROM sys.tables t JOIN sys.schemas s ON s.schema_id = t.schema_id WHERE t.name = N'scope_info' AND s.name = N'dbo')
    BEGIN
    	CREATE TABLE [scope_info] ([scope_local_id] int IDENTITY(1,1) NOT NULL, [scope_id] uniqueidentifier DEFAULT NEWID() NOT NULL, [sync_scope_name] nvarchar(100) NOT NULL, [scope_sync_knowledge] varbinary(max) NULL, [scope_tombstone_cleanup_knowledge] varbinary(max) NULL, [scope_timestamp] timestamp NULL, [scope_config_id] uniqueidentifier NULL, [scope_restore_count] int DEFAULT 0 NOT NULL, [scope_user_comment] nvarchar(max) NULL)
    	ALTER TABLE [scope_info] ADD CONSTRAINT [PK_scope_info] PRIMARY KEY ([sync_scope_name])
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:562, Creating Scope Config Table '[scope_config]'
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:563,    Executing Command: IF NOT EXISTS (SELECT t.name FROM sys.tables t JOIN sys.schemas s ON s.schema_id = t.schema_id WHERE t.name = N'scope_config' AND s.name = N'dbo')
    BEGIN
    	CREATE TABLE [scope_config] ([config_id] uniqueidentifier NOT NULL, [config_data] xml NOT NULL, [scope_status] char NULL)
    	ALTER TABLE [scope_config] ADD CONSTRAINT [PK_scope_config] PRIMARY KEY ([config_id])
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:623, Adding Scope Config Entry for Config ID '12680990-f9ea-4949-920e-1f52435292d7'
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:624,    Executing Command: INSERT INTO [scope_config] ([config_id], [config_data], [scope_status]) VALUES ('12680990-f9ea-4949-920e-1f52435292d7', N'<SqlSyncProviderScopeConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" IsTemplate="false"><Adapter Name="[tblProducts]" GlobalName="[tblProducts]" TrackingTable="[tblProducts_tracking]" SelChngProc="[tblProducts_selectchanges]" SelRowProc="[tblProducts_selectrow]" InsProc="[tblProducts_insert]" UpdProc="[tblProducts_update]" DelProc="[tblProducts_delete]" InsMetaProc="[tblProducts_insertmetadata]" UpdMetaProc="[tblProducts_updatemetadata]" DelMetaProc="[tblProducts_deletemetadata]" BulkTableType="[tblProducts_BulkType]" BulkInsProc="[tblProducts_bulkinsert]" BulkUpdProc="[tblProducts_bulkupdate]" BulkDelProc="[tblProducts_bulkdelete]" InsTrig="[tblProducts_insert_trigger]" UpdTrig="[tblProducts_update_trigger]" DelTrig="[tblProducts_delete_trigger]"><Col name="ID" type="bigint" idSeed="0" idStep="1" param="@P_1" pk="true" /><Col name="ProductName" type="nvarchar" size="255" param="@P_2" /><Col name="StyleGroups" type="int" param="@P_3" /><Col name="StyleCode" type="nchar" size="10" param="@P_4" /><Col name="StandardPrice" type="money" param="@P_5" /></Adapter></SqlSyncProviderScopeConfiguration>', 'P')
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:627, Adding Scope Info entry for Scope 'tblScope'
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:627,    UserComment: 
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:628,    Executing Command: INSERT INTO [scope_info] ([sync_scope_name], [scope_config_id], [scope_user_comment]) VALUES (N'tblScope', '12680990-f9ea-4949-920e-1f52435292d7', N'')
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:672, ----- Provisioning Table '[tblProducts]' -----
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:673, Create Table Option: Skip
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:673, Create Tracking Table Option: CreateOrUseExisting
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:675, Creating Tracking Table '[tblProducts_tracking]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:676, Creating Tracking Table '[tblProducts_tracking]'
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:677,    Executing Command: CREATE TABLE [tblProducts_tracking] ([ID] bigint NOT NULL, [update_scope_local_id] int NULL, [scope_update_peer_key] int NULL, [scope_update_peer_timestamp] bigint NULL, [local_update_peer_key] int NOT NULL, [local_update_peer_timestamp] timestamp NOT NULL, [create_scope_local_id] int NULL, [scope_create_peer_key] int NULL, [scope_create_peer_timestamp] bigint NULL, [local_create_peer_key] int NOT NULL, [local_create_peer_timestamp] bigint NOT NULL, [sync_row_is_tombstone] int NOT NULL, [restore_timestamp] bigint NULL, [last_change_datetime] datetime NULL)
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:679,    Executing Command: ALTER TABLE [tblProducts_tracking] ADD CONSTRAINT [PK_tblProducts_tracking] PRIMARY KEY ([ID])
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:683,    Executing Command: CREATE NONCLUSTERED INDEX [local_update_peer_timestamp_index] ON [tblProducts_tracking] ([local_update_peer_timestamp], [ID])
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:687, Populating from base table
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:688,    Executing Command: INSERT INTO [tblProducts_tracking] ([ID], [create_scope_local_id], [local_create_peer_key], [local_create_peer_timestamp], [update_scope_local_id], [local_update_peer_key], [sync_row_is_tombstone]) SELECT [base].[ID], NULL, 0, @@DBTS+1, NULL, 0, 0 FROM [tblProducts] [base] LEFT OUTER JOIN [tblProducts_tracking] [side] ON [base].[ID] = [side].[ID] WHERE [side].[ID] IS NULL; 
    
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:691, Done Populating from base table
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:693, Create Trigger Option: CreateOrUseExisting
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:694, Creating Trigger '[tblProducts_insert_trigger]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:700, Insert Trigger for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:701,    Executing Command: CREATE TRIGGER [tblProducts_insert_trigger] ON [tblProducts] FOR INSERT AS
    UPDATE [side] SET [sync_row_is_tombstone] = 0, [local_update_peer_key] = 0, [restore_timestamp] = NULL, [update_scope_local_id] = NULL, [last_change_datetime] = GETDATE() FROM [tblProducts_tracking] [side] JOIN INSERTED AS [i] ON [side].[ID] = [i].[ID]
    INSERT INTO [tblProducts_tracking] ([i].[ID], [create_scope_local_id], [local_create_peer_key], [local_create_peer_timestamp], [update_scope_local_id], [local_update_peer_key], [sync_row_is_tombstone], [last_change_datetime], [restore_timestamp]) SELECT [i].[ID], NULL, 0, @@DBTS+1, NULL, 0, 0, GETDATE() , NULL FROM INSERTED AS [i] LEFT JOIN [tblProducts_tracking] [side] ON [side].[ID] = [i].[ID] WHERE [side].[ID] IS NULL
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:703, Creating Trigger '[tblProducts_update_trigger]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:705, Update Trigger for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:706,    Executing Command: CREATE TRIGGER [tblProducts_update_trigger] ON [tblProducts] FOR UPDATE AS
    UPDATE [side] SET [local_update_peer_key] = 0, [restore_timestamp] = NULL, [update_scope_local_id] = NULL, [last_change_datetime] = GETDATE() FROM [tblProducts_tracking] [side] JOIN INSERTED AS [i] ON [side].[ID] = [i].[ID]
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:730, Creating Trigger '[tblProducts_delete_trigger]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:732, Delete Trigger for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:733,    Executing Command: CREATE TRIGGER [tblProducts_delete_trigger] ON [tblProducts] FOR DELETE AS
    UPDATE [side] SET [sync_row_is_tombstone] = 1, [local_update_peer_key] = 0, [restore_timestamp] = NULL, [update_scope_local_id] = NULL, [last_change_datetime] = GETDATE() FROM [tblProducts_tracking] [side] JOIN DELETED AS [d] ON [side].[ID] = [d].[ID]
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:734, Create Procedures Option: CreateOrUseExisting
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:735, Create Additional Procedures Option: Skip
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:737, Creating procedure '[tblProducts_selectchanges]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:743, Select Incremental Changes command for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:744,    Executing Command: CREATE PROCEDURE [tblProducts_selectchanges]
    	@sync_min_timestamp BigInt,
    	@sync_scope_local_id Int,
    	@sync_scope_restore_count Int,
    	@sync_update_peer_key Int
    AS
    BEGIN
    SELECT [side].[ID], [base].[ProductName], [base].[StyleGroups], [base].[StyleCode], [base].[StandardPrice], [side].[sync_row_is_tombstone], [side].[local_update_peer_timestamp] as sync_row_timestamp, case when ([side].[update_scope_local_id] is null or [side].[update_scope_local_id] <> @sync_scope_local_id) then COALESCE([side].[restore_timestamp], [side].[local_update_peer_timestamp]) else [side].[scope_update_peer_timestamp] end as sync_update_peer_timestamp, case when ([side].[update_scope_local_id] is null or [side].[update_scope_local_id] <> @sync_scope_local_id) then case when ([side].[local_update_peer_key] > @sync_scope_restore_count) then @sync_scope_restore_count else [side].[local_update_peer_key] end else [side].[scope_update_peer_key] end as sync_update_peer_key, case when ([side].[create_scope_local_id] is null or [side].[create_scope_local_id] <> @sync_scope_local_id) then [side].[local_create_peer_timestamp] else [side].[scope_create_peer_timestamp] end as sync_create_peer_timestamp, case when ([side].[create_scope_local_id] is null or [side].[create_scope_local_id] <> @sync_scope_local_id) then case when ([side].[local_create_peer_key] > @sync_scope_restore_count) then @sync_scope_restore_count else [side].[local_create_peer_key] end else [side].[scope_create_peer_key] end as sync_create_peer_key FROM [tblProducts] [base] RIGHT JOIN [tblProducts_tracking] [side] ON [base].[ID] = [side].[ID] WHERE  ([side].[update_scope_local_id] IS NULL OR [side].[update_scope_local_id] <> @sync_scope_local_id OR ([side].[update_scope_local_id] = @sync_scope_local_id AND [side].[scope_update_peer_key] <> @sync_update_peer_key)) AND [side].[local_update_peer_timestamp] > @sync_min_timestamp
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:747, Creating procedure '[tblProducts_selectrow]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:751, Select Row command for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:751,    Executing Command: CREATE PROCEDURE [tblProducts_selectrow]
    	@P_1 BigInt,
    	@sync_scope_local_id Int,
    	@sync_scope_restore_count Int
    AS
    BEGIN
    SELECT [side].[ID], [base].[ProductName], [base].[StyleGroups], [base].[StyleCode], [base].[StandardPrice], [side].[sync_row_is_tombstone], [side].[local_update_peer_timestamp] as sync_row_timestamp, case when ([side].[update_scope_local_id] is null or [side].[update_scope_local_id] <> @sync_scope_local_id) then COALESCE([side].[restore_timestamp], [side].[local_update_peer_timestamp]) else [side].[scope_update_peer_timestamp] end as sync_update_peer_timestamp, case when ([side].[update_scope_local_id] is null or [side].[update_scope_local_id] <> @sync_scope_local_id) then case when ([side].[local_update_peer_key] > @sync_scope_restore_count) then @sync_scope_restore_count else [side].[local_update_peer_key] end else [side].[scope_update_peer_key] end as sync_update_peer_key, case when ([side].[create_scope_local_id] is null or [side].[create_scope_local_id] <> @sync_scope_local_id) then [side].[local_create_peer_timestamp] else [side].[scope_create_peer_timestamp] end as sync_create_peer_timestamp, case when ([side].[create_scope_local_id] is null or [side].[create_scope_local_id] <> @sync_scope_local_id) then case when ([side].[local_create_peer_key] > @sync_scope_restore_count) then @sync_scope_restore_count else [side].[local_create_peer_key] end else [side].[scope_create_peer_key] end as sync_create_peer_key from [tblProducts] [base] right join [tblProducts_tracking] [side] on [base].[ID] = [side].[ID] WHERE [side].[ID] = @P_1
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:753, Creating procedure '[tblProducts_insert]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:757, Insert Command for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:757,    Executing Command: CREATE PROCEDURE [tblProducts_insert]
    	@P_1 BigInt,
    	@P_2 NVarChar(255),
    	@P_3 Int,
    	@P_4 NChar(10),
    	@P_5 Money,
    	@sync_row_count Int OUTPUT
    AS
    BEGIN
    SET @sync_row_count = 0; IF NOT EXISTS (SELECT * FROM [tblProducts_tracking] WHERE [ID] = @P_1) BEGIN SET IDENTITY_INSERT [tblProducts] ON; INSERT INTO [tblProducts]([ID], [ProductName], [StyleGroups], [StyleCode], [StandardPrice]) VALUES (@P_1, @P_2, @P_3, @P_4, @P_5);  SET @sync_row_count = @@rowcount; SET IDENTITY_INSERT [tblProducts] OFF; END 
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:760, Creating procedure '[tblProducts_update]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:763, Update Command for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:764,    Executing Command: CREATE PROCEDURE [tblProducts_update]
    	@P_1 BigInt,
    	@P_2 NVarChar(255),
    	@P_3 Int,
    	@P_4 NChar(10),
    	@P_5 Money,
    	@sync_force_write Int,
    	@sync_min_timestamp BigInt,
    	@sync_row_count Int OUTPUT
    AS
    BEGIN
    SET @sync_row_count = 0; UPDATE [tblProducts] SET [ProductName] = @P_2, [StyleGroups] = @P_3, [StyleCode] = @P_4, [StandardPrice] = @P_5 FROM [tblProducts] [base] JOIN [tblProducts_tracking] [side] ON [base].[ID] = [side].[ID] WHERE ([side].[local_update_peer_timestamp] <= @sync_min_timestamp OR @sync_force_write = 1) AND ([base].[ID] = @P_1); SET @sync_row_count = @@ROWCOUNT;
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:766, Creating procedure '[tblProducts_delete]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:768, Delete Command for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:769,    Executing Command: CREATE PROCEDURE [tblProducts_delete]
    	@P_1 BigInt,
    	@sync_force_write Int,
    	@sync_min_timestamp BigInt,
    	@sync_row_count Int OUTPUT
    AS
    BEGIN
    SET @sync_row_count = 0; DELETE [tblProducts] FROM [tblProducts] [base] JOIN [tblProducts_tracking] [side] ON [base].[ID] = [side].[ID] WHERE ([side].[local_update_peer_timestamp] <= @sync_min_timestamp OR @sync_force_write = 1) AND ([base].[ID] = @P_1); SET @sync_row_count = @@ROWCOUNT;
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:771, Creating procedure '[tblProducts_insertmetadata]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:775, Insert Metadata Command for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:776,    Executing Command: CREATE PROCEDURE [tblProducts_insertmetadata]
    	@P_1 BigInt,
    	@sync_scope_local_id Int,
    	@sync_row_is_tombstone Int,
    	@sync_create_peer_key Int,
    	@sync_create_peer_timestamp BigInt,
    	@sync_update_peer_key Int,
    	@sync_update_peer_timestamp BigInt,
    	@sync_check_concurrency Int,
    	@sync_row_timestamp BigInt,
    	@sync_row_count Int OUTPUT
    AS
    BEGIN
    SET @sync_row_count = 0; UPDATE [tblProducts_tracking] SET [create_scope_local_id] = @sync_scope_local_id, [scope_create_peer_key] = @sync_create_peer_key, [scope_create_peer_timestamp] = @sync_create_peer_timestamp, [local_create_peer_key] = 0, [local_create_peer_timestamp] = @@DBTS+1, [update_scope_local_id] = @sync_scope_local_id, [scope_update_peer_key] = @sync_update_peer_key, [scope_update_peer_timestamp] = @sync_update_peer_timestamp, [local_update_peer_key] = 0, [restore_timestamp] = NULL, [sync_row_is_tombstone] = @sync_row_is_tombstone WHERE ([ID] = @P_1) AND (@sync_check_concurrency = 0 or [local_update_peer_timestamp] = @sync_row_timestamp);SET @sync_row_count = @@ROWCOUNT;IF (@sync_row_count = 0) BEGIN INSERT INTO [tblProducts_tracking] ([ID], [create_scope_local_id], [scope_create_peer_key], [scope_create_peer_timestamp], [local_create_peer_key], [local_create_peer_timestamp], [update_scope_local_id], [scope_update_peer_key], [scope_update_peer_timestamp], [local_update_peer_key], [restore_timestamp], [sync_row_is_tombstone], [last_change_datetime]) VALUES (@P_1, @sync_scope_local_id, @sync_create_peer_key, @sync_create_peer_timestamp, 0, @@DBTS+1, @sync_scope_local_id, @sync_update_peer_key, @sync_update_peer_timestamp, 0, NULL, @sync_row_is_tombstone, GETDATE());SET @sync_row_count = @@ROWCOUNT; END;
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:779, Creating procedure '[tblProducts_updatemetadata]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:783, Update Metadata Command for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:784,    Executing Command: CREATE PROCEDURE [tblProducts_updatemetadata]
    	@P_1 BigInt,
    	@sync_scope_local_id Int,
    	@sync_row_is_tombstone Int,
    	@sync_create_peer_key Int,
    	@sync_create_peer_timestamp BigInt,
    	@sync_update_peer_key Int,
    	@sync_update_peer_timestamp BigInt,
    	@sync_check_concurrency Int,
    	@sync_row_timestamp BigInt,
    	@sync_row_count Int OUTPUT
    AS
    BEGIN
    SET @sync_row_count = 0; DECLARE @was_tombstone int; SELECT @was_tombstone = [sync_row_is_tombstone] FROM [tblProducts_tracking] WHERE ([ID] = @P_1);IF (@was_tombstone IS NOT NULL AND @was_tombstone = 1 AND @sync_row_is_tombstone = 0) BEGIN UPDATE [tblProducts_tracking] SET [create_scope_local_id] = @sync_scope_local_id, [scope_create_peer_key] = @sync_create_peer_key, [scope_create_peer_timestamp] = @sync_create_peer_timestamp, [local_create_peer_key] = 0, [local_create_peer_timestamp] = @@DBTS+1, [update_scope_local_id] = @sync_scope_local_id, [scope_update_peer_key] = @sync_update_peer_key, [scope_update_peer_timestamp] = @sync_update_peer_timestamp, [local_update_peer_key] = 0, [restore_timestamp] = NULL, [sync_row_is_tombstone] = @sync_row_is_tombstone WHERE ([ID] = @P_1) AND (@sync_check_concurrency = 0 or [local_update_peer_timestamp] = @sync_row_timestamp); END ELSE BEGIN UPDATE [tblProducts_tracking] SET [update_scope_local_id] = @sync_scope_local_id, [scope_update_peer_key] = @sync_update_peer_key, [scope_update_peer_timestamp] = @sync_update_peer_timestamp, [local_update_peer_key] = 0, [restore_timestamp] = NULL, [sync_row_is_tombstone] = @sync_row_is_tombstone WHERE ([ID] = @P_1) AND (@sync_check_concurrency = 0 or [local_update_peer_timestamp] = @sync_row_timestamp); END;SET @sync_row_count = @@ROWCOUNT;
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:786, Creating procedure '[tblProducts_deletemetadata]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:788, Delete Metadata Command for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:789,    Executing Command: CREATE PROCEDURE [tblProducts_deletemetadata]
    	@P_1 BigInt,
    	@sync_check_concurrency Int,
    	@sync_row_timestamp BigInt,
    	@sync_row_count Int OUTPUT
    AS
    BEGIN
    SET @sync_row_count = 0; DELETE [side] FROM [tblProducts_tracking] [side] WHERE [ID] = @P_1 AND (@sync_check_concurrency = 0 or [local_update_peer_timestamp] = @sync_row_timestamp);SET @sync_row_count = @@ROWCOUNT;
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:791, Creating table type '[tblProducts_BulkType]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:793, Create TVP Type on table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:793,    Executing Command: CREATE TYPE [tblProducts_BulkType] AS TABLE ([ID] bigint, [ProductName] nvarchar(255), [StyleGroups] int, [StyleCode] nchar(10), [StandardPrice] money, sync_update_peer_timestamp bigint, sync_update_peer_key int, sync_create_peer_timestamp bigint, sync_create_peer_key int, PRIMARY KEY ([ID]))
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:800, Creating procedure '[tblProducts_bulkinsert]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:803, Bulk Insert Command for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:804,    Executing Command: CREATE PROCEDURE [tblProducts_bulkinsert]
    	@sync_min_timestamp BigInt,
    	@sync_scope_local_id Int,
    	@changeTable [tblProducts_BulkType] READONLY
    AS
    BEGIN
    -- use a temp table to store the list of PKs that successfully got updated/inserted
    DECLARE @changed TABLE ([ID] bigint, PRIMARY KEY ([ID]));
    
    SET IDENTITY_INSERT [tblProducts] ON;
    -- update/insert into the base table
    MERGE [tblProducts] AS base USING
    -- join done here against the side table to get the local timestamp for concurrency check
    (SELECT p.*, t.local_update_peer_timestamp FROM @changeTable p LEFT JOIN [tblProducts_tracking] t ON p.[ID] = t.[ID]) AS changes ON changes.[ID] = base.[ID]
    WHEN NOT MATCHED BY TARGET AND changes.local_update_peer_timestamp <= @sync_min_timestamp OR changes.local_update_peer_timestamp IS NULL THEN
    INSERT ([ID], [ProductName], [StyleGroups], [StyleCode], [StandardPrice]) VALUES (changes.[ID], changes.[ProductName], changes.[StyleGroups], changes.[StyleCode], changes.[StandardPrice])
    OUTPUT INSERTED.[ID] INTO @changed; -- populates the temp table with successful PKs
    
    SET IDENTITY_INSERT [tblProducts] OFF;
    UPDATE side SET
    update_scope_local_id = @sync_scope_local_id, 
    scope_update_peer_key = changes.sync_update_peer_key, 
    scope_update_peer_timestamp = changes.sync_update_peer_timestamp,
    local_update_peer_key = 0,
    create_scope_local_id = @sync_scope_local_id,
    scope_create_peer_key = changes.sync_create_peer_key,
    scope_create_peer_timestamp = changes.sync_create_peer_timestamp,
    local_create_peer_key = 0
    FROM 
    [tblProducts_tracking] side JOIN 
    (SELECT p.[ID], p.sync_update_peer_timestamp, p.sync_update_peer_key, p.sync_create_peer_key, p.sync_create_peer_timestamp FROM @changed t JOIN @changeTable p ON p.[ID] = t.[ID]) AS changes ON changes.[ID] = side.[ID]
    SELECT [ID] FROM @changeTable t WHERE NOT EXISTS (SELECT [ID] from @changed i WHERE t.[ID] = i.[ID])
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:809, Creating procedure '[tblProducts_bulkupdate]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:812, Bulk Update Command for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:812,    Executing Command: CREATE PROCEDURE [tblProducts_bulkupdate]
    	@sync_min_timestamp BigInt,
    	@sync_scope_local_id Int,
    	@changeTable [tblProducts_BulkType] READONLY
    AS
    BEGIN
    -- use a temp table to store the list of PKs that successfully got updated
    declare @changed TABLE ([ID] bigint, PRIMARY KEY ([ID]));
    
    SET IDENTITY_INSERT [tblProducts] ON;
    -- update the base table
    MERGE [tblProducts] AS base USING
    -- join done here against the side table to get the local timestamp for concurrency check
    (SELECT p.*, t.update_scope_local_id, t.scope_update_peer_key, t.local_update_peer_timestamp FROM @changeTable p LEFT JOIN [tblProducts_tracking] t ON p.[ID] = t.[ID]) as changes ON changes.[ID] = base.[ID]
    WHEN MATCHED AND (changes.update_scope_local_id = @sync_scope_local_id AND changes.scope_update_peer_key = changes.sync_update_peer_key) OR changes.local_update_peer_timestamp <= @sync_min_timestamp THEN
    UPDATE SET [ProductName] = changes.[ProductName], [StyleGroups] = changes.[StyleGroups], [StyleCode] = changes.[StyleCode], [StandardPrice] = changes.[StandardPrice]
    OUTPUT INSERTED.[ID] into @changed; -- populates the temp table with successful PKs
    
    SET IDENTITY_INSERT [tblProducts] OFF;
    UPDATE side SET
    update_scope_local_id = @sync_scope_local_id, 
    scope_update_peer_key = changes.sync_update_peer_key, 
    scope_update_peer_timestamp = changes.sync_update_peer_timestamp,
    local_update_peer_key = 0
    FROM 
    [tblProducts_tracking] side JOIN 
    (SELECT p.[ID], p.sync_update_peer_timestamp, p.sync_update_peer_key, p.sync_create_peer_key, p.sync_create_peer_timestamp FROM @changed t JOIN @changeTable p ON p.[ID] = t.[ID]) as changes ON changes.[ID] = side.[ID]
    SELECT [ID] FROM @changeTable t WHERE NOT EXISTS (SELECT [ID] from @changed i WHERE t.[ID] = i.[ID])
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:817, Creating procedure '[tblProducts_bulkdelete]' as it does not exist
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:819, Bulk Delete Command for table [tblProducts]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:820,    Executing Command: CREATE PROCEDURE [tblProducts_bulkdelete]
    	@sync_min_timestamp BigInt,
    	@sync_scope_local_id Int,
    	@changeTable [tblProducts_BulkType] READONLY
    AS
    BEGIN
    -- use a temp table to store the list of PKs that successfully got updated/inserted
    declare @changed TABLE ([ID] bigint, PRIMARY KEY ([ID]));
    DELETE [tblProducts] 
    OUTPUT DELETED.[ID] INTO @changed FROM [tblProducts] base JOIN
    (SELECT p.*, t.update_scope_local_id, t.scope_update_peer_key, t.local_update_peer_timestamp FROM @changeTable p JOIN [tblProducts_tracking] t ON p.[ID] = t.[ID]) as changes ON changes.[ID] = base.[ID] WHERE (changes.update_scope_local_id = @sync_scope_local_id AND changes.scope_update_peer_key = changes.sync_update_peer_key) OR changes.local_update_peer_timestamp <= @sync_min_timestamp
    UPDATE side SET
    sync_row_is_tombstone = 1, 
    update_scope_local_id = @sync_scope_local_id, 
    scope_update_peer_key = changes.sync_update_peer_key, 
    scope_update_peer_timestamp = changes.sync_update_peer_timestamp,
    local_update_peer_key = 0
    FROM 
    [tblProducts_tracking] side JOIN 
    (SELECT p.[ID], p.sync_update_peer_timestamp, p.sync_update_peer_key, p.sync_create_peer_key, p.sync_create_peer_timestamp FROM @changed t JOIN @changeTable p ON p.[ID] = t.[ID]) AS changes ON changes.[ID] = side.[ID]
    SELECT [ID] FROM @changeTable t WHERE NOT EXISTS (SELECT [ID] from @changed i WHERE t.[ID] = i.[ID])
    END
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:918, --- END Provisioning Table '[tblProducts]' ---
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:920, Updating Scope Config Status of Scope '12680990-f9ea-4949-920e-1f52435292d7' to 'C'
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:20:921,    Executing Command: UPDATE [scope_config] SET scope_status = 'C' 
    WHERE [config_id] = '12680990-f9ea-4949-920e-1f52435292d7';
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:20:922, --- END Provisioning Scope 'tblScope' on Database 'RFQ' ---
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:202, Reading Schema Version Info
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:203,    Executing Command: SELECT [schema_major_version], [schema_minor_version], [schema_extended_info] FROM [schema_info]
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:224, ----- Populating Scope Provisioning from Scope Description for 'tblScope' -----
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:224, Adding Table Provisioning for '[tblProducts]'
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:228, --- END Populating Scope Provisioning from Scope Description for 'tblScope' ---
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:229, Connecting to database: C:\Users\michaelh\Desktop\EQS_Remote\EQS_Remote\EQS_Remote\EQS_Data.sdf
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:295,    Executing Command: SELECT [schema_major_version], [schema_minor_version], [schema_extended_info] FROM [schema_info]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:303,    Executing Command: SELECT [schema_major_version], [schema_minor_version], [schema_extended_info] FROM [schema_info]
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:307, ----- Provisioning Scope 'tblScope' on Database 'C:\Users\michaelh\Desktop\EQS_Remote\EQS_Remote\EQS_Remote\EQS_Data.sdf' -----
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:311,    Executing Command: SELECT [schema_major_version], [schema_minor_version], [schema_extended_info] FROM [schema_info]
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:332, Enabling Change Tracking on Table '[tblProducts]'
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:342, Creating Change Tracking Index on Table '[tblProducts]'
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:343,    Executing Command: CREATE INDEX sysChangeTxBsn_idx ON [tblProducts] (__sysChangeTxBsn);
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:348, Dropping Tracking Table '[tblProducts]'
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:351, Creating Tracking Table '[tblProducts_tracking]'
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:351,    Executing Command: CREATE TABLE [tblProducts_tracking] ([ID] bigint NOT NULL, [sync_row_is_tombstone] int NOT NULL, [sync_update_peer_key] int NOT NULL, [sync_update_peer_timestamp] bigint NOT NULL, [sync_create_peer_key] int NOT NULL, [sync_create_peer_timestamp] bigint NOT NULL, [sync_update_bsn] bigint DEFAULT 0 NOT NULL, [last_change_datetime] datetime DEFAULT GETDATE() NULL)
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:354,    Executing Command: ALTER TABLE [tblProducts_tracking] ADD CONSTRAINT [PK_tblProducts_tracking] PRIMARY KEY ([ID])
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:355, Adding Change Tracking index to Tracking Table '[tblProducts_tracking]'
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:356,    Executing Command: CREATE INDEX sysChangeTxBsn_idx ON [tblProducts_tracking] (sync_update_bsn);
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:388, Deleting Scope Info entry 'tblScope'
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:389,    Executing Command: DELETE [scope_info] WHERE [sync_scope_name] = @scopeName
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:390,       Parameter: @scopeName Len: 8 Value: tblScope
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:392, Adding Scope Info entry for 'tblScope'
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:392,    UserComment: 
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:393,    Executing Command: INSERT INTO [scope_info] ([sync_scope_name], [scope_config_id], [scope_timestamp], [scope_user_comment]) VALUES (@scopeName, @configId , 1, @userDesc)
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:393,       Parameter: @scopeName Len: 8 Value: tblScope
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:394,       Parameter: @configId Value: 013c9989-8b73-4628-8375-a00da7f1fb7d
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:394,       Parameter: @userDesc Value: 
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:397, Adding Scope Config Entry for config id '013c9989-8b73-4628-8375-a00da7f1fb7d'
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:397,    Executing Command: INSERT INTO [scope_config] ([config_id], [config_data]) VALUES (@configId, @configData)
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:398,       Parameter: @configId Value: 013c9989-8b73-4628-8375-a00da7f1fb7d
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:23:398,       Parameter: @configData Len: 602 Value: <SqlCeSyncProviderScopeConfiguration xmlns:xsi="ht...
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:23:401, --- END Provisioning Scope 'tblScope' on Database 'C:\Users\michaelh\Desktop\EQS_Remote\EQS_Remote\EQS_Remote\EQS_Data.sdf' ---
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:28:294,    BeginSession() called on Provider SqlCeSyncProvider, Microsoft.Synchronization.Data.SqlServerCe, Version=3.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:28:297, Connecting to database: C:\Users\michaelh\Desktop\EQS_Remote\EQS_Remote\EQS_Remote\EQS_Data.sdf
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:28:318,    Executing Command: SELECT [schema_major_version], [schema_minor_version], [schema_extended_info] FROM [schema_info]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:28:320, Connecting to database: C:\Users\michaelh\Desktop\EQS_Remote\EQS_Remote\EQS_Remote\EQS_Data.sdf
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:28:355, Closing Connection
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:28:357, Connecting to database: C:\Users\michaelh\Desktop\EQS_Remote\EQS_Remote\EQS_Remote\EQS_Data.sdf
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:28:364,    Executing Command: SELECT [schema_major_version], [schema_minor_version], [schema_extended_info] FROM [schema_info]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:28:366, Connecting to database: C:\Users\michaelh\Desktop\EQS_Remote\EQS_Remote\EQS_Remote\EQS_Data.sdf
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:28:372, Reading Snapshot preparation timestamp for Scope tblScope
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:28:373,    Executing Command: select snapshot_timestamp from [scope_info] where sync_scope_name = @sync_scope_name
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:28:374,       Parameter: @sync_scope_name Len: 8 Value: tblScope
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:28:376, Read Snapshot preparation timestamp for Scope tblScope as 0.
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:28:377, Closing Connection
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:28:378,    BeginSession() called on Provider SqlSyncProvider, Microsoft.Synchronization.Data.SqlServer, Version=3.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:28:381, Connecting using string: Data Source=localhost\SQLExpress;Integrated Security=True
    ERROR  , EQS_Remote.vshost, 10, 01/23/2015 13:58:28:399, The current operation could not be completed because the database is not provisioned for sync or you not have permissions to the sync configuration tables. Exception: Microsoft.Synchronization.Data.DbNotProvisionedException: The current operation could not be completed because the database is not provisioned for sync or you not have permissions to the sync configuration tables.
       at Microsoft.Synchronization.Data.SqlServer.SqlManagementUtils.VerifyRuntimeVersionExceedsSchema(SqlConnection connection, String objectPrefix, String objectSchema, Boolean throwWhenNotProvisioned)
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:28:411,    EndSession() called on Provider SqlCeSyncProvider, Microsoft.Synchronization.Data.SqlServerCe, Version=3.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:37:911,    BeginSession() called on Provider SqlCeSyncProvider, Microsoft.Synchronization.Data.SqlServerCe, Version=3.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:37:912, Connecting to database: C:\Users\michaelh\Desktop\EQS_Remote\EQS_Remote\EQS_Remote\EQS_Data.sdf
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:37:933,    Executing Command: SELECT [schema_major_version], [schema_minor_version], [schema_extended_info] FROM [schema_info]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:37:935, Connecting to database: C:\Users\michaelh\Desktop\EQS_Remote\EQS_Remote\EQS_Remote\EQS_Data.sdf
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:37:951, Closing Connection
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:37:957, Connecting to database: C:\Users\michaelh\Desktop\EQS_Remote\EQS_Remote\EQS_Remote\EQS_Data.sdf
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:37:963,    Executing Command: SELECT [schema_major_version], [schema_minor_version], [schema_extended_info] FROM [schema_info]
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:37:964, Connecting to database: C:\Users\michaelh\Desktop\EQS_Remote\EQS_Remote\EQS_Remote\EQS_Data.sdf
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:37:970, Reading Snapshot preparation timestamp for Scope tblScope
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:37:971,    Executing Command: select snapshot_timestamp from [scope_info] where sync_scope_name = @sync_scope_name
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:37:971,       Parameter: @sync_scope_name Len: 8 Value: tblScope
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:37:973, Read Snapshot preparation timestamp for Scope tblScope as 0.
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:37:973, Closing Connection
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:37:974,    BeginSession() called on Provider SqlSyncProvider, Microsoft.Synchronization.Data.SqlServer, Version=3.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
    VERBOSE, EQS_Remote.vshost, 10, 01/23/2015 13:58:37:975, Connecting using string: Data Source=localhost\SQLExpress;Integrated Security=True
    ERROR  , EQS_Remote.vshost, 10, 01/23/2015 13:58:37:986, The current operation could not be completed because the database is not provisioned for sync or you not have permissions to the sync configuration tables. Exception: Microsoft.Synchronization.Data.DbNotProvisionedException: The current operation could not be completed because the database is not provisioned for sync or you not have permissions to the sync configuration tables.
       at Microsoft.Synchronization.Data.SqlServer.SqlManagementUtils.VerifyRuntimeVersionExceedsSchema(SqlConnection connection, String objectPrefix, String objectSchema, Boolean throwWhenNotProvisioned)
    INFO   , EQS_Remote.vshost, 10, 01/23/2015 13:58:37:996,    EndSession() called on Provider SqlCeSyncProvider, Microsoft.Synchronization.Data.SqlServerCe, Version=3.1.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91
    


    Friday, January 23, 2015 2:21 PM
  • I have reworked this application to use two local databases in SQL Express and got the same results.  I've confirmed that the schemas match between the two databases and that the user account being used to connect and start the sync process has full permissions (assigned db_owner on the database and sysadmin on the server).

    I'm not sure what to try next as I seem to have exhausted every proposed solution I've come across online.

    Hopefully somebody has an idea?

    Tuesday, January 27, 2015 7:59 PM
  • I've resolved the problem. Instead of setting the Initial Catalog in the connection string, I was using the connection.ChangeDatabase function.  This works fine for provisioning the database, but if used when defining the connections for the sync orchestrator it will throw this exception when use [databasename] is executed

    I added the Initial Catalog to the data string and all is synchronizing correctly now.

    • Marked as answer by mihamil86 Thursday, January 29, 2015 2:41 PM
    Thursday, January 29, 2015 2:41 PM