I need to search all the SSIS Projects deployed on a server SSISDB Catalog for a specific substring.
My idea is to write a SQL Query on SSISDB.catalog views and internal.package tables to access the package_data field, which is of type varbinary(max) and I was thinking it might contain the package source code, but I found out that this column is always null.
Using SSMS it's possible to export the ispac files for deployed projects, therefore the package content it's hidden somewhere.
So the question is: how can i extract the ssis pacakges source code using TSQL?
this query retuns no rows on my SQL Server 2022 instance
SELECT TOP (1000) *
FROM [SSISDB].[internal].[packages]
where package_data is not null
-
Why do you need to do this in T-SQL / what's the end goal? I imagine the package is compiled, making this not directly possible.J.D.– J.D.2025年03月16日 18:38:44 +00:00Commented Mar 16 at 18:38
-
Any chance you are looking for strings in environment variables or project/package parameters, or could the substring be anywhere (including a component name or a comment on the canvas)?ImperviousInclemency– ImperviousInclemency2025年03月20日 21:11:37 +00:00Commented Mar 20 at 21:11
1 Answer 1
I'm not sure if you can do anything with TSQL, but if you're trying to find a string as it occurs in an integration, and don't have access to the original project, you can use Visual Studio with Integration Services extension.
- Create a new project of type Integration Services Import Project Wizard.
- In the wizard, either use your .ispac file you referenced, or connect to your SQL Server with the integration services catalog
- With your integration files now loaded into the project and saved, you can navigate to the project folder and find the .dtsx files, open them in your desired editor and search to your heart's content
- You may even be able to upload their text into an XML column in SQL should you want to search using TSQL, though I think you'd find it easier to navigate XML using other tools
-
Thank you, but the problem is that there are hundreds of SSIS projects. That search I need to make is precisely to find the projects containing the packages with that string.sergiom– sergiom2025年04月29日 07:43:21 +00:00Commented Apr 29 at 7:43