Can DTS packages containing WMI be run as a job? -
05-17-2006
, 05:25 PM
Hi,
I've written a DTS package that contains WMI logic in ActiveX scripts.
It works perfectly when I run it in DTS designer. It also works fine
when I right-click/execute it from Enterprise Manager.
However, it fails when I run it as a SQL job. It also fails when I run
it from the command line via DTSRUN.
The only message is the generic "ActiveX Scripting encountered a Run
Time Error during the execution of the script."
The SQLSERVERAGENT login is a member of the local Admin group.
The line it fails on is:
Set colFiles = objWMIService.ExecQuery _
("SELECT * FROM CIM_DataFile WHERE Path = ...")
It even fails when I run a local copy where SQLSERVERAGENT is running
under my login.
Any ideas? Thanks.
Tim |