Solved

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

Posted on 2013-12-16
4
483 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
  • 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
A couple of weeks ago, my client requested me to implement a SSIS package that allows them to download their files from a FTP server and archives them. Microsoft SSIS is the powerful tool which allows us to proceed multiple files at same time even w…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

813 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now