SQL Server Performance

How to generate source code from package in MSDB

Discussion in 'SQL Server 2005 Integration Services' started by jaybyoun, May 25, 2007.

  1. jaybyoun New Member

    I have a situation of generate XML source codes from the packages those are in MSDB thru batch scripts for dependency check of DB objects.

    Anyone knows how to ?
    Or
    Anyone knows how to check the dependecy of SSIS packages ?

    thanks, JB

  2. jaybyoun New Member

    Here's what I found and it's good enough for me to check the dependency.

    The PackageData in MSDB..SysDTSPackages90 table can be retrieved in two different ways as below;

    In XML
    SELECT cast (cast (packagedata As varbinary (max)) as xml) FROM msdb..sysdtspackages90 where [name] = 'Your Pkg Name'

    In Varchar(max)
    SELECT CONVERT(VARCHAR(MAX), CONVERT (VARBINARY(MAX), packagedata)) FROM msdb..sysdtspackages90 where [name] = 'Your Pkg Name'

    Tks, JB

Share This Page