Showing posts with label replicated. Show all posts
Showing posts with label replicated. Show all posts

Tuesday, March 20, 2012

can I change owner of replicated tables?

can I change the owner of tables that are part of a merge replication
without effecting that replication? or will I need to drop all replication,
change owners, then re-setup replication?
any info is appreciated. Thanks.
no you can't and this will cause major problems.
The best thing to do is to drop your publication, drop the tables on the
subscriber and recreate it.
"djc" <noone@.nowhere.com> wrote in message
news:%23UZcu%23OZEHA.1000@.TK2MSFTNGP12.phx.gbl...
> can I change the owner of tables that are part of a merge replication
> without effecting that replication? or will I need to drop all
replication,
> change owners, then re-setup replication?
> any info is appreciated. Thanks.
>
|||ok. thanks.
Hillary,
are you familiar with the merge repl problems mentioned by Kestutis
Adomavicius in post titled: 'cannot remove repl... cannot delete database'?
If so could you offer some more insight into that and the questions I had in
reply to him?
Thanks... your other posts have helped me out a lot.
"Hilary Cotter" <hilaryk@.att.net> wrote in message
news:OAIF8ZPZEHA.212@.TK2MSFTNGP11.phx.gbl...
> no you can't and this will cause major problems.
> The best thing to do is to drop your publication, drop the tables on the
> subscriber and recreate it.
> "djc" <noone@.nowhere.com> wrote in message
> news:%23UZcu%23OZEHA.1000@.TK2MSFTNGP12.phx.gbl...
> replication,
>
|||I have been able to repro the problem with the conflict tables that Kestutis
has pointed out. You get this error when dropping replication and it is
simple to fix.
Kestutis (quite brilliantly I might add) has found some problems with the
merge replication stored procedures which may or may not cause problems. The
conflict table dropping is definately related to this problem which Kestutis
has fixed.
I have successfully implemented a central publisher with 60 subscribers
using non dbo table owners. This replication solution was relatively
maintenance free for the two years I was working on it. So, it is not a show
stopping problem, but what problems might occur is unknown. What will happen
in a future service pack is also unknown.
I have forwarded Kestutis's fixed replication stored procedures to a contact
of mine at Microsoft - with credit to Kestutis of course. Hopefully
Microsoft will implement Kestutis's suggestions.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"djc" <noone@.nowhere.com> wrote in message
news:%23ZV2u1PZEHA.2456@.TK2MSFTNGP10.phx.gbl...
> ok. thanks.
> Hillary,
> are you familiar with the merge repl problems mentioned by Kestutis
> Adomavicius in post titled: 'cannot remove repl... cannot delete
database'?
> If so could you offer some more insight into that and the questions I had
in
> reply to him?
> Thanks... your other posts have helped me out a lot.
>
> "Hilary Cotter" <hilaryk@.att.net> wrote in message
> news:OAIF8ZPZEHA.212@.TK2MSFTNGP11.phx.gbl...
>

Friday, February 24, 2012

Can a User Update a Table That Is Being Merge Replicated?

I would like to know if a user can update a table that is in the
process of being merge-replicated. What will happen to his update?
Some of the tables in our database are replicated between branch
offices using merge-replication. We are currently only do
merge-replication in the evening when no one is using the database.
Now, we may need to replicate more often in order to refresh the data
in a timely manner.
By our database design, the data from each branch office will not
conflict with each other. I say this just in case this has any bearing
to the question that I am asking.
Thanks in advance for any info.
Jay Chan
He/she can update away. If you are not using column level tracking, his/her
update may be overwritten by the publisher's update, or a subscriber with a
higher priority if you are updating a row that is updated on the Publisher
or another subscriber. This overwrite will be logged in a conflict table.
If you are using column level tracking, different columns updated in the
same row will be merged together. The same columns updated will be
overwritten by the publisher's update, or a subscriber with a higher
priority. This overwrite will be logged in a conflict table.
Hilary Cotter
Looking for a book on SQL Server replication?
http://www.nwsu.com/0974973602.html
"Jay Chan" <jaykchan@.hotmail.com> wrote in message
news:c7e5acb2.0407200753.1d24b1fe@.posting.google.c om...
> I would like to know if a user can update a table that is in the
> process of being merge-replicated. What will happen to his update?
> Some of the tables in our database are replicated between branch
> offices using merge-replication. We are currently only do
> merge-replication in the evening when no one is using the database.
> Now, we may need to replicate more often in order to refresh the data
> in a timely manner.
> By our database design, the data from each branch office will not
> conflict with each other. I say this just in case this has any bearing
> to the question that I am asking.
> Thanks in advance for any info.
> Jay Chan
|||> He/she can update away.
I assume you mean he/she can update the table when the table is right
in the middle of being merge-replicated. This means I can do
merge-replication more often than what I am doing now. Good to know
this. Thanks.

> If you are not using column level tracking, his/her
> update may be overwritten by the publisher's update, or a subscriber with a
> higher priority if you are updating a row that is updated on the Publisher
> or another subscriber. This overwrite will be logged in a conflict table.
> If you are using column level tracking, different columns updated in the
> same row will be merged together. The same columns updated will be
> overwritten by the publisher's update, or a subscriber with a higher
> priority. This overwrite will be logged in a conflict table.
Thanks for the explanation of how column leveling tracking can allow
different columns in the same record to be changed between
merge-replications. I appreciate your help.
Jay Chan

Tuesday, February 14, 2012

Can a column data type be changed on a replicated table?

On sqlserver 2000 transactional replication:

How would I best go about changing a published table's column from smallint to int? I could not find anything about it in BOL or MS.com. I do not think EM/Replication Properties allows the change. I suspect I have to run "Alter Table/Column" on the Publisher and each Subscriber the old-fashioned way. Is that true?

Thanks!

In SQL 2000, the only way to do this is to drop the article column, make your change, then re-add the article column. You can do this via sp_repldropcolumn and sp_repladdcolumn. You can find more information about these two procs in Books Online. You can also drop the entire article, make your change, and re-add the article.

In SQL 2005, there's a lot of improvement in DDL so you can do ALTER TABLE directly on the article table.

|||

Greg Y wrote:

You can also drop the entire article, make your change, and re-add the article.

Note, that in some cases (for example, if you have anonymous pull subscriptions), dropping and re-adding entire article into publication may cause subscription become obsolete and requires reinitialization.