SQL Server Performance

DTS Packages

Discussion in 'SQL Server DTS-Related Questions' started by lara99, Oct 6, 2008.

  1. lara99 New Member

    hi all, I have lot of dts package son my production machine, everytime i save the dts package.
    it saves the version information of the dts package into the msdb table. now do i have to be concern about this
    is there a way to auto archive the version information for dts packages.
    all suggestions are welcomed.
    Thanks in advance.
  2. MohammedU New Member

    What is the benifit of doing archiving other than saving some space of MSDB?
    you can use the following query to archive and delete older versions of dts packages....
    select s1.*
    from sysdtspackages as S1
    where S1.createdate not in
    (select top 1 createdate
    from sysdtspackages as S2
    where S1.name = S2.name
    order by createdate desc)
    delete s1
    from sysdtspackages as S1
    where S1.createdate not in
    (select top 1 createdate
    from sysdtspackages as S2
    where S1.name = S2.name
    order by createdate desc)
  3. lara99 New Member

    • Thanks mohammad for your valuable code.

Share This Page