all groups > sql server replication > november 2004 >
You're in the

sql server replication

group:

The merge process could not perform retention-based meta data cleanup


The merge process could not perform retention-based meta data cleanup Paul Ibison
11/4/2004 8:17:44 AM
sql server replication:
Thanks for the update Tony.
BTW instead of writing the cursor yourself, you might
want to have a look at:

sp_msforeachtable "dbcc dbreindex('?')"

Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com

(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
The merge process could not perform retention-based meta data cleanup Tony Toker
11/4/2004 3:54:23 PM
I know this has been covered a while ago but after spending two hours
hunting round for the solution thought a repost might be useful to someone.

Hilary Cotter's suggestion

stop the merge agent and do a dbcc dbreindex

Did the job a treat.

To reindex all tables try something like this:

DECLARE @TableName varchar(255)
DECLARE TableCursor CURSOR FOR SELECT TABLE_NAME FROM
INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE='BASE TABLE'
DECLARE @Command varchar(255)

OPEN TableCursor
FETCH NEXT FROM TableCursor INTO @TableName
WHILE @@FETCH_STATUS=0
BEGIN
Print'Reindexing '+@TableName
DBCC DBREINDEX (@TableName)
FETCH NEXT FROM TableCursor INTO @TableName
END
CLOSE TableCursor
DEALLOCATE TableCursor

(With Credit to Robert Vieira, 'Professional SQL Server 2000 Programming',
Wrox)

Re: The merge process could not perform retention-based meta data cleanup Tony Toker
11/4/2004 6:05:20 PM
A neater way to do the job, thanks Paul.

[quoted text, click to view]

AddThis Social Bookmark Button