Groups | Blog | Home
all groups > sql server replication > july 2007 >

sql server replication : Replication Failure - problem in sysmergearticles table


Hilary Cotter
7/20/2007 4:10:58 PM
the naming convention for conflict tables start with c
(conflict_publicationName_tableName). The time you run the merge snapshot
agent it will look like donflict_publicationName_tableName, then
eonflict_publicationName_tableName. When it gets to z it will then do
zzonflict_publicationName_tableName, then
zzzonflict_publicationName_tableName.

So it seems you have generated a lot of snapshots.

I can't explain the missing stored procedures.

--
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
[quoted text, click to view]

troy
7/20/2007 6:12:05 PM
I recieved an error message, "The merge process could not retrieve
column information for table 'dbo.TableName' -- sp_MSenumcolumns(?,?)"
while doing merge replication using Sql 2000 and SqlCe. The database
in question has 7 publications, 5 of which are working properly, and
the other 2 spontaneously started having this problem. There are many
anonymous subscribers on each publication.

I tried to run the sp_MSenumcolumsn proc and I saw that it called the
sysmergearticles table, so I went into the sysmergearticles table and
noticed some strange anomalies. For the two affected publications, the
insert_proc, select_proc, update_proc and view_sel_proc values were
all null. Also, the ins_conflict_proc colum, the values were something
like "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzh".

I manually updated all of the proc columns with the correct proc names
and everything seemed to work normally. Then, overnight, the Snapshot
ran, and the aforementioned columns were set back to null.

Does anyone have any idea why/how this happened and how to fix it?

I am on the phone with Microsoft now - I will post back if I get a
response.
Jesus Ramos
7/27/2007 10:44:02 AM
Hi Troy...
Did you find any answers about this issue with replication?
It seems that I have the same problem; insert_proc, update_proc and
select_proc all set to null...

[quoted text, click to view]
Jesus Ramos
8/1/2007 3:18:02 PM
I found out what was happening regarding this issue...

When you have multiple publications of the same database, for some reason
(don't ask me why) the snapshot doesn't remove the old conflict stored
procedures from the DB, so, somewhere in time the conflict sp's are going to
look something like this "zzzzzzzzzzzzzzzzzzzzzzz93AEDF4C7A7B45FF", these
last 16 digits are the first 16 from the uniqueidentifier assigned to the
pubid, since all the stored procedures made by the snapshot agent are going
to have these last 16 digits, the possible
combinations left for these names are going to be harder to find, untill it
gets to the point where there are going to be no more combinations for some
articles... that's when the sp "sp_MSsetartprocs" (used by the snapshot)
leaves the fields insert_proc, update_proc, select_proc and view_sel_proc all
null, and because of that the merge process cannot be finished successfuly...

I dropped the stored procedures from DB, those that were no longer used by
replication, of course, only the ones made by the snapshot agent... (there
was a lot of them), this allowed the agent to make the new ones and the
replication process is doing fine now...



[quoted text, click to view]
Jana Capacete
8/8/2007 6:59:19 PM
I have also encountered the same error as you.
Since I am not the author of the the replication procedure (but I need
to fix the problem), I am not sure which stored procedure should I drop
from the db and identify and retain the ones made by the snapshot agent.

Thanks.



Jesus Ramos
8/8/2007 10:08:03 PM
Hello Jana

This is the script i used for the sp cleanup...

declare @pubid uniqueidentifier
declare @pubidstr varchar(16)
declare @pubname varchar(50)

set @pubname = '????' -- type the name of the publication that's causing
the problem

select @pubid = pubid from sysmergepublications where name = @pubname

exec dbo.sp_MSguidtostr @pubid, @pubidstr out

create table #tempSP(sp sysname)
insert into #tempSP(sp)
select ins_conflict_proc as sp from sysmergearticles where ins_conflict_proc
is not null
union all
select insert_proc as sp from sysmergearticles where insert_proc is not null
union all
select update_proc as sp from sysmergearticles where update_proc is not null
union all
select select_proc as sp from sysmergearticles where select_proc is not null
union all
select view_sel_proc as sp from sysmergearticles where view_sel_proc is not
null

select identity(int,1,1) as temp_id, name
into #tempNames
from sysobjects
where type = 'P'
and name not in (select sp from #tempSP)
and name not like 'dt_%'
and name like '%' + @pubidstr
and status < 0
order by name

declare @total int, @i int
declare @tmp_procname nvarchar(260)

select @total = count(*) from #tempNames
set @i = 1

while @i <= @total
begin
select @tmp_procname = name
from #tempNames
where temp_id = @i

print ('drop proc ' + @tmp_procname) --exec
set @i = @i + 1
end

drop table #tempSP
drop table #tempNames

I chose to print the drop commands because they were a lot, I copied the
text from the messages tab of query analizer, paste it into a new query, and
run as many lines as i wanted to, but if you want to save your energy just
replace the "print" command for an "exec".

Regards...


[quoted text, click to view]
Jana Capacete
8/9/2007 5:39:18 PM
I appreciate your response sir,but the code seems tough for me to do.
Actually, I have seen this error for merge publication "the merge
process could not retrieve column information for table <table name>"
and its partner snapshot's error as "timeout expired"in Replication
Monitor in SQL Server Enterprise Manager.
Another publication has this error:
for snapshot: the process could not bulk copy out of table <table name>
for merge:the agent is suspect. No response within last 10 minutes.

All I can do is to observe them and start the agent in case it stops.
But with regards to solving the main reason why these errors occur is
where I am puzzled.

Thank you so much for your very quick response.

Jana



Jana Capacete
8/9/2007 10:22:13 PM


I appreciate your response sir,but the code seems tough for me to do.
Actually, I have seen this error for merge publication "the merge
process could not retrieve column information for table <table name>"
and its partner snapshot's error as "timeout expired"in Replication
Monitor in SQL Server Enterprise Manager.
Another publication has this error:
for snapshot: the process could not bulk copy out of table <table name>
for merge:the agent is suspect. No response within last 10 minutes.

All I can do is to observe them and start the agent in case it stops.
But with regards to solving the main reason why these errors occur is
where I am puzzled.

Thank you so much for your very quick response.

Jana


AddThis Social Bookmark Button