02. januar 2005 - 10:13Der er
6 kommentarer og 1 løsning
Synkronisering af databaser
Hej Eksperter og godt nytår.
Sidder og leger med ideen om man kan synkronisere to databaser. Den ene ligger lokalt på en computer, den anden på en server med fast ip-adresse. databaserne er identiske.
Virksomheder er på vej fra store sprogmodeller, der svarer på spørgsmål, til AI-agenter, der kan udføre opgaver på egen hånd. Det gør teknologien mere nyttig – og langt mere risikabel.
Hi Jan and a happy new year. I dont think you can use an IP address for linking your tables into your local database, but you should be able to map this as a drive letter. The question of synchronizing two tables has been up before. It isnt something I have played around with very much but it should be possible to do this using replication, although I am sure that this should be taken into concideration BEFORE making the database. Ther is always the problem of primary key conflicts which replication gets arounbd by using GUIDS.
Can you give a little more information as to what you ant to synchronize so we have a nidea as to how complec your problem is
what about your primary keys (autonumbers)? You will very likely have the same values in both databases! Before you can synchorinize two tables with identical data then its necessary to have a UNIQUE primary key and its very likley taht you dont if you are using autonumers as your primary key as the same value will VERY likley exist in BOTH tables!
It it possible to alter these to GUIDs? If you look in the properties of an autonumber field you can choose replication ID as the field size. This is a GUID and is supposed to be unique (GLOBAL). You also need to make sure that if the original autonumer values are used as foreign keys (related tables) then they have to be changed there too!
So it may be a bit of a job just preparing your dB for replication.
Alternativt kunne du have tabeller, kun til input. Når du synkroniserer, tømmer du input fra inputtabellerne over i "hovedtabellerne" og flytter "hovedtabellerne over i den anden database, hvor du gør det samme... Du må nok påregne en smule redesign, som terry vist også indikerer.
Synes godt om
Ny brugerNybegynder
Din løsning...
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.