Re: changing table owner name- sp_changemergearticle



This works fine when executed by mentioning individual query statement
for each and every table.

But when I insert the result set of all the user table names and owner
names into a cursor and then use the sp_changemergearticle inside the
cursor by fetching each table name , owner name it doesnt throw up any
error. but its not updating the destination owner names :(.. any clues
...??? Am i missing something here ?

Thanks in advance,
A

amritha.prabhu@xxxxxxxxx wrote:
Thanks for the quick update....its working ....

Regards,
A.

Hilary Cotter wrote:
It works for me, here is what I use:

sp_changemergearticle 'pubs2','authors','destination_owner','newownername'
,@force_invalidate_snapshot=1,@force_reinit_subscription=1


--
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



<amritha.prabhu@xxxxxxxxx> wrote in message
news:1149248072.423451.171750@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi,
I have a db with a few tables which has owner than dbo. When i use this
db for merge replication it creates tables with owner as dbo on the
subscriber.
In order to avoid this i went to the article properties on the
publisher and changed the destination owner to the 'other user' not
'dbo' and created the subscription again it worked fine.
Now my question is how can i change the article settings through the
stored proc "sp_changemergearticle". I tried using this but its saying
incorrect syntax when i execute it.? I am new to this field.. Can any
one help me out on this..
If an example could be given it could be of great help.

Thanks,
A


.



Relevant Pages

  • Re: Controlling create & drop proc, view privilege
    ... > roles to create a objects owned by dbo. ... It depends first on ownership the ownership chain. ... > permissions to execute the stored procedure only. ... > branch where the owner of the object is different. ...
    (microsoft.public.sqlserver.security)
  • changing table owner name- sp_changemergearticle
    ... I have a db with a few tables which has owner than dbo. ... subscriber. ... In order to avoid this i went to the article properties on the ...
    (microsoft.public.sqlserver.replication)
  • Re: RACF and Member Level Protection
    ... RACF and Member Level Protection ... WRITE FOR OWNER ... EXECUTE FOR OWNER ... For IBM-MAIN subscribe / signoff / archive access instructions, ...
    (bit.listserv.ibm-main)
  • Snapshot replication table belongs to differnet owner
    ... if you want an alternative owner to dbo for the article ... then enter the table article properties and on the general ... tab you can specify the owner. ... exist in the subscriber database. ...
    (microsoft.public.sqlserver.replication)
  • Snapshot replication table belongs to differnet owner
    ... >if you want an alternative owner to dbo for the article ... >then enter the table article properties and on the ... >tab you can specify the owner. ... >exist in the subscriber database. ...
    (microsoft.public.sqlserver.replication)