1

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

2 Answers 2

6

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

6
  • 1.No encrypted password 2. yes right click and execute the package it is working fine. 3.have administrator permissions and tested by creating job (with out script task runs fine any where) this proves have enough permissions,but with script task IO operations it through popup error msg as 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
    – rmdussa
    Commented Apr 30, 2009 at 5:41
  • Thanks for help ,I followed the above steps and run the job error Message Executed as user: RDUSSA\ptpsecurity. ...10.0.1600.22 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 4:17:30 PM Warning: 2009-04-30 16:17:31.00 Code: 0x80019316 Source: Package Format Migration Module Description: The provider name for the connection manager "RDUSSA\SQL2005.TEST_433_Oaky_Creek" has been changed from "SQLNCLI.1" to "SQLNCLI10". End
    – rmdussa
    Commented Apr 30, 2009 at 6:25
  • Warning Error: 2009-04-30 16:17:31.03 Code: 0xC0016016 Source: Description: Failed to decrypt protected XML node "DTS:Password" with error 0x80070002 "The system cannot find the file specified.". You may not be authorized to access this information. This error occurs when there is a cryptographic error. Verify that the correct key is available. End Error Warning: 2009-04-30 16:17:31.57 Code: 0x00000000
    – rmdussa
    Commented Apr 30, 2009 at 6:25
  • Source: Create XML File Create XML File Description: Found SQL Server Integration Services 2005 Script Task "ScriptTask_67dcab208af04bdcbf29... Process Exit Code 1. The step failed.
    – rmdussa
    Commented Apr 30, 2009 at 6:26
  • No Package password and Package protection is EncryptSensitiveWithUserKey
    – rmdussa
    Commented Apr 30, 2009 at 6:27
2

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

2
  • Great answer.I got it right with DTEXEC 2005, specify full path, like "c:\program files\Microsoft Sql Server\90\dts\binn\dtexec.exe" /f Package.dtsx but Still I did not follow the error msg "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\VSTA.exe" /HostID SSIS_ScriptTask /setup Thanks Michael
    – rmdussa
    Commented Apr 30, 2009 at 7:02
  • Regarding VSTA... I have no idea why this error occurs, but SSIS team is trying to tell you how to fix this installation problem. Probably worth just trying to run this command as told by the error message. Commented Apr 30, 2009 at 16:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.