Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Execute SSIS package stored in Database - From Stored Procedure Expand / Collapse
Author
Message
Posted Thursday, May 28, 2009 1:14 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, May 08, 2013 1:44 PM
Points: 47, Visits: 39
I am trying to execute a SSIS package that is stored in a SQL Server 2005 database - want to execute from a stored procedure in same database. What commands/operations are necessary.

I tried:

dtexec /SQL "\PKG_Name" /Server_Name "." /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING E /De "Password"

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '/'.
Post #725376
Posted Thursday, May 28, 2009 7:50 PM


SSCarpal Tunnel

SSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal TunnelSSCarpal Tunnel

Group: General Forum Members
Last Login: Today @ 8:44 AM
Points: 4,247, Visits: 9,499
For a start, try using single quotes around your literals ...

--edit:
You may first want to create an sp to help. Something like:

Create procedure [dbo].[s_ExecutePackage]
@FilePath varchar(1000) ,
@Filename varchar(128)
as
Declare @cmd varchar(1000)
select @cmd = 'dtexec /F "' + @FilePath + @Filename + '"'
exec master..xp_cmdshell @cmd
go

This will help you execute the package from within your sp, once you have enabled use of xp_cmdshell, of course.


____________________________________________________________________________________________

Help us to help you. For better, quicker and more focused answers to your questions, consider following the advice in this link:

http://www.sqlservercentral.com/articles/Best+Practices/61537/

If you are asking for help and your post does not contain a question, you should expect responses which do not contain any answers. Put a question mark in there somewhere - it's not rocket science.
Post #725557
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse