Getting error code 1 when calling SSIS package from a stored procedure (SQL Server 2008 R2)

Hello,
I am trying to execute a SSIS package from SQL Server 2008 R2 stored procedure but getting error code 1 (as per my knowledge, error code description is as below:
0 The package executed successfully.
1 The package failed.
3 The package was canceled by the user.
4 The utility was unable to locate the requested package. The package could not be found.
5 The utility was unable to load the requested package. The package could not be loaded.
6 The utility encountered an internal error of syntactic or semantic errors in the command line.
Details:
I have a stored procedure named "Execute_SSIS_Package" (see below sp) which executes 'Import_EMS_Response' SSIS package (when I execute this package directly from SQL Server BID it works fine it means package itself is correct) and calling
it from SQL as:- EXEC Execute_SSIS_Package 'Import_EMS_Response'.
Here I receives error code 1.
Can anyone help me to resolve this issue please?
Thanks in advance!
CREATE PROCEDURE [dbo].[Execute_SSIS_Package]
 @strPackage nvarchar(100)
AS
BEGIN
 -- SET NOCOUNT ON added to prevent extra result sets from
 -- interfering with SELECT statements.
 SET NOCOUNT ON;
 DECLARE @cmd VARCHAR(8000)
 DECLARE @Result int
 DECLARE @Environment VARCHAR(100)
    SELECT @Environment = Waarde
 FROM  Sys_Settings
 WHERE Optie = 'Omgeving'
 --print @Environment
 SET @strPackage = '"\W2250_NGSQLSERVER\BVT\' + @Environment + '\' + @strPackage + '"'
 SET @cmd = 'dtexec /SQL ' + @strPackage +  ' /SERVER "w2250\NGSQLSERVER"  /Decrypt "BVT_SSIS" /CHECKPOINTING OFF /REPORTING E'
 --print @cmd
 EXECUTE @Result = master..xp_cmdshell @cmd, NO_OUTPUT
 --print @Result
END

It has something to do with the security.
E.g. cmdshell is not enabled or the caller has not rights over the package.
There could be a syntax error, too.
I suggest you make the package runnable off a SQL Agent job then trigger the job from the stored proc with
sp_start_job <job name>
Arthur
MyBlog
Twitter

Similar Messages

  • ODBC Error connecting to a stored procedure SQL Server 2008 - Crystal 8.5

    I am running a local copy of SQL server 2008 and get an ODBC error when connecting to any stored procedure with or without parameter. The database are running in SQL Server 2000 compatibility mode on the local server.
    Do not get the error when connecting to one or more databse tables or when connecting to a stored procedure on a remote database.
    The error reported is "ODBC error:[Microsoft][ODBC SQL Server driver] Syntax error or access violation"
    I am running Vista OS.
    Any help would be appreciated..

    Hello,
    Interesting combination. All but CR 8.5 is supported on that OS.
    When you created your DSN did you using the 2008 Client or MDAC?
    I suggest you go back to supported platforms for CR 8.5
    If not then start debugging Vista permissions to start with...
    good luck
    Don

  • Upgrade DTSX packages from VS 2010 with SQL Server 2008 to VS 2013 and SQL Server 2014

    Hello everyone,
    I’m very new to SSIS world. I’ve been assigned a task to upgrade the existing packages running in VS 2010 with SQL Server 2008 to VS 2013 and SQL Server 2014. And then submit the migration report to my client.
    On very quick search at Google, I've found the following link. It seems like I just need to open the existing SSIS project in VS 2013 and follow the wizard.
    https://msdn.microsoft.com/en-us/library/cc280547.aspx
    Can anybody please advise, are there any other things need to be taken care while doing this up gradation process?
    Please share your experience.
    Any help would be much appreciated.
    Thanks, <b>Ankit Shah</b> <hr> Inkey Solutions, India. <hr> Microsoft Certified Business Management Solutions Professionals <hr> http://ankit.inkeysolutions.com

    Hello Arthur,
    Thank you for the response.
    I just got an access of the packages. They are of VS 2008 and not 2010.
    Do you know how to upgrade VS 2008 packaged to VS 2013?
    When I tried to open the solution file in VS 2013, it says "incompatible".
    Any help would be much appreciated.
    Thanks,
    Ankit
    Thanks, <b>Ankit Shah</b> <hr> Inkey Solutions, India. <hr> Microsoft Certified Business Management Solutions Professionals <hr> http://ankit.inkeysolutions.com

  • I keep getting error code 4450 when I'm trying to burn a CD from itunes.  It keeps my CD and won't eject it and says "cancelling burn" forever then itunes locks up and my cd is ruined and NO songs on it.

    i can't burn cd's in iTunes anymore. I get error code 4450 when I'm trying to burn a playlist. Songs from my own cd's, or bought in iTunes (have not burned 7x's as I can't BURN any cd's at all!),  Then my cd gets stuck in the drive. and it says "cancelling burn" forever and then itunes freezes up. I have a Dell with Windows 7.
    -I've slowed down the burn as slow as it can go
    -I have bought 3 different brands of cd's
    -i have the latest version of iTunes.
    Can someone help me?

    I have Windows 7 on a Dell.  Open and play iTunes in the compatability mode and use Windows XP (service pack 2).  Disregard any messsages to disable the compability mode.  This has worked for me.  I have also reinstalled iTunes and played with burn speeds etc.  These ideas did not work.  Compatability mode works.

  • TS1368 Hi I'm running windows Vista premium home and i'm getting error code 1202 when attemting to log into store. how do i fix this

    i'm getting error code 1202 when i try to log on to the itunes store using windows vista

    http://support.apple.com/kb/TS1368

  • Get error code 0x80070643 when I try to install Sql Server 2008 R2 Service Pack 1 (KB2528583)

    I keep getting error code 0x80070643 when I try to install Sql Server 2008 R2 Service Pack 1 (KB2528583)
    Operating System is Windows 2008 R2 64 bit

    Hi JamesRead,
    According to your description, when you install SQL Server 2008 R2 service pack 1, we need to verify if
    you must have administrative rights on the computer.
    There are multiple files available for the download, you will be prompted to select the files you need. We need to verify if you run the SQLServer2008R2SP1-KB2528583-x64-ENU.exe. Or you can install SQL server updates from the command
    prompt and check if it can install successfully.
    You can prepare an installation of database engine instance to include product update:
    setup.exe /q /IAcceptSQLServerLicenseTerms /ACTION=PrepareImage /UpdateEnabled=True /UpdateEnabled=True /UpdateSource=<path where the update is downloaded> /INSTANCEID=<Instance ID> /FEATURES=SQLEngine
    For more information, you can review the following article about installing Updates from the Command Prompt.
    http://technet.microsoft.com/en-us/library/dd638066.aspx
    Thanks,
    Sofiya Li
    If you have any feedback on our support, please click here.
    Sofiya Li
    TechNet Community Support

  • Since installing the latest update my mother-in-law gets Error Code VM502 when sending to only 6 recipients

    Since installing the latest update my mother-in-law gets Error Code VM502 when sending to only 6 recipients. This didn't happen before the update.

    The error came from your providers server. You need to ask them why they are setting limits.
    Thunderbird does not have any limits.

  • Why am I getting error code 1402 when trying to update adobe reader 10?

    Why am I getting error code 1402 when trying to update adobe reader 10?

    Impossible to guess the "why" with so little information, but this may be helpful if you want to solve the problem: Error 1402 | Error 1406 | Acrobat, Reader

  • Getting error code 1611 when trying to restore my Ipod. I have tried a forced restore and disabling my computer security and still nothing...ready to throw it out the window at this stage...help!!

    Getting error code 1611 when trying to restore my Ipod. I have tried a forced restore and disabling my computer security and still nothing...ready to throw it out the window at this stage...help!!

    Error 1611
    This error typically occur when security software interferes with the restore and update process. FollowTroubleshooting security software issues to resolve this issue. In rare cases, this error may be a hardware issue. If the errors persist on another computer, the device may need service.
    If you also unsuccessful on another computer then time for an appointment at the Genius Bar of an Apple store. It would see that your iPod needs service as specified in the article.

  • I get error code -8058 when attempting to copy and paste in Finder, I get error code -8058 when attempting to copy and paste in Finder

    I get "error code -8058" when attempting to copy and paste in Finder, I get error code -8058 when attempting to copy and paste in Finder. "Alt +Drag" works. Any ideas?

    Have a look at the 'More Like This' to the right - seem to be some solutions offered: >>>>>>>>>>>>>>>>>

  • Getting error code A12E1 when trying to install CC update -- help! (Mac OS 10.7.5)

    Getting error code A12E1 when trying to install CC update -- help! (Mac OS 10.7.5) I have disabled my security software, but that doesn't help.  Any ideas?

    http://helpx.adobe.com/creative-cloud/kb/a12e1-error-downloading-creative-cloud.html

  • Getting error code 49 when downloading Bridge.  how do i fix this

    I am getting error code 49 when downloading Bridge.
    It seems Adobe CHAT is non-existent.  Can anyone help?

    The chat link can be elusive as can the people that support it over the weekend.  It does work, at least for most people, but not all.
    Chat support - For the link below click the Still Need Help? option in the blue area at the bottom and choose the chat option...
    Make sure you are logged in to the Adobe site, have cookies enabled, clear your cookie cache.  If it fails to connect try using a different browser.
    Creative Cloud support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html ( http://adobe.ly/19llvMN )
    It looks somewhat like the following when it gets thru properly (I don't think the 24/7 is a true story)...

  • I keep getting error code 54 when synching iphone 5, how do i fix?

    i keep getting error code 54 when synching iphone 5, how do i fix?

    Hi papabear74,
    Try using the steps in the following article to help you troubleshoot this issue:
    Resolve iOS update and restore errors in iTunes
    http://support.apple.com/kb/TS1275
    Thanks for using the Apple Support Communities. Have a good one!
    -Braden

  • TS3694 I am getting error code 3194 when i try to update my iphone 4S to IOS 6.1.3. How can i resolve this

    I am getting error code 3194 when i try to update my iphone 4S to IOS 6.1.3. How can i resolve this?

    Here you go:  http://lmgtfy.com/?q=iphone+error+3194

  • HT1918 why do I keep getting error code 5002 when trying to make a purchase? Has been almost a week now!

      Why do I keep getting Error Code 5002 when trying to make a purchase from the Itunes store? I am using Vista Home edition> havent had any problems before. This has been going on for a week.

    This alert is often the result of an issue with verifying your billing.
    Quit iTunes.
    Open iTunes.
    Test the issue.
    If it persists, sign in to store.apple.com using your iTunes account
    Click on Change account information
    Modify or remove your credit card information.
    Click Continue.
    Test the issue.

Maybe you are looking for