question

jacobmat9 avatar image
jacobmat9 asked

How to find/get the SQL Query behind a SSIS package

How can i get the SQL Query behind a SSIS package ?
ssisquery
6 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Dave_Green avatar image Dave_Green ♦ commented ·
Is this a package that is running on your system (in which case you can use profiler (if an older version of SQL server) or preferably Extended events to capture all queries that package runs, or dbcc inputbuffer with the SPID for the most recent) or is it a package in a file or package store that you want to investigate?
0 Likes 0 ·
Dave_Green avatar image Dave_Green ♦ commented ·
Also worth making clear that of course an SSIS package may well be running more than one query - is there something specific you're trying to solve?
0 Likes 0 ·
jacobmat9 avatar image jacobmat9 commented ·
I want to get the query of each component in the package (2208R2)to find out what it does. Instead of opening each component to look at the query, is there any other way to get the query of the whole package ? (Need it for documentation, manupulation and understanding).
0 Likes 0 ·
jacobmat9 avatar image jacobmat9 commented ·
cont-- This is a scheduled job running on the Server. (sorry i missed that to add)
0 Likes 0 ·
Mister Magoo avatar image Mister Magoo commented ·
Have you tried opening the package as an xml file and looking for the queries? once you understand the structure, you could write a SQL XML query to extract all the queries in a package.
0 Likes 0 ·
Show more comments

1 Answer

·
technette avatar image
technette answered
In order to see the contents of an SSIS package you have to open SQL Business Intelligence program (2005) for 2008 Its Visual Studio 2008.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.