Execute SSIS Package using the Stored Procedure in T-SQL.

Who is online?  0 guests and 0 members
Home  »  Blogs  »  Anil  »  Execute SSIS Package using the Stored Procedure in T-SQL.
rpyra and user158740 like this.
 
0
/5
Avg: 0/5: (0 votes)

Comments (5)

user158740
user158740 said:
Hello Anil, Thanks for the code,great help. Your code allows me to execute the package which involve upload from excel file to database table through Stored Procedure.(which is working) but I am not able execute package which involve .csv file to database table upload through Stored Procedure.(which is not working). I am following these steps: –Step -1 USE master GO EXEC sp_configure ‘show advanced options’, 1 GO RECONFIGURE WITH OVERRIDE GO EXEC sp_configure ‘xp_cmdshell’, 1 GO RECONFIGURE WITH OVERRIDE GO EXEC sp_configure ‘show advanced options’, 0 GO – Step 2 DECLARE @returncode int EXEC @returncode = xp_cmdshell ‘dtexec /f “C:\RND\Package.dtsx”‘ Error After Execution of the code. Description: Unable to load the package as XML because of package does not have a valid XML format. A specific XML parser error will be posted. Description: Failed to open package file "C:\RND\Package.dtsx" due to error 0x80070003 "The system cannot find the path specified.". This happens when loading a package and the file cannot be opened or loaded correctly into the XML document. This can be the result of either providing an incorrect file name was specified when calling LoadPackage or the XML file was specified and has an incorrect format. FYI I am able to execute the package from front end (BI Studio) and all my data from .csv file is getting loaded into my desired table. Pleas reply me ASAP. Thanking You. salmansayed99@gmail.com
10/14/2011
 · 
 
by
AnnieM
AnnieM said:
At our Company the DBAs will not allow us to execute XP_CMDSHELL as this can be very dangerous option to open up. We had to create a job and execute the job from the Stored Procedure.
2/20/2012
 · 
 
by
philipsb
philipsb said:
@AnnieM: you can then call the SQL job using the sp_start_job.
2/20/2012
 · 
 
by
rpyra
rpyra said:
Anil, very helpful article, wish I had it bookmarked earlier. I do know
2/21/2012
 · 
 · Anil likes this.
 
by
anurag.sharma
anurag.sharma said:
Hi I have created a stored proc in which i execute my ssis package as mentioned above. The package takes in two parameters and executes successfully. The issue is with error handling. I have executed the package in a try catch block. But if the package fails for any reason, the error is not trapped by the catch block. Is there any way to catch the error in the stored proc to make it easier to debug? Thaks
28 days ago
 · 
 
by
Blogs RSS Feed

Anil's latest blog posts

Blogs RSS Feed

Latest community blog posts