Re: Creating a DTS ActiveX Task

From: alien2_51 (dan.billow"at"n.o.s.p.a.m.monacocoach.commercialversion)
Date: 09/16/04


Date: Thu, 16 Sep 2004 14:43:43 -0700

The Main function in the active x script is the entry point, you must write
code to do something from here, otherwise nothihng will happen also if you
do not return DTSTaskExecResult_Success from this function the step will
show as failing, this is why this is the only line in the default script.
Schedule the DTS package by right clicking and selecting Schedule Packsge,
once this is done you can modify the schedule or disable the job from the
Management>SQL Agent>Jobs in EM. Keep in mind this package will run in the
context of the SQL Agent service account when run from a job.

"mgm" <mgm@discussions.microsoft.com> wrote in message
news:E3D5A713-3A09-44B8-8B55-A80BF7157D9A@microsoft.com...
> I've never used DTS and was wondering how to schedule a script to run. I
> notice when you open an ActiveX Script Task it's formated like this:
> Function Main()
> Main = DTSTaskExecResult_Success
> End Function
>
> I wrote a script that will query a database and send a mail to certain
> recipients with the results in the mail (using CDO). The query works when
I
> run it, but I don't know how to schedule it. I pasted my code into the
> ActiveX Script Task with and without the "Function Main()..." and it won't
> work.
>
> After I schedule it to run I look in SQL Server Agent - Jobs and it says:
> The job failed. The Job was invoked by Schedule 12 (Name of DTS Package).
> The last step to run was step 1 (Name of DTS Package).
>
> Can anyone help me get my script to run automatically on a daily basis -
> whether using DTS or not?
>
> Thanks!



Relevant Pages

  • Re: Synchornize date script
    ... I create an account called schedule, ... the script works just fine. ... synchronize with external time source. ...
    (microsoft.public.scripting.vbscript)
  • DTS - ActiveXScripting Not Working on 64bit AMD Cluster on SQL Server 2005 SP2
    ... I have a problem with DTS - ActiveXScripting that it cannot initialize ... Log Job History (Test ActiveX Script) ... Services Package Help file: ...
    (microsoft.public.sqlserver.dts)
  • ActiveX Scripting Error 2147220482 (800403FE) in DTS package..
    ... I have a DTS package that is run from a web UI via xp_cmdshell and DTSRUN, ... I'm getting an Active X script error on one of my steps only when run ... Error string: ActiveX Scripting ... ...
    (microsoft.public.sqlserver.dts)
  • Re: FTP delete problem
    ... 220 Microsoft FTP Service ... 200 PORT command successful. ... If i manually execute the script, the output wrote, but by schedule isn't ...
    (microsoft.public.inetserver.iis.ftp)
  • Re: Junk email schedule wont run
    ... Open /Applications/AppleScript/Script Editor. ... Paste this script into a new script window: ... Add this action to the offending schedule: ... Did your computer beep? ...
    (microsoft.public.mac.office.entourage)