SSIS Package Execution using dtexec utility

后端 未结 2 1445
南旧
南旧 2020-12-09 23:57

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"

相关标签:
2条回答
  • 2020-12-10 00:39

    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

    0 讨论(0)
  • 2020-12-10 00:48

    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

    0 讨论(0)
提交回复
热议问题