Solved

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

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

735 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