Below is the SQL query to get the list of packages deployed to an Integration Server:
WITH
ChildFolders
AS
(
SELECT
PARENT.parentfolderid,
PARENT.folderid,
PARENT.foldername,
CAST('' AS SYSNAME) AS RootFolder,
CAST(PARENT.foldername AS VARCHAR(MAX)) AS FullPath,
0 AS
Lvl
from msdb.dbo.sysssispackagefolders
PARENT
WHERE
PARENT.parentfolderid IS
NULL
UNION ALL
SELECT
CHILD.parentfolderid,
CHILD.folderid,
CHILD.foldername,
CASE
ChildFolders.Lvl
WHEN
0 THEN CHILD.foldername
ELSE
ChildFolders.RootFolder
END AS RootFolder,
CAST(ChildFolders.FullPath
+ '/' + CHILD.foldername AS VARCHAR(MAX))
AS
FullPath,
ChildFolders.Lvl
+ 1 AS Lvl
FROM msdb.dbo.sysssispackagefolders
CHILD
inner join ChildFolders ON
ChildFolders.folderid =
CHILD.parentfolderid
)
SELECT F.RootFolder, F.FullPath, P.name AS PackageName,
P.[description]
AS PackageDescription,
P.packageformat,
P.packagetype,
P.vermajor, P.verminor, P.verbuild, P.vercomments,
CAST(CAST(P.packagedata AS VARBINARY(MAX)) AS XML) AS PackageData
FROM
ChildFolders F
inner join msdb.dbo.sysssispackages P on
P.folderid = F.folderid
ORDER BY F.FullPath ASC, P.name ASC;
No comments:
Post a Comment