Home > Archive > MS SQLCE > October 2005 > Set auto identity range true without dropping publication









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Set auto identity range true without dropping publication
Rob Blij

2005-10-27, 7:52 am

Is it possible to do this? I see in sp_changemergearticl
e it isnt an
option but with a little hacking in MSRepl_identity_rang
es in
distribution db and published db - also change 0 to 1 in
sysmergearticles for identity range handling for table it seems to
work. The only hassle is the publisher identity ranges dont seem to be
set (obviously this approach isnt supported but my problem is pretty
critical that I can't drop the pub).

What happens when i insert on the server is it takes the next ID. I
noticed that there is no replication check constraint on the table
either but I can imagine that the ranges arent being set anyhow so it
doesnt really matter..

Does anyone know how I can set auto identity on? Willing to try just
about anything!

tnx!
Rob

Hilary Cotter

2005-10-27, 7:52 am

You can do this manually by using DBCC CHECKIdent('TableNam
e',Reseed,10)

Have a look at this paper for more info on how this option works.

http://www.simple-talk.com/2005/07/05/replication/

"Rob Blij" <rob@kineticmds.com> wrote in message
news:1129735790.465601.181850@g14g2000cwa.googlegroups.com...
> Is it possible to do this? I see in sp_changemergearticl
e it isnt an
> option but with a little hacking in MSRepl_identity_rang
es in
> distribution db and published db - also change 0 to 1 in
> sysmergearticles for identity range handling for table it seems to
> work. The only hassle is the publisher identity ranges dont seem to be
> set (obviously this approach isnt supported but my problem is pretty
> critical that I can't drop the pub).
>
> What happens when i insert on the server is it takes the next ID. I
> noticed that there is no replication check constraint on the table
> either but I can imagine that the ranges arent being set anyhow so it
> doesnt really matter..
>
> Does anyone know how I can set auto identity on? Willing to try just
> about anything!
>
> tnx!
> Rob
>



Rob Blij

2005-10-27, 7:52 am

Thanks Hillary, all of this is being done on a test environment our
production db has not been altered if there are better ways of dealing
with this problem?

What about dropping the primary key and moving it to the rowguid
column? Then we definately wont get conflicts... Is this possible?

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com