dbTalk Databases Forums  

Automating DTS

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


Discuss Automating DTS in the microsoft.public.sqlserver.dts forum.



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

Default Automating DTS - 09-02-2005 , 10:09 AM






I've used DTS before and had pretty good results importing data from other
data stores - however, I've had poor results running the DTS packages that
I've saved...
Most of it was due to my lack of knowledge, I'm sure, but I need to get
something like this running, so now I'm going to where the knowlege is


I need to Import a comma delimited file, in a particular directory, into a
table - no problem I can do that with my eyes closed (not really, but you
know what I mean)

Second - I need to create this as a package so it can be run over and over,
each time, removing all data from the table and inserting the new data from
the newly replaced comma delimited file.

So - #1 is this possible to automate to the level of never having to
manually run the package?
#2 - does anyone have any tips they can share so I can get this setup
(either way)?

Thanks



Reply With Quote
  #2  
Old   
Tony Sebion
 
Posts: n/a

Default Re: Automating DTS - 09-02-2005 , 02:33 PM






I would create the DTS package w/ the import/export wizard, then edit
the package and change or add a "SQL Task" to execute before the
"Connection 1" Connection that clears the contents of the table
(truncate table <tablename>, or delete from <tablename>, depending on
the permissions of the user running the task). If the table doesn't
exist when you create the package, you may have to remove or edit the
Create Table SQL Task before the task is created that removes the data
from the table.

However, the job would still have to be manually run when you wanted it
to perform the import, either through Enterprise Manager or through
VBScript that starts the DTS package - I'm not sure what you mean by
never having to manually run the package.

Good luck,
Tony Sebion


"Elmo Watson" <sputnik75043 (AT) No (DOT) Spam.Yahho.com> wrote


Quote:
I've used DTS before and had pretty good results importing data from other
data stores - however, I've had poor results running the DTS packages that
I've saved...
Most of it was due to my lack of knowledge, I'm sure, but I need to get
something like this running, so now I'm going to where the knowlege is


I need to Import a comma delimited file, in a particular directory, into a
table - no problem I can do that with my eyes closed (not really, but you
know what I mean)

Second - I need to create this as a package so it can be run over and over,
each time, removing all data from the table and inserting the new data from
the newly replaced comma delimited file.

So - #1 is this possible to automate to the level of never having to
manually run the package?
#2 - does anyone have any tips they can share so I can get this setup
(either way)?

Thanks


Reply With Quote
  #3  
Old   
Leo
 
Posts: n/a

Default Re: Automating DTS - 09-04-2005 , 04:47 AM



How about scheduling the DTS task as a job?
Right click on the saved package, and select 'schedule package...'

cheers

leo


"Tony Sebion" wrote:

Quote:
I would create the DTS package w/ the import/export wizard, then edit
the package and change or add a "SQL Task" to execute before the
"Connection 1" Connection that clears the contents of the table
(truncate table <tablename>, or delete from <tablename>, depending on
the permissions of the user running the task). If the table doesn't
exist when you create the package, you may have to remove or edit the
Create Table SQL Task before the task is created that removes the data
from the table.

However, the job would still have to be manually run when you wanted it
to perform the import, either through Enterprise Manager or through
VBScript that starts the DTS package - I'm not sure what you mean by
never having to manually run the package.

Good luck,
Tony Sebion


"Elmo Watson" <sputnik75043 (AT) No (DOT) Spam.Yahho.com> wrote in message
news:#T9zLB9rFHA.3444 (AT) TK2MSFTNGP12 (DOT) phx.gbl:

I've used DTS before and had pretty good results importing data from other
data stores - however, I've had poor results running the DTS packages that
I've saved...
Most of it was due to my lack of knowledge, I'm sure, but I need to get
something like this running, so now I'm going to where the knowlege is


I need to Import a comma delimited file, in a particular directory, into a
table - no problem I can do that with my eyes closed (not really, but you
know what I mean)

Second - I need to create this as a package so it can be run over and over,
each time, removing all data from the table and inserting the new data from
the newly replaced comma delimited file.

So - #1 is this possible to automate to the level of never having to
manually run the package?
#2 - does anyone have any tips they can share so I can get this setup
(either way)?

Thanks



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.