Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Help!  My stored proc won't execute my SSIS package

Posted on 2013-12-16
4
Medium Priority
?
498 Views
Last Modified: 2016-02-10
Hi Experts,
I have created an SSIS package to import data into my SQL Server 2012 database.  I saved in the file system.  
I then created a stored procedure to execute my SSIS Package (see stored procedure code below).
When I run my stored procedure the data does not import.
When  I run the SSIS package using the Execute Package Utility, the job runs fine and all of my records get imported.

I need to be able to have my stored proc execute my SSIS package.  Are there any settings I need to change on the server?  Do I need to create a job for this?

ALTER PROCEDURE [dbo].[sp_executeSSISPackage] 
@returncode int

AS
BEGIN
DECLARE @params nvarchar(400)

SET @params = 'dtexec /file "C:\TransferData\FileTrans.dtsx"'

EXEC @returncode = xp_cmdshell @params,no_output

select @returncode
END

Open in new window

0
Comment
Question by:mainrotor
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 12

Expert Comment

by:Tony303
ID: 39722971
Hi,

Is there an error message at all?

Is the account that is running the sp allowed to see file C:\TransferData\FileTrans.dtsx?

Tony
0
 

Author Comment

by:mainrotor
ID: 39724352
There is no error message.  Yes, the account running the SP allowed to run the Stored Procedure.
0
 

Accepted Solution

by:
mainrotor earned 0 total points
ID: 39724767
Okay, so I recreated my SSIS package using Windows Authentication instead of SQL Server Authentication and passing it a User Name and Password.  
Now the Stored Procedure that runs the SSIS package is working fine.  This is great as a temporary fix, but I need to be able to provide SQL Server authentication for this SSIS package.

Tony303, you asked "Is the account that is running the sp allowed to see file C:\TransferData\FileTrans.dtsx?"
and to be honest, I don't know.  I suppose not.  How can I give a particular account access to run the stored procedure and see a particular file?

Thanks in advance,
mrotor
0
 

Author Closing Comment

by:mainrotor
ID: 39826104
I selected my own response as the valid answere because I got my SSIS to work.
0

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question