Re: How To Setup a Batch Job To Run Daily



Hello Diane,

Ok I think the terminology might be confusing here.

You can use a cmdline command in a batch file that calls

DTSRun - if you need to call a package to move the rows
bcp - if you want to move the rows to text file with no DTS package.

If you use SQL Server Agent then there is a job step that effectively gets the cmdline for you (Operating System (CmdExec))
Most other schedulers will do that as well including Windows Scheduler.



DTSRun is a command line interface to call a DTS Package. The syntax is straight forward.


http://www.sqldts.com/default.aspx?301


Allan




Hello Allan,

Thank you very much for your information and prompt response.  I
assume that I need to use DTSRun command to setup a batch file.  Then
use DTS package to schedule the job that I setup in DTSRun.  Anyway,
is there another way to setup a batch job to export records besides
using DTS?  Thanks.

"Allan Mitchell" <allan@xxxxxxxxxxxxxxxxxx> wrote in message
news:f0343b0312a4c8c7f4a5aa6b7970@xxxxxxxxxxxxxxxxxxxxxxx

Hello Diane,

You can use Windows Scheduler, SQL Server Agent or any of the 3rd
party offerings like AutoSys.  You simply call the batch file.

Where does DTS come into this?  Are you using DTS to do the export?
if you are then you may want to look at the syntax for DTSRun in
Books-Online

Allan

Thanks very much for your information and prompt response.  Is there
another way to schedule a batch file?  Thanks.

"Allan Mitchell" <allan@xxxxxxxxxxxxxxxxxx> wrote in message
news:f0343b03125608c7f4061bb75ed0@xxxxxxxxxxxxxxxxxxxxxxx

Hello Diane,

Do you mean how do you schedule a DTS package the exports rows to a
text file?

SQL Server Agent or your favourite scheduler will do the scheduling
but here is some syntax help and nuances.

http://www.sqldts.com/redir.aspx?269074

http://www.sqldts.com/default.aspx?301

Allan

We are running SQL 2000 Enterprise Server Edition under Windows
2003 Server Standard Edition.  How do you schedule a batch file to
run daily to export selected records?

Thanks.



.



Relevant Pages

  • Re: How To Setup a Batch Job To Run Daily
    ... DTSRun is a command line interface to call a DTS Package. ... assume that I need to use DTSRun command to setup a batch file. ... use DTS package to schedule the job that I setup in DTSRun. ...
    (microsoft.public.sqlserver.dts)
  • Re: DTS Scheduled Package Fails but runs manually
    ... who has no right to access remote folders. ... Make sure SQL server Agent service runs under a proper account (? ... > Transformation Services Flat File Rowset Provider Help file: ... > Any ideas why it runs manually and not through a schedule? ...
    (microsoft.public.sqlserver.dts)
  • Re: SBS 2003 - Sql server -management- scheduled job stops running
    ... >>start generating a run time error. ... > SQL Server Agent will only start recurring jobs on schedule if the ... Since you indicate that SQL Server Agent ... > Steve Foster [SBS MVP] ...
    (microsoft.public.windows.server.sbs)
  • Re: How To Setup a Batch Job To Run Daily
    ... SQL Server Agent or any of the 3rd party offerings like AutoSys. ... You simply call the batch file. ... Are you using DTS to do the export? ... another way to schedule a batch file? ...
    (microsoft.public.sqlserver.dts)
  • Error running DTS package on a schedule (only!)
    ... I created a DTS package & CAN run it from Enterprise Manager ... When I try to schedule a job for this DTS package under SQL Server Agent ... connect to database server: specified database not found Error source: ...
    (microsoft.public.sqlserver.dts)