Re: Reality check
From: Sean M. Severson (sseverson_at_nerdsolutions.biz)
Date: 11/24/04
- Next message: Bobby: "Date Formats"
- Previous message: David Gugick: "Re: SP to ADO interaction"
- In reply to: Paul Nielsen: "Re: Reality check"
- Next in thread: Mike Epprecht \(SQL MVP\): "Re: Reality check"
- Reply: Mike Epprecht \(SQL MVP\): "Re: Reality check"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 24 Nov 2004 12:50:02 -0600
Paul,
Interesting idea. So, I would need to add a field to each table to store
the sync date and then use this to determine which records have changed and
run a query to update existing records or insert new records. I have
experience keeping tables synchronized (manually) in MS Access. I was under
the impression that SQL Server was going to be more difficult.
Thanks.
Sean M. Severson
Software Technology Solutions, LLC
"Paul Nielsen" <pnielsen@us.ci.org> wrote in message
news:%23fGbqUl0EHA.3704@tk2msftngp13.phx.gbl...
> Keeping two database in sync with different schema is tricky, but it can
be
> done. Think of it as two ETLs to a data warehouse. I recommend getting one
> database pushing to the other smooth before going two-way.
>
> columns: Sync, Updated
> use a trigger to update the updated column with every update. And deafult
it
> to getdate() for inserts.
>
> 1) set @SyncNow = GetDate()
>
> 2) update table
> set sync = @Syncnow
> Where updated > sync
> 3) push all rows with the synch = @syncnow to the other server using a
query
> to transform the data to the otehr serve's schema.
>
> --
> -Paul Nielsen, SQL Server MVP
> SQL Server 2000 Bible, Wiley Press
> Enterprise Data Architect, www.Compassion.com
>
>
>
>
> "Sean M. Severson" <sseverson@nerdsolutions.biz> wrote in message
> news:OwnmlHl0EHA.1400@TK2MSFTNGP11.phx.gbl...
> > Could someone please verify that what I want to do with sql server is
> > possible (I'm new).
> >
> > I have two different sql server databases that contain contact
> > information.
> > I need to keep the contacts synchronized. However, the formats of the
> > contact tables are different and the databases are from different
vendors
> > (commercial software). I need to update certain contact information in
> > one
> > database when an addition or change is made in another database. Can I
> > use
> > a trigger on one contacts table to insert a record into another contacts
> > table? I would need to use the contact information that was just
inserted
> > or modified.
> >
> > Thanks for your help.
> >
> > Sean M. Severson
> > Software Technology Solutions, LLC
> >
> >
>
>
- Next message: Bobby: "Date Formats"
- Previous message: David Gugick: "Re: SP to ADO interaction"
- In reply to: Paul Nielsen: "Re: Reality check"
- Next in thread: Mike Epprecht \(SQL MVP\): "Re: Reality check"
- Reply: Mike Epprecht \(SQL MVP\): "Re: Reality check"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|