Showing posts with label articles. Show all posts
Showing posts with label articles. Show all posts

Monday, February 20, 2012

Removing articles from Merge replication

I do have a merge replication and a number of anonymous subscribers
In the publisher, I have a number of articles (tables) that are published
When the publisher was defined, I could tick in the tables I wanted to
publish.
Now I want to remove 2-3 of these tables. Apparently, when I go into the
publishers property window, I can't untick the tables, so how do I remove
these tables?
Anders
You have to drop the subscriptions to be able to do this in SQL 2000. In SQL
2005 you can drop them, but the subscriptions will be re-initialized.
RelevantNoise.com - dedicated to mining blogs for business intelligence.
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
"Anders Balslev" <Anders Balslev@.discussions.microsoft.com> wrote in message
news:9832A46E-D419-496E-B65E-36397009C7FC@.microsoft.com...
>I do have a merge replication and a number of anonymous subscribers
> In the publisher, I have a number of articles (tables) that are published
> When the publisher was defined, I could tick in the tables I wanted to
> publish.
> Now I want to remove 2-3 of these tables. Apparently, when I go into the
> publishers property window, I can't untick the tables, so how do I remove
> these tables?
> Anders
|||Hi Hilary
- Sorry to say, but it still don't work.
I have now - on the subscriber sides - dropped the subscriptions, so I know
for sure there are no subscribers.
Then I go to the publisher, rightclick on the publication, go to the
"articles" section. The tables I want to remove are marked active in the
checkbox, but i'm still unable to unmark these tables.
PS! don't forget that the subscribers are anonymous
Wha can I do
Anders
"Hilary Cotter" wrote:

> You have to drop the subscriptions to be able to do this in SQL 2000. In SQL
> 2005 you can drop them, but the subscriptions will be re-initialized.
> --
> RelevantNoise.com - dedicated to mining blogs for business intelligence.
> 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
> "Anders Balslev" <Anders Balslev@.discussions.microsoft.com> wrote in message
> news:9832A46E-D419-496E-B65E-36397009C7FC@.microsoft.com...
>
>
|||On Nov 14, 1:30 am, Anders Balslev
<AndersBals...@.discussions.microsoft.com> wrote:
> Hi Hilary
> - Sorry to say, but it still don't work.
> I have now - on the subscriber sides - dropped the subscriptions, so I know
> for sure there are no subscribers.
> Then I go to the publisher, rightclick on the publication, go to the
> "articles" section. The tables I want to remove are marked active in the
> checkbox, but i'm still unable to unmark these tables.
> PS! don't forget that the subscribers are anonymous
> Wha can I do
> Anders
>
> "Hilary Cotter" wrote:
>
>
>
> - Show quoted text -
have you tried the stored procedure to drop an article? I don't use
the gui much anymore...
http://technet.microsoft.com/en-us/library/ms179926.aspx
sp_dropmergearticle [ @.publication= ] 'publication'
, [ @.article= ] 'article'
[ , [ @.ignore_distributor= ] ignore_distributor
[ , [ @.reserved= ] reserved
[ , [ @.force_invalidate_snapshot= ] force_invalidate_snapshot ]
[ , [ @.force_reinit_subscription = ] force_reinit_subscription ]
[ , [ @.ignore_merge_metadata = ] ignore_merge_metadata ]

Removing Articles

I want to remove all articles from a subcription and publication. Will these
two commands do it for me?
EXEC sp_dropsubscription @.publication = 'EMOBILE_OLTP_OLAP', @.article =
'all', @.subscriber = 'all', @.destination_db = 'all'
EXEC sp_droparticle @.publication = 'EMOBILE_OLTP_OLAP', @.article = 'all',
@.force_invalidate_snapshot = 1
Thanks,
Mark
Yes, but why not just drop the publication after dropping the subscription?
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
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
"mrprice" <mrprice@.discussions.microsoft.com> wrote in message
news:985F6D57-2A8C-41C1-A2D7-31B60239DE0B@.microsoft.com...
>I want to remove all articles from a subcription and publication. Will
>these
> two commands do it for me?
> EXEC sp_dropsubscription @.publication = 'EMOBILE_OLTP_OLAP', @.article =
> 'all', @.subscriber = 'all', @.destination_db = 'all'
> EXEC sp_droparticle @.publication = 'EMOBILE_OLTP_OLAP', @.article = 'all',
> @.force_invalidate_snapshot = 1
> Thanks,
> Mark
|||I do that after the sp_droparticle. This is kind of how SQL Enterpise
Manager scipted it out so ...
Mark
"Hilary Cotter" wrote:

> Yes, but why not just drop the publication after dropping the subscription?
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> 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
>
> "mrprice" <mrprice@.discussions.microsoft.com> wrote in message
> news:985F6D57-2A8C-41C1-A2D7-31B60239DE0B@.microsoft.com...
>
>

Removing and adding articles by code

Hello there
On my live replication, I need, sometimes, to change schema of replicated
tables.
Because, as long as the table is replicated, i can't change the schema, I
simple do:
1. Remove the article from the parent table
2. change the schema of the current table
3. add it again to the schema
I would like to do this with code.
Is there a way to do this?
' 03-5611606
' 050-7709399
: roy@.atidsm.co.il
Roy,
please take a look at this article:
http://www.replicationanswers.com/AddColumn.asp
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)