Re: cdr_serial issue
Posted in 2007
Topics: General Discussion
>From: bozon <curtis@crowson1.com> If you didn't have to worry about synch'ing between servers, you would have a simple sequence number and you can just use that... Why not have a numeric string that represents the server id. (lets say 4 digits.) Then you have a sequence number. Prepend the server number to the sequence number and you should still be unique. That would solve your problem... _________________________________________________________________ Make distant family not so distant with Windows Vista' + Windows Live'. http://www.microsoft.com/windows/digitallife/keepintouch.mspx?ocid=TXT_TAGHM_CPC_VideoChat_distantfamily_102007
On Nov 9, 3:44 pm, "Ian Michael Gumby" <im_gu...@hotmail.com> wrote: > >From: bozon <cur...@crowson1.com> > > If you didn't have to worry about synch'ing between servers, you would have > a simple sequence number and you can just use that... > > Why not have a numeric string that represents the server id. (lets say 4 > digits.) > Then you have a sequence number. > Prepend the server number to the sequence number and you should still be > unique. > > That would solve your problem... > > _________________________________________________________________ > Make distant family not so distant with Windows Vista' + Windows Live'.http://www.microsoft.com/windows/digitallife/keepintouch.mspx?ocid=TX... The developers don't want to change much code and I have to have the capability to move data from one server to the other.
>From: bozon <curtis@crowson1.com> >The developers don't want to change much code and I have to have the >capability to move data from one server to the other. > You really don't have to change much code. You just have to have the ability to create number strings, concat them and then convert the numeric strings back in to numbers. Suppose Machine A has an id string of 123 and Machine B has an id string of 456. Then you have a sequence generator on both machines. When you generate the number, you prepend your machine id on to the value in the sequence generator. So if the sequence generator on A is 10 and the sequence generator on B is 45, the unique id string on A is 12310 and on B is 45645. (Of course you need to convert the numeric string back to a number...) But you'll never have Machine A generate a number 45645, so if you move the row from machine B to machine A, it will be unique. No? Or maybe I should stop doing meth? _________________________________________________________________ See what you're getting into'before you go there http://newlivehotmail.com/?ocid=TXT_TAGHM_migration_HM_viral_preview_0507