Showing posts with label merge. Show all posts
Showing posts with label merge. Show all posts

Friday, March 30, 2012

How to remove replication?

Hi, all.
I have two server(Svr01, Svr02) that are replicated each other (Merge replication).
Svr01 must be Publisher distributor.. but, by mistake Svr02 is set to distributor, publisher. (Publisher/distributor are on the same comp..)

I want to fix this..
How?

I think I have to remove replication on both side and Reset from the first.
but, I don't know how to remove replication either..

Please reply with any thougt...Use Replication menu option in EM. You can also check stored procedures that can be used to remove it manually (they are all executed in the background when you do it through GUI), but start with EM first.|||Use Replication menu option in EM. You can also check stored procedures that can be used to remove it manually (they are all executed in the background when you do it through GUI), but start with EM first.
I don't understand about EM..
Could you explain more detail..?|||EM is SQL Enterprise Manager.

-PatP

Wednesday, March 28, 2012

How to Remove Merge Replication?

Hi All:
I have setup Merge Replication (Push) & we are using SQL2000 sp3.
After testing a few things, I disabled the Publication. This did not remove
Subscription on the other Server.
I have a task stuck in Subcriptions, under Replication on SQL.
It Shows the Task as 'Running' Status and Last Action as 'Syncronization in
Progress'
Now I am not able to delete the table in the subscriber also, as it says
'This table has been setup from Replication'
Please suggest.
Thanks,
Anukul
You can use sp_removedbreplication 'dbname' on publisher and subscriber to
remove the system tables associated with replication.
If needed, there is a stored procedure to remove the replication setting on
a table called sp_MSunmarkreplinfo which takes a tablename as a parameter.
Alternatively, setting replinfo to 0 in sysobjects for the particular table
should do it.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Thanks Paul:
I did try this procedure & was able to remove the system tables, including
the Job I mentioned. But it was still not letting us alter the structure or
drop the tables on which Replication was setup.
Please let me know what am I doing wrong.
Regards,
Anukul
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:OHL64kGAFHA.1396@.tk2msftngp13.phx.gbl...
> You can use sp_removedbreplication 'dbname' on publisher and subscriber to
> remove the system tables associated with replication.
> If needed, there is a stored procedure to remove the replication setting
on
> a table called sp_MSunmarkreplinfo which takes a tablename as a parameter.
> Alternatively, setting replinfo to 0 in sysobjects for the particular
table
> should do it.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Anukul,
did you try sp_MSunmarkreplinfo?
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Hi Paul:
I did try that one out also & BTW I am now able to remove Subscriber.
Thanks a Lot for ur help.
Regards,
Anukul
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:155e01c5023b$3917e340$a501280a@.phx.gbl...
> Anukul,
> did you try sp_MSunmarkreplinfo?
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||I would be interested in hearing from the community if anyone is having the
same type of problems on SQL 2005. We added a force option to sp_removed
which more aggressively drops replication objects. Additionally, we now drop
any rowguid columns that were added in merge.
Philip Vaughn
Program Manager
SQL Server Replication
This message is provided "AS IS" with no warranties, and confers no rights.
"Anukul" <anukuls@.yahoo.com> wrote in message
news:OCJxPYmAFHA.1388@.TK2MSFTNGP09.phx.gbl...
> Hi Paul:
> I did try that one out also & BTW I am now able to remove Subscriber.
> Thanks a Lot for ur help.
> Regards,
> Anukul
> "Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
> news:155e01c5023b$3917e340$a501280a@.phx.gbl...
>

How to remove a table after merge replication

I want to remove a table after merge replication, and i want to change the
identity range for replication
How can I modify the table or remove it from the Publication so that it can
be modified?
Regards
Srinivasan K
drop the subscriptions and run sp_dropmergearticle to drop the article.
If you are using automatic identity range management you will have to issue
the following commands.
sp_changemergearticle 'northwind','categories','pub_identity_range',300
go
sp_changemergearticle 'northwind','categories','identity_range',300
go
sp_changemergearticle 'northwind','categories','threshold',90
go
If you are not you can issue dbcc checkident to reseed the identity ranges
on both sides of the equation(s).
ie
dbcc checkident('categories',reseed,300)
Hilary Cotter
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
"Remove a table after merge replication" <Remove a table after merge
replication@.discussions.microsoft.com> wrote in message
news:F692A05B-5D94-46C7-96F0-6D7B06E07BBE@.microsoft.com...
> I want to remove a table after merge replication, and i want to change the
> identity range for replication
> How can I modify the table or remove it from the Publication so that it
can
> be modified?
>
> Regards
> Srinivasan K
>
>

Sunday, February 19, 2012

How to query for records that have not been replicated

Hi,

I am using Merge Replication for synchronizing a bunch of laptops
running MSDE with a central SQL Server 2000 production server.

This database is used by an application that needs to know which
records have not yet been replicated, at any givem time.

Here's a simple scenario:

User A in laptop X starts his copy of the application. He syncs his
MSDE database through the application, to match the current central
servers' data. He then proceeds to add new records through the
application and, after he is done, he synchronizes his database with
the central server, through the application.

At any given time, the user might kill the application. He might add
some records today, a few more tomorrow or in a week and should be able
to change and delete records that have not yet been merged into the
production server.

The problem is that SQL Server does not have an easy way to tell which
records in the subscription tables have been inserted but not yet
replicated. I have been using the following query:

SELECT rowguid
FROM [MyTable]
INNER JOIN (
SELECT rowguid AS rep_id
FROM msmerge_contents
WHERE generation = joinchangegen AND generation = (
SELECT MAX(generation)
FROM msmerge_genhistory )
) dtable
ON rowguid_rep = dtable.rep_id

This query works for most cases but fails to identify the first record
created immediatly after a synchronization event.

What I would like to know is if there is a correct way of identifying
records which are "not-yet-replicated" on a given table that is part of
a merge replication process like the one described above.
Thanks in advance.<miltonmoura@.gmail.com> wrote in message
news:1104839914.237873.95740@.f14g2000cwb.googlegro ups.com...
> Hi,
> I am using Merge Replication for synchronizing a bunch of laptops
> running MSDE with a central SQL Server 2000 production server.

<snip
> What I would like to know is if there is a correct way of identifying
> records which are "not-yet-replicated" on a given table that is part of
> a merge replication process like the one described above.
> Thanks in advance.

I have no idea myself, but you might get a better response in
microsoft.public.sqlserver.replication.

Simon