dbTalk Databases Forums  

Is it possible

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Is it possible in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Sean McKaharay
 
Posts: n/a

Default Is it possible - 10-16-2003 , 09:13 AM






Hey All,

I am a developer and I was put on a project to do some data transfers, so I
am new to the SQL Server thing.

Here is my situation:
I have an application that will run independently on 2 different boxes. Each
box will have a copy of my application and a full version of SQL Server on
it. (Lets call the 2 boxes Box1 and Box2). All day both boxes take
registrations and at the end of the day I need to take the new and changed
information off box1 and either add it or over right the information on box2
which is my main box. Let me just say that on every record I have a update
date and an insert date.

Basicly at the end of the day I have no problem writing a file with all the
stuff that has either been update or inserted onto box1 to XML so that will
give me a text file with everything that will need to be delt with. What I
am looking for is some "easy" way to take that data and compare it with the
current data that is on box2 and either insert it, add it, or do nothing
because the data on box2 is newer.

If someone could drop me a line maybe with some direction or tell me what I
should be looking at that would be great.

Sean





Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Is it possible - 10-16-2003 , 09:18 AM






I personally would not extract to XML. I would have a control table which
has a LastLoadDate. You then look in the tables you are interested in and
say

are there any records that have an Insert date > LastLoadDate ? INSERT
are there any records that have an Update date > LastLoadDate ? UPDATE

Inserts you can handle in a DataPump task. Updates you can take across to a
scratch table and then issue TSQL to do the updates by comparing the primary
key values.

There are other ways but this will work for you.



--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Sean McKaharay" <sean.mckaharay (AT) expoexchange (DOT) com> wrote

Quote:
Hey All,

I am a developer and I was put on a project to do some data transfers, so
I
am new to the SQL Server thing.

Here is my situation:
I have an application that will run independently on 2 different boxes.
Each
box will have a copy of my application and a full version of SQL Server on
it. (Lets call the 2 boxes Box1 and Box2). All day both boxes take
registrations and at the end of the day I need to take the new and changed
information off box1 and either add it or over right the information on
box2
which is my main box. Let me just say that on every record I have a update
date and an insert date.

Basicly at the end of the day I have no problem writing a file with all
the
stuff that has either been update or inserted onto box1 to XML so that
will
give me a text file with everything that will need to be delt with. What I
am looking for is some "easy" way to take that data and compare it with
the
current data that is on box2 and either insert it, add it, or do nothing
because the data on box2 is newer.

If someone could drop me a line maybe with some direction or tell me what
I
should be looking at that would be great.

Sean







Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.