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

sql server replication

group:

Drop system tables for resovling conflict replication!!!!


Drop system tables for resovling conflict replication!!!! Nguyen Quang Thi
11/21/2003 12:06:07 AM
sql server replication: Hi All

I have a problem:
When I created merge replication, system tables , named like aonflict%, conflict%, conflict%... (% is a string) , also were created. Now I disable replication and I want drop these tables. I can not drop them. How can I drop these tables

Many thanks for help

Nguyen Quang Th
Drop system tables for resovling conflict replication!!!! Hilary Cotter
11/21/2003 4:59:48 AM
try this

DECLARE @name nvarchar(129)
DECLARE list_conflict_tables CURSOR FOR
SELECT name From sysobjects WHERE type='u' and name
like '_onflict%'

OPEN list_conflict_tables

FETCH NEXT FROM list_conflict_tables INTO @name
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT 'dropping conflict_tables ' +@name
select @name='drop Table ' + @name
--EXEC sp_executesql @name
print @name
FETCH NEXT FROM list_conflict_tables INTO @name
END

CLOSE list_conflict_tables
DEALLOCATE list_conflict_tables

GO
This will print the list of conflict tables. make sure
that none of your user tables are in this list and then
uncomment the ' --EXEC sp_executesql @name' section.


[quoted text, click to view]
like aonflict%, conflict%, conflict%... (% is a string) ,
also were created. Now I disable replication and I want
drop these tables. I can not drop them. How can I drop
these tables.
[quoted text, click to view]
RE: Drop system tables for resovling conflict replication!!!! Nguyen Quang Thi
11/21/2003 6:51:16 PM
Hi Hilary Cotter,
I have drop successfully these table

Thanks a lot
Nguyen Quang Th
AddThis Social Bookmark Button