DTS Repository Pkg with lots of Versions...

  • Hi all!

    I have about 9 versions of a DTS repository package, I have saved the one I want and am trying to delete the old one. EM just hangs for more than 15 mins and when it comes back it has'nt deleted the package. Any ideas on how to get rid of the old pkg?

    regards

    Uday

  • This will help.

    SELECT

    p.name,

    p.id,

    p.versionid,

    p.createdate

    FROM

    msdb..sysdtspackages p

    WHERE

    p.name = 'whateveryoulookforgoeshere'

    ORDER BY

    id,

    createdate DESC

    -----------------------------------------Seperate Code--------------------------------------

    EXEC msdb..sp_drop_dtspackage 'Packagenamegoeshere', 'package_id_value_goes_here', 'package_versionid_goes_here'

    -----------------------------------------Example Code---------------------------------------

    Example I have a package "New Package" so I run

    SELECT

    p.name,

    p.id,

    p.versionid,

    p.createdate

    FROM

    msdb..sysdtspackages p

    WHERE

    p.name = 'New Package'

    ORDER BY

    id,

    createdate DESC

    Which returns

    (Sorry table don't line up as well as should.)

    name id versionid createdate

    -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------ ------------------------------------ ------------------------------------------------------

    New Package FE9D1E6F-9C70-4A59-A7E3-F3545CCDCA6C 579B96D6-AE19-442D-AAEE-31795863F01B 2002-02-22 09:42:23.227

    New Package FE9D1E6F-9C70-4A59-A7E3-F3545CCDCA6C A128C7BC-9222-4296-954E-797492774175 2002-02-22 09:41:57.350

    (2 row(s) affected)

    And I want to delete the oldest package so dated '2002-02-22 09:41:57.350', so I run

    EXEC msdb..sp_drop_dtspackage 'New Package', 'FE9D1E6F-9C70-4A59-A7E3-F3545CCDCA6C', 'A128C7BC-9222-4296-954E-797492774175'

    Now when I run

    SELECT

    p.name,

    p.id,

    p.versionid,

    p.createdate

    FROM

    msdb..sysdtspackages p

    WHERE

    p.name = 'New Package'

    ORDER BY

    id,

    createdate DESC

    I get

    name id versionid createdate

    -------------------------------------------------------------------------------------------------------------------------------- ------------------------------------ ------------------------------------ ------------------------------------------------------

    New Package FE9D1E6F-9C70-4A59-A7E3-F3545CCDCA6C 579B96D6-AE19-442D-AAEE-31795863F01B 2002-02-22 09:42:23.227

    (1 row(s) affected)

    Hope this helps get what you want.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply