Welcome to dbFreaks.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

UPDATE ROWGUID

 
   Database Help (Home) -> Replication RSS
Next:  Help please - removing replication  
Author Message
damar3

External


Since: Jan 21, 2008
Posts: 4



(Msg. 1) Posted: Thu Jan 31, 2008 2:46 am
Post subject: UPDATE ROWGUID
Archived from groups: microsoft>public>sqlserver>replication (more info?)

I have two table with the same data but rowguid are different. I have
a conflict with violation of primary key. How can I align rowguid
without delete row (they are in foreign key with other table) ?

 >> Stay informed about: UPDATE ROWGUID 
Back to top
Login to vote
Hilary Cotter

External


Since: Jan 16, 2008
Posts: 142



(Msg. 2) Posted: Thu Jan 31, 2008 4:59 am
Post subject: Re: UPDATE ROWGUID [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Can you post the schema's of the table(s).

By any chance is this conflict/primary key violation occuring between
syncs on the same table on the publisher and subscriber?

if so you will need to modify the primary key to include a location
specific key, or using some form of identity range management.

Please consult this article from more information on identity range
management.

http://www.simple-talk.com/sql/database-administration/the-identity-cr...s-in-re


On Jan 31, 6:48 am, Rubén Garrigós <novalidaddr....TakeThisOut@none.com> wrote:
> It is not clear what you want. If you want to "align" the data you can do it
> using updates instead of inserts when it is required.
>
> --
>
> Rubén Garrigós
> Solid Quality Mentors
>
> "damar3" <dam....TakeThisOut@gmail.com> wrote in message
>
> news:625460ff-1a3a-4685-bba7-46ff2e6bedc2@l32g2000hse.googlegroups.com...
>
>
>
> >I have two table with the same data but rowguid are different. I have
> > a conflict with violation of primary key. How can I align rowguid
> > without delete row (they are in foreign key with other table) ?- Hide quoted text -
>
> - Show quoted text -

 >> Stay informed about: UPDATE ROWGUID 
Back to top
Login to vote
damar3

External


Since: Jan 21, 2008
Posts: 4



(Msg. 3) Posted: Thu Jan 31, 2008 6:05 am
Post subject: Re: UPDATE ROWGUID [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

CREATE TABLE [dbo].[Costo] (
[TpCosto] [varchar] (Cool COLLATE Latin1_General_CI_AS NOT NULL ,
[CodSoc] [varchar] (2) COLLATE Latin1_General_CI_AS NOT NULL ,
[Desc] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[Onere] [varchar] (2) COLLATE Latin1_General_CI_AS NULL ,
[Cat] [varchar] (2) COLLATE Latin1_General_CI_AS NULL ,
[rowguid] uniqueidentifier ROWGUIDCOL NULL
) ON [PRIMARY]

I have the same row (TpCosto, CodSoc, Desc, Onere, Cat) in two
database but rowguid in the two table is different.
 >> Stay informed about: UPDATE ROWGUID 
Back to top
Login to vote
Hilary Cotter

External


Since: Jan 16, 2008
Posts: 142



(Msg. 4) Posted: Thu Jan 31, 2008 7:32 am
Post subject: Re: UPDATE ROWGUID [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

your problem is that it is possible that the same values can be
entered in both sides between syncs. to do this you will need to add a
location column to your pk.

Here is an example of how this will work - assuming TpCosto & CodSoc
are your pk columns.

CREATE TABLE [dbo].[Costo] (
[TpCosto] [varchar] (Cool COLLATE Latin1_General_CI_AS NOT
NULL ,
[CodSoc] [varchar] (2) COLLATE Latin1_General_CI_AS NOT NULL ,
[Location] [sysname] not null default @@servername,
[Desc] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[Onere] [varchar] (2) COLLATE Latin1_General_CI_AS NULL ,
[Cat] [varchar] (2) COLLATE Latin1_General_CI_AS NULL ,
[rowguid] uniqueidentifier ROWGUIDCOL NULL,
constraint CostoPK primary key (TpCosto,CodSoc,Location)
) ON [PRIMARY]

On Jan 31, 9:05 am, damar3 <dam....DeleteThis@gmail.com> wrote:
> CREATE TABLE [dbo].[Costo] (
>         [TpCosto] [varchar] (Cool COLLATE Latin1_General_CI_AS NOT NULL ,
>         [CodSoc] [varchar] (2) COLLATE Latin1_General_CI_AS NOT NULL ,
>         [Desc] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
>         [Onere] [varchar] (2) COLLATE Latin1_General_CI_AS NULL ,
>         [Cat] [varchar] (2) COLLATE Latin1_General_CI_AS NULL ,
>         [rowguid]  uniqueidentifier ROWGUIDCOL  NULL
> ) ON [PRIMARY]
>
> I have the same row  (TpCosto, CodSoc, Desc, Onere, Cat) in two
> database but rowguid in the two table is different.
 >> Stay informed about: UPDATE ROWGUID 
Back to top
Login to vote
Rubén_Garrigós

External


Since: Jan 10, 2008
Posts: 20



(Msg. 5) Posted: Thu Jan 31, 2008 12:48 pm
Post subject: Re: UPDATE ROWGUID [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

It is not clear what you want. If you want to "align" the data you can do it
using updates instead of inserts when it is required.

--

Rubén Garrigós
Solid Quality Mentors

"damar3" <damar3.RemoveThis@gmail.com> wrote in message
news:625460ff-1a3a-4685-bba7-46ff2e6bedc2@l32g2000hse.googlegroups.com...
>I have two table with the same data but rowguid are different. I have
> a conflict with violation of primary key. How can I align rowguid
> without delete row (they are in foreign key with other table) ?
 >> Stay informed about: UPDATE ROWGUID 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
How not to replicate update statement - Hi, In a merge replicaton, how can I configure it so that the update statements will not be replicated to subscriber database? Thanks. Pingx

FALSE UPDATE DON´T REPLICATE - Hi, guys I used this solution (URL above) to controll many changes to subscriber, and we intend to apply when we'll need to correct subscribers data. So, we put all procedures with CALL mode and include some code to work for us. Well, everything work..

Subscribers are no longer getting all update applied at th.. - Some of the database updates on the Publisher are not being downloaded to the Subscriber. However, all the changes at the subscribers are being uploaded successfully to the Publisher. But, when I do a complete download to a new local database I get all...

how to? - I have transactional replication running in sql2000. I need to find out whether there are pending transactions to be replicated and I need to do this query. Is there any way?

Trans Replication with all types of objects published - Correct me if im wrong but do i need to create many publications for SQL should i have stored procs,views,indexed views,etc in addition to the tables ? It seems that when i have just one publication with all these objects published in it and when the..
   Database Help (Home) -> Replication All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]