How to Query Integration Services Catalog

痴心易碎 提交于 2020-01-15 02:46:33

问题


Problem: Identify all SSIS packages that connect to a specific database table on SQL Server.

Details: There are almost 100 packages deployed to the server, most packages are huge in size, so it will be difficult to go through them manually with a high degree of accuracy.

Is there a fast and automated way to do this?

Potential solution using SQL Server:

  1. Query the Integration Services Catalog and retrieve the *.dtsx package
  2. Load the package data into an XML column/data type
  3. Parse/query the package for any reference to the specific database table

Perhaps a C# application may do the same?

I greatly appreciate any assistance that can be afforded.


回答1:


Credit goes to Ms SQL Girl: http://www.mssqlgirl.com/editing-published-ssis-package-in-sql-server-2012.html

USE SSISDB

SELECT pr.name AS [ProjectName]
    , pr.description AS [ProjectDescription]
    , pr.last_deployed_time AS [ProjectLastValidated]
    , pr.validation_status AS [ProjectValidationStatus]
    , op.object_name AS [PackageName]
    , op.design_default_value AS [DefaultConnectionString]
FROM [internal].[object_parameters] op
INNER JOIN [internal].[projects] pr
ON pr.project_id = op.project_id
AND pr.object_version_lsn = op.project_version_lsn
WHERE op.parameter_name LIKE '%.ConnectionString'



回答2:


I would open the Visual Studio project containing all these packages (using VS), and then use the VS "Find in Files" function to search for the table name. It is quite quick, and using the "Match whole word" search should pop up just what you want.

If you don't already have a Visual Studio project/solution containing these packages, you probably should download them and build one anyway, so they can be supported/maintained.



来源:https://stackoverflow.com/questions/34098087/how-to-query-integration-services-catalog

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!