Quantcast
Channel: SQL Server Replication forum
Viewing all articles
Browse latest Browse all 4054

Error during exec sp_addsynctrigger with reinitializing subscription.

$
0
0
--------------Version:--------------
Microsoft SQL Server 2008 R2 (RTM) - 10.50.1600.1 (X64)   Apr  2 2010 15:48:46   Copyright (c) Microsoft Corporation  Enterprise Edition (64-bit) on Windows NT 6.1 <X64> (Build 7601: Service Pack 1) (Hypervisor) 

Transactional Replication with Updateable Subscribers

--------------Actions:--------------
Tried Add filter_clause to article. When do the Reinitialize Subscription rise error:
"Invalid column name 'InSecur eZone'" (in name insertes the space).

The filter is:
select s.[id] from [dbo].[reports] s join [dbo].[ReportDateRanges] dr on dr.[ReportId] = s.[id] join [dbo].[organizations] o on s.[organization_id] = o.[ID] join [dbo].[ReportStates] rs on dr.[Id] = rs.[ReportForm_Id] where o.[InSecureZone] != 1 
union 
select s.[id] from [dbo].[reports] s join [dbo].[AnnualReportSet] ars on ars.[ReportId] = s.[id] 
join [dbo].[organizations] o on s.[organization_id] = o.[ID] join [dbo].[AnnualReportStates] rs on ars.[id] = rs.[AnnualReport_Id] where o.[InSecureZone] != 1

Tried to text the filter in one row, rise error:
"Invalid syntax near 'un'"

There is no way to resql syntax query, couse in some tables no FK, and needed to write many joins for each filter of articles.

The article didnt help:
http://support.microsoft.com/kb/935563/en-us
--------------Error discription:--------------
Incorrect syntax near "un"

if (@@microsoftversion >= 0x080002C0) begin exec sp_addsynctriggers N'Reports', N'dbo', N'SGUK-SERV-2', N'GSNMRW', N'ReplicaReports', N'sp_MSsync_ins_4BA0C13F_FCBC_499F_A2FC_4F75BC5D5C7E', N'sp_MSsync_upd_4BA0C13F_FCBC_499F_A2FC_4F75BC5D5C7E', N'sp_MSsync_del_4BA0C13F_FCBC_499F_A2FC_4F75BC5D5C7E', N'sp_MScft_ReplicaReportsToCZ_Reports', N'dbo', 'null', 'null', N'id in (select s.[id] from [dbo].[reports] s join [dbo].[ReportDateRanges] dr on dr.[ReportId] = s.[id] join [dbo].[organizations] o on s.[organ
(Transaction sequence number: 0x00002FC20000018F005000000000, Command ID: 27)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=21805&LinkId=20476

--------------Question--------------
What do I wrong?
Is this a bag?

Viewing all articles
Browse latest Browse all 4054

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>