all groups > sql server replication > january 2005 >
You're in the

sql server replication

group:

Failed to enumerate changes in the filtered articles, Help !!



Failed to enumerate changes in the filtered articles, Help !! Raydl
1/27/2005 6:17:02 AM
sql server replication: Hi All,

I have Sql-Sever 2k SP2 and Win2K SP4 Advanced server.
Topology : Republisher
Publication Type : Merge with dynamic Filtering.

Everything was working out well after setting up that topology but suddenly
, after some hours happened what follows :

Error on the Publisher :
Failed to enumerate changes in the filtered articles

{call sp_MSsetupbelongs(?,?,?,?,?,1,?,?,1,?,?,?,?)}

Merge Replication Provider
Number: -2147200925
Number: 156
Message: Line 1: Incorrect syntax near 'where'.
Number: 156
Message: Line 1: Incorrect syntax near 'and'.

The publication I have it's not new, I changed from
Central Publisher to Republisher Topology and I made some
few changes in the article's filters , they don't have
any syntax error , so, they're working well. I've modified QueryTimeOut to
900.

My Publication has 102 Articles , so, it's a bit hard to
post all the schema, any way I'll post some of them and
the publication script.

File .sch :
SET QUOTED_IDENTIFIER ON
GO
drop table [dbo].[Table1]
GO
SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Table1] (
[Col1] [varchar] (7) NOT NULL ,
[Col2] [varchar] (25) NOT NULL ,
[Col3] [int] NULL ,
[Col4] [int] NULL ,
[Col5] [smallint] NULL ,
[rowguid] uniqueidentifier ROWGUIDCOL NOT NULL
CONSTRAINT [DF__Accesorio__rowgu__1BDDFBCD] DEFAULT (newid
()),
CONSTRAINT [PK_Table1] PRIMARY KEY NONCLUSTERED
(
[Col1],
[Col2]
) WITH FILLFACTOR = 90
)
GO

File .cft :

SET ANSI_PADDING ON
GO

if exists (select * from dbo.sysobjects where id =
object_id(N'[conflict_Publication_Name_Table1]') and
OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [conflict_Publication_Name_Table1]
GO

CREATE TABLE [conflict_Publication_Name_Table1] (
[Col1] [varchar] (7) NOT NULL ,
[Col2] [varchar] (25) NOT NULL ,
[Col3] [int] NULL ,
[Col4] [int] NULL ,
[Col5] [smallint] NULL ,
[rowguid] uniqueidentifier ROWGUIDCOL NOT NULL
)
GO


alter table [conflict_Publication_Name_Table1] add
origin_datasource nvarchar(255) NULL
go
alter table [conflict_Publication_Name_Table1] add
conflict_type int NULL
go
alter table [conflict_Publication_Name_Table1] add
reason_code int NULL
go
alter table [conflict_Publication_Name_Table1] add
reason_text nvarchar(720) NULL
go
alter table [conflict_Publication_Name_Table1] add pubid
uniqueidentifier NULL
go
alter table [conflict_Publication_Name_Table1] add
MSrepl_create_time datetime NULL default getdate()
go
go
exec
sp_MSsetconflicttable 'Table1', 'conflict_Publication_Name_
Table1'
go

File .dri:

CREATE INDEX [Index_Name] ON [dbo].[Table1]([Col3],
[Col4], [Col2]) WITH FILLFACTOR = 90
GO

CREATE UNIQUE INDEX [index_1934629935] ON [dbo].[Table1]
([rowguid])
GO

Publication Script:

use master
GO

exec sp_replicationdboption @dbname = N'DBName', @optname
= N'merge publish', @value = N'true'
GO

use [DbName]
GO


exec sp_addmergepublication @publication =
N'Publication_Name', @description = N'Merge publication of
DbName database from Publisher SERVERPUBLISHER.', @retention = 2,
@sync_mode = N'native', @allow_push = N'true', @allow_pull
= N'true', @allow_anonymous = N'false',
@enabled_for_internet = N'false', @centralized_conflicts =
N'true', @dynamic_filters = N'true',
@snapshot_in_defaultfolder = N'true', @compress_snapshot =
N'false', @ftp_port = 21, @ftp_login = N'anonymous',
@conflict_retention = 14, @keep_partition_changes =
N'true', @allow_subscription_copy = N'false',
@allow_synctoalternate = N'false',
@validate_subscriber_info = N'dbo.GT(Host_Name()) +
dbo.GTA(Host_Name(),0)', @add_to_active_directory =
N'false', @max_concurrent_merge = 0,
@max_concurrent_dynamic_snapshots = 0
exec sp_addpublication_snapshot @publication =
N'Publication_Name',@frequency_type = 4,
@frequency_interval = 1, @frequency_relative_interval = 1,
@frequency_recurrence_factor = 0, @frequency_subday = 1,
@frequency_subday_interval = 5, @active_start_date = 0,
@active_end_date = 0, @active_start_time_of_day = 500,
@active_end_time_of_day = 235959, @snapshot_job_name =
N'ServerName-DbName-Publication_Name-2'
GO

exec sp_grant_publication_access @publication =
N'Publication_Name', @login = N'BUILTIN\Administrators'
GO
exec sp_grant_publication_access @publication =
N'Publication_Name', @login = N'distributor_admin'
GO
exec sp_grant_publication_access @publication =
N'Publication_Name', @login = N'sa'
GO


exec sp_addmergearticle @publication =
N'Publication_Name', @article = N'Article1', @source_owner
= N'dbo', @source_object = N'BasicosCtos', @type =
N'table', @description = null, @column_tracking = N'true',
@pre_creation_cmd = N'drop', @creation_script = null,
@schema_option = 0x000000000000CFF1, @article_resolver =
null, @subset_filterclause = null, @vertical_partition =
N'false', @destination_owner = N'dbo',
@auto_identity_range = N'false',
@verify_resolver_signature = 0,
@allow_interactive_resolver = N'false',
@fast_multicol_updateproc = N'true', @check_permissions = 0
GO
exec sp_addmergearticle @publication =
N'Publication_Name', @article = N'Article2', @source_owner
= N'dbo', @source_object = N'TramosCtos', @type =
N'table', @description = null, @column_tracking = N'true',
@pre_creation_cmd = N'drop', @creation_script = null,
@schema_option = 0x000000000000CFF1, @article_resolver =
null,
@subset_filterclause = N'(Col1=dbo.GT(Host_Name()) Or
(Col1 In (Select EA1.Col2 From dbo.Table2 EA1 Where
EA1.Col3 =dbo.GT(Host_Name()))) Or (Col1 In (Select
TB3.Col2 From [dbo].[Table3] TB3 Where TB3.Col4 = dbo.GT
(Host_Name()))) Or (Col1 = dbo.GTA(Host_Name(),1) Or (Col1
In(Select EA1.Col1 From dbo.Table4 EA1 Where EA1.Col3 =
dbo.GTA(Host_Name(),1))) Or (Col1 In (Select TB5.Col1 From
[dbo].[Table5] TB5 Where TB5.Col3 = dbo.GTA(Host_Name
(),1)))) Or(Col1 = dbo.GTA (Host_Name(),2) Or (Col1 In
(Select Col2 From dbo.Table3 EA1 Where EA1.Col2 = dbo.GTA
(Host_Name(),2))) Or (Col1 In (Select TB5.Col2 From [dbo].
[Table5] TB5 Where TB5.Col2 = dbo.GTA(Host_Name(),2)))))',
@vertical_partition = N'false', @destination_owner =
N'dbo', @auto_identity_range = N'false',
@verify_resolver_signature = 0,
@allow_interactive_resolver = N'false',
@fast_multicol_updateproc = N'true', @check_permissions = 0
GO

This seems to be odd but , please , I need some Help.

Thanks in advance ,

Raydl.

RE: Failed to enumerate changes in the filtered articles, Help !! Raydl
1/28/2005 4:39:02 AM
Hi, All

I've solved the error , just installing SP3a.

Thanks .

Raydl

[quoted text, click to view]
AddThis Social Bookmark Button