Re: Creating a DTS ActiveX Task
From: alien2_51 (dan.billow"at"n.o.s.p.a.m.monacocoach.commercialversion)
Date: 09/16/04
- Next message: alien2_51: "Re: C# Byte[] and SQL timestamp"
- Previous message: David G.: "Re: Guru Design Question: Multiple Primary Keys"
- In reply to: mgm: "Re: Creating a DTS ActiveX Task"
- Next in thread: mgm: "Re: Creating a DTS ActiveX Task"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 16 Sep 2004 16:20:48 -0700
If you look in your Services management console, find the SQLAgent service
(this is the service that runs jobs in SQL Server) goto properties, select
the 'logon as' tab, you'll see what account this service runs as, this is
the account that will be executing your DTS package once it's scheduled,
typically this will be set to Local System which means it will have admin
priveleges on the local machine, as long as your not accessing resources
from the network from your DTS package you'll be fine, otherwise you'll have
to setup a domain account... Make sure any connections in your DTS package
are NOT using Windows Authentication if the account for the SQLAgent service
is Local System, this will fail.
"mgm" <mgm@discussions.microsoft.com> wrote in message
news:8F44BF68-5230-453C-9B9E-0AC25D213EE9@microsoft.com...
> 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!
> >
> >
> >
- Next message: alien2_51: "Re: C# Byte[] and SQL timestamp"
- Previous message: David G.: "Re: Guru Design Question: Multiple Primary Keys"
- In reply to: mgm: "Re: Creating a DTS ActiveX Task"
- Next in thread: mgm: "Re: Creating a DTS ActiveX Task"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|