Question

I have made a SSIS package to create an XML file, which works fine in Visual Studio, but when I try to run in cmd prompt using dtexec /f "C:\OakeyCreek.dtsx" it throws an error

SSIS Package "TestOakey" failed with exit code: 1

In the package a sqltask gives resultset as XML and a script task creates the xml file.

I did some research, same package without script task run fine both studio and cmd prompt. I am suspecting problem with script task, because I have both VS2005 and VS2008 on the same machine.

Any idea how to resolve this problem ?

Exact error ms popup is ...

Registration information for this application needs to be updated.To update, log on as an administrator and run this command.

"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VSTA.exe" /HostID SSIS_ScriptTask /setup

My operating system is Vista

Was it helpful?

Solution

Note: Edited to provide the answer!

So you've set up a SQL Server Agent job, and now you can't write to the file system. This is expected behavior, since SQL Server Agent uses SQL Server credentials to launch the job, not Windows credentials. So, what you'll have to do is this:

  1. Under the Security folder in the Database Server in SQL Server Management Studio, find the Credentials folder.
  2. Right click Credentials and hit New Credential.
  3. Set up the Credential as you.
  4. Expand SQL Server Agent, and right click Proxies, and hit New Proxy.
  5. Set up the Proxy as you, using the Credential you just created.
  6. Enable the Proxy to have the SSIS subsystem (if it's admin, check all of them).
  7. Go edit the step on your job that calls the SSIS package.
  8. Change the Run As field from SQL Server Agent to the Proxy that you just set up (if you did it right, it will be the only other choice in the dropdown).
  9. You should be good to go!

Cheers,
Eric

OTHER TIPS

You are creating the package using SSIS 2005, but running it using DTEXEC from SSIS 2008 - you probably have both SSIS 2005 and 2008 installed, and DTEXEC 2008 appears first in the path.

To use DTEXEC 2005, specify full path, like "c:\program files\Microsoft Sql Server\90\dts\binn\dtexec.exe" /f Package.dtsx

In theory, DTEXEC 2008 should also be able to run the package (it should upgrade it on the fly to SSIS 2008 format), but there might be bugs and incompatibilities between the versions. Also it seems something is wrong with script task setup in SSIS 2008. Why would not you follow the instructions in the error message: logon as administrator and (using elevated command prompt) run -

"C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VSTA.exe" /HostID SSIS_ScriptTask /setup

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top