Avatar billede schoesler Nybegynder
02. januar 2005 - 10:13 Der 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.

Kan nogen hjælpe?
Avatar billede terry Ekspert
02. januar 2005 - 10:30 #1
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

mvh
Terry
Avatar billede terry Ekspert
02. januar 2005 - 10:33 #2
Avatar billede schoesler Nybegynder
02. januar 2005 - 10:49 #3
Hi Terry

Har to databaser som er bygget op identisk, men har forskelligt data input. Dem vil jeg gerne have synkroniseret.
Avatar billede terry Ekspert
02. januar 2005 - 10:56 #4
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!
Avatar billede schoesler Nybegynder
02. januar 2005 - 10:59 #5
I nogle af tabbelerne har jeg autonumbers andre ikke
Avatar billede terry Ekspert
02. januar 2005 - 11:20 #6
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.
Avatar billede Jørgen Kirkegaard Professor
10. januar 2005 - 22:15 #7
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.
Avatar billede Ny bruger Nybegynder

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.

Loading billede Opret Preview
Kategori
Dyk ned i databasernes verden på et af vores praksisnære Access-kurser

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester