dbTalk Databases Forums  

Unable to CreateObject("WScript.Shell") in an ActiveX task in DTS via a Job

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Unable to CreateObject("WScript.Shell") in an ActiveX task in DTS via a Job in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Joe Carr
 
Posts: n/a

Default Unable to CreateObject("WScript.Shell") in an ActiveX task in DTS via a Job - 06-21-2004 , 11:43 AM






I have a DTS package which has worked beautifully for 2
months or more which I recently needed to migrate to a new
machine. I moved the package and all dependencies to a new
SQL server, and now all works except for a call to :

Set oShell = CreateObject("WScript.Shell")

The error handler reports : "70 Permission denied".

When I log in to the machine under the domain account
which SQLSERVERAGENT runs under, and execute the job, it
works without a hitch. When I then schedule the Package to
run as a job, and start the job, my log file reports
the "Permission denied" error on the CreateObject command.
If I change the user account for SQLSERVERAGENT to be
LocalSystem account, the job works when executed directly,
or when scheduled as a job. This is an imperfect solution,
however, as I cannot enable a SQLMailTask when the Agent
is logged in to the LocalSystem account. I have added the
domain account which I run SQLSERVERAGENT into the local
administrators group on the machine to no avail as well.
So, my main question is, why would permission being denied
instansiating a WSCript.Shell object when run as a job,
but not when executed under the same user account?

Again, this behavior does not exist on the previous server
which ran the job.

Any assistance would be _greatly_ appreciated. Thanks...

Reply With Quote
  #2  
Old   
Joe Carr
 
Posts: n/a

Default Unable to CreateObject("WScript.Shell") in an ActiveX task in DTS via a Job - 06-21-2004 , 11:58 AM






The server is version 8.00.760 SP3 Enterprise Edition.

Quote:
-----Original Message-----
I have a DTS package which has worked beautifully for 2
months or more which I recently needed to migrate to a
new
machine. I moved the package and all dependencies to a
new
SQL server, and now all works except for a call to :

Set oShell = CreateObject("WScript.Shell")

The error handler reports : "70 Permission denied".

When I log in to the machine under the domain account
which SQLSERVERAGENT runs under, and execute the job, it
works without a hitch. When I then schedule the Package
to
run as a job, and start the job, my log file reports
the "Permission denied" error on the CreateObject
command.
If I change the user account for SQLSERVERAGENT to be
LocalSystem account, the job works when executed
directly,
or when scheduled as a job. This is an imperfect
solution,
however, as I cannot enable a SQLMailTask when the Agent
is logged in to the LocalSystem account. I have added the
domain account which I run SQLSERVERAGENT into the local
administrators group on the machine to no avail as well.
So, my main question is, why would permission being
denied
instansiating a WSCript.Shell object when run as a job,
but not when executed under the same user account?

Again, this behavior does not exist on the previous
server
which ran the job.

Any assistance would be _greatly_ appreciated. Thanks...
.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.