$20 to grab

  • If some one can help me to get lastest version of DTS package from storage file using TSQL or .vbs file. I will pay $20 via paypal

     


    Kindest Regards,

    Amit Lohia

  • We can't help you if you don't provide the details of the problem.

    And we do it for free .

  • Based on the following article 

    http://www.databasejournal.com/features/mssql/article.php/10894_3417651_2

    I am able to restore multiple package but the problem is if the package has multiple version it fails. To specify the version in LoadFromStorageFile I need to know the lastest version. I am stuck over there. I am able to solve the problem using VB but not through vbs.

    I get the following error

    activeX component can't create object on line

    Set objPkgInfos = CreateObject("DTS.SavedPackageInfos")

    I hope this is enough info. ok even if someone do not want the money I will donate to charity. I just need the answer ASAP.

     


    Kindest Regards,

    Amit Lohia

  • Not sure what you are trying to do - but if you are looking for a way to backup SQL DTS jobs and even restore them to different servers etc I would strongly recommend hopping over to http://www.sqldts.com and following their Downloads/Tool link and getting yourself a copy of DTS Backup 2000 - it does all you need ... I started writing something like this myself but when I found this it did more than my quick fix effort and much better too - also look at the article related to it as it points out some nasty weaknesses of saving and restoring via the normal COM interfaces (like it loses all your layouts and comments etc)

  • I think I am able to restore the DTS from storage file even with multiple package. Will post the code after I complete the project.

    Thank you to all of you who tried to help me


    Kindest Regards,

    Amit Lohia

  • I'd really go with that tool... Takes 1 minute to download/install and another minute to make the tranfer... really a nice tool.

  • See this link.

    All you have to do is save the package as a vb module. Perform the changes in the attached artile as well as changing the server name if different. Then load the output into any program that runs vba (e.g. excel), add references to the microsoft dts libraries and run.

    Voila, package has been restored.

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dtsprog/dtspapps_8jfp.asp


    ------------------------------
    The Users are always right - when I'm not wrong!

  • We do not need any VB or a tool to do this

    SQlServer=WScript.Arguments(0)

    Filename=WScript.Arguments(1)

    UserId=WScript.Arguments(2)

    Password=WScript.Arguments(3)

    const TrustedConnection = 256

    Dim PackageDate

    Dim VersionId

    Dim PackageId

    Set oPackage1 = CreateObject("DTS.Package2")

    For each PackageInfo in oPackage1.GetSavedPackageInfos(Filename)

     If PackageDate < PackageInfo.VersionSaveDate  Then

      PackageDate = PackageInfo.VersionSaveDate

      VersionId = PackageInfo.VersionId

      PackageId = PackageInfo.PackageId

     End If

    Next

    oPackage1.LoadFromStorageFile Filename,"",PackageId,VersionId,""

    oPackage1.SaveToSQLServer SQlServer,UserId ,Password

    Set oPackage1 = Nothing


    Kindest Regards,

    Amit Lohia

  • Thanks James Horsley . Though the vbs code works I will be still implementing the tool as it have the error logging feature.

    You are kind of Eligible for the $20. So you decide whether you want the money or should I give to charity.

    Amit


    Kindest Regards,

    Amit Lohia

  • I vote charity .

  • Yes - charity it is Amit - the appeal for Niger would be good

  • I am charity  right now so feel free to Pay your Pal Erik!!!

    Dam again!

  • I'm still waiting for the day where you help someone... maybe it's closer than I expect it to be .

  • I am  working as fast as i can. This monster that i am building is going to do alot of that.

    Making the connection between the consumer and the contractor a much simpler process and less costly for the people in the building industry is one of the many goals that i have set out to make happen..

    On my past post when i am looking for the way to find a contractor by zip is a service that i am implementing that will be so cheap any of the smaller contractors can afford it.

    So there Mr. Sql Man! 

     

    You guys are great! and gals (im assuming)

    Dam again!

  • Glad to hear that... but I was reffering to someone on this site needing sql help. We all help when we code, but we actaully get paid doing that (I'm assuming here too ).

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

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