Wednesday, March 28, 2012

Newbie Question - Please be gentle!

Can I run a script as an automated process?
i.e. I have a simple script that deletes the content of a table so I can
import fresh data, I know how to set up the DTS to import the data
automatically, but I have to run the script every day manually before the DTS
runs & I want the delete script to run at a predefined time rather than
having to remember to do it. Does that make sense?
Tia
Jonathan
Sure. It's hard to give precise directions without know what you're scripts
look like, but... if you already have a DTS job you can easily create a
step in that package (that's what the DTS container is called) that will cun
a TSQL script. Then you can easily schedule that from SQLAgent. You can
right click on the job name from DTS and select 'schedule job' which will
walk you throught the process of setting up the DTS package to run from SQL
agent.
Hope that helps,
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Jonathan" <Jonathan@.discussions.microsoft.com> wrote in message
news:F7E842B8-BFD6-4922-8ED2-4AD0BCE55CA6@.microsoft.com...
> Can I run a script as an automated process?
> i.e. I have a simple script that deletes the content of a table so I can
> import fresh data, I know how to set up the DTS to import the data
> automatically, but I have to run the script every day manually before the
DTS
> runs & I want the delete script to run at a predefined time rather than
> having to remember to do it. Does that make sense?
> Tia
> Jonathan

No comments:

Post a Comment