Re: Creating a DTS ActiveX Task

From: mgm (mgm_at_discussions.microsoft.com)
Date: 09/16/04


Date: Thu, 16 Sep 2004 15:05:03 -0700

Thanks for the quick response.

I'm sorry, but I don't know what you mean by this: "Keep in mind this
package will run in the context of the SQL Agent service account when run
from a job."

I'm not very familiar with SQL Server, I only know some VB and TSQL. If it
helps, I am running Windows Server 2003, and the task is being run locally,
but it's querying another sql database.

Thanks

"alien2_51" <dan.billow"at" wrote:

> 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

  • SQL Server 2000 Agent Service
    ... In changing the SQL Agent service account to a regular user account would it ... need 'Full Control' folder access to wherever the ...\Program ...
    (microsoft.public.windows.server.security)
  • Re: Flat file connection error
    ... Have you ensured that the SQL Agent service account has the correct ... permissions to view the file? ... Good luck! ...
    (microsoft.public.sqlserver.dts)

Loading