Re: ActiveX script works in DTS but not in job, why?
- From: "Peter W. DeBetta" <debettap@xxxxxxxxxxx>
- Date: Tue, 1 Aug 2006 16:31:43 -0500
When you execute the package, are you logged in as the same user under which
the job is executing? If not, have you tried to log in as the xx\xxx user
(from the job error) and run the DTS package?
--
Peter DeBetta, MVP - SQL Server
http://sqlblog.com
--
"RJ" <rjbook@xxxxxxxxxxxxxxxx> wrote in message
news:9129C242-E9B5-4D29-848C-D8242FA86745@xxxxxxxxxxxxxxxx
I have created a small ActiveX script which can load multiple DTS packages
from the File System up to a SQL 2000 Server. The script works just great
when executed as an ActiveX script in a DTS package like so;
Dim fso, f, f1, fc
Dim s
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.GetFolder("C:\Temp\DB_Build\DTS")
Set fc = f.Files
For Each f1 in fc
Dim MyDTS
Set MyDTS = CreateObject("DTS.Package")
s = "C:\Temp\DB_Build\DTS\" & CStr( f1.Name )
MyDTS.LoadFromStorageFile s,""
MyDTS.SaveToSQLServer
"(local)",,,DTSSQLStgFlag_UseTrustedConnection,,,,,True
Next
set fso = nothing
set f = nothing
set f1 = nothing
set fc = nothing
set MyDTS = nothing
set s = nothing
I would like to be able to run this Script directly in a SQL job but when
I
do I get the following error message;
Executed as user: xx\xxx. Error Code: 0 Error Source= Microsoft OLE DB
Provider for SQL Server Error Description: Invalid authorization
specification Error on Line 10. The step failed.
It seems to "not like" the LoadFromStorageFile instruction when saved in a
job but again the exact code works just fine when run within a DTS.
My question, if anyone knows, is what is the difference when running an
ActiveX script within a DTS versus running the script directly in a job?
I'm
trying to figure out if I am wasting my time trying to do it this way. Any
help is appreciated. Thanks.
-RJ
.
- Follow-Ups:
- Prev by Date: Migrate Active X ADO script to SSIS
- Next by Date: Re: SSIS and Informix
- Previous by thread: Migrate Active X ADO script to SSIS
- Next by thread: Re: ActiveX script works in DTS but not in job, why?
- Index(es):
Relevant Pages
|