Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

querying ssisdb to find the name of packages

i was querying the ssis catlog to find out the name of all the packages in the catalog.
There are only 6 packages in the Folder1 project,but the query gives 9 records

 1. SELECT P.NAME FROM SSISDB.internal.projects PRJ INNER JOIN
    SSISDB.internal.packages P ON
    P.project_version_lsn=PRJ.object_version_lsn WHERE
    PRJ.NAME='Folder1'

Does it show the deleted packages from the project as well.

like image 538
user1254579 Avatar asked Nov 07 '16 14:11

user1254579


People also ask

How do I view Ssisdb packages?

Go to Connect to Server and select the Server Type as Integration Services and give the Server Name then click connect. Go to Object Explorer on the left corner. You can see the Stored Package folder in Object Explorer. Expand the Stored Package folder, here you can see the SSIS interfaces.

Where are packages stored in Ssisdb?

The default folder is the Packages folder, located in %Program Files%\Microsoft SQL Server\100\DTS. The MSDB folder lists the Integration Services packages that have been saved to the SQL Server msdb database on the server.

How do I find the table name in SSIS package?

The table references will be inside the XML of the SSIS Package. If you right click on a . dtsx and select edit with notepad++, this will open the xml and allow you to see what is being called.


1 Answers

They aren't deleted, that's part of the historical tracking. You likely wanted a query more similar to

SELECT
    F.name AS FolderName
,   P.name AS ProjectName
,   PKG.name AS PackageName
FROM
    ssisdb.catalog.folders AS F
    INNER JOIN 
        SSISDB.catalog.projects AS P
        ON P.folder_id = F.folder_id
    INNER JOIN
        SSISDB.catalog.packages AS PKG
        ON PKG.project_id = P.project_id
ORDER BY
    F.name
,   P.name
,   PKG.name;

This reflects that Folders contain Projects and Projects contain Packages so that will provide the exact "address" for a given package.

like image 69
billinkc Avatar answered Sep 22 '22 01:09

billinkc