dbTalk Databases Forums  

Reusing DTS Package w/ new columns

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


Discuss Reusing DTS Package w/ new columns in the microsoft.public.sqlserver.dts forum.



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

Default Reusing DTS Package w/ new columns - 07-03-2003 , 12:24 PM






I've set up a bunch of DTS packages to import from delimited text file
where the first row has column names that match exactly the field
names in an SQL table (sql 2000).

Runs beautifully when no changes occur to tables. However when
columns change in SQL, the new columns populate with NULLS even
through the column header is in the delimited text file.

I need to run the DTS packages frequently against multiple tables that
could be changing over the life of the application and need to know if
anyone has some recomendations for work arounds. Is there a way to
open up a saved DTS package and have it automatically refresh the
contents to reflect changes in the destination table or better yet is
there anyway to create a DTS package that can dynamically adjust to
changing table layouts. I am thinking about dynamically creating a VB
script for each DTS from the same application that creates the source
delimited text file but my instincts tell me there has to be a better
way already built into SQL2K.

Any suggestions would be very welcomed.
.... mirsk
.... my 2 cents are on sale today only, half price while supplies last.

Reply With Quote
  #2  
Old   
Jono Indrawijaya
 
Posts: n/a

Default Reusing DTS Package w/ new columns - 07-03-2003 , 09:32 PM






Hi,

If you only need to import from a delimited text file then
you can use the 'Bulk Insert Task'. In the 'Bulk Insert
Task' there's a way to control the process by specifiying
the 'File Format'. It describes the source - destination
mapping of the task.
So the trick is you still have somewhat create a mechanism
to modified the content of the 'File Format' (for example
with vb), but by this way you don't have to touch the DTS
Package anymore, just make sure that the 'File Format'
reflects the changes of the new table structure or the new
text file structure.

Hope it helps
Regards,
Jono Indrawijaya - MCDBA
PT. eBiz Cipta Solusi - Microsoft Certified Partner
Indonesia

Quote:
-----Original Message-----
I've set up a bunch of DTS packages to import from
delimited text file
where the first row has column names that match exactly
the field
names in an SQL table (sql 2000).

Runs beautifully when no changes occur to tables.
However when
columns change in SQL, the new columns populate with
NULLS even
through the column header is in the delimited text file.

I need to run the DTS packages frequently against
multiple tables that
could be changing over the life of the application and
need to know if
anyone has some recomendations for work arounds. Is
there a way to
open up a saved DTS package and have it automatically
refresh the
contents to reflect changes in the destination table or
better yet is
there anyway to create a DTS package that can dynamically
adjust to
changing table layouts. I am thinking about dynamically
creating a VB
script for each DTS from the same application that
creates the source
delimited text file but my instincts tell me there has to
be a better
way already built into SQL2K.

Any suggestions would be very welcomed.
.... mirsk
.... my 2 cents are on sale today only, half price while
supplies last.
.


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.