Dynamic Logging

  • I currently have loggin enable on several of my packages. However, we are still in development of our packages and are reaching upwards of 100 and logging will eventually need to be active on all of them. In production, there will still be a development server and a production server, both with different server names and user id/pwd.

    I am looking for a way to dynamically change the logon information for the logging so that we do not have to have someone go through and manually change the options. I have tried using Dynamic Properties Task, but this only works on the 2nd run of the package.

    -----

    As a second question: can anyone explain to me why the errordescription field in sysdtssteplog is cut short?

  • If anyone is curious, I came up with this over the course of the day. Don't know if it's useable due to a nice little side effect. Anyway, I found a way to do it through VB Script.

    '**********************************************************************

    ' Visual Basic ActiveX Script

    '************************************************************************

    Function Main()

    Dim Package

    Set Package = CreateObject("DTS.Package2")

    Package.LoadFromSQLServer "servername", "password", "username", , , , , "package name"

    Package.Properties("LogServerName").Value = "servername"

    Package.Properties("LogServerPassword").Value = "password"

    Package.Properties("LogServerUserName").Value = "username"

    Package.Properties("LogToSQLServer").Value = "True"

    Package.SaveToSQLServer "servername", "password", "user name", , , , , "package name"

    Main = DTSTaskExecResult_Success

    End Function

    You can run this as an ActiveX Script in it's own DTS Package and it can used to looped through to update every package. However, it royally messes up the package at the moment. They still run, but the package is visually messed. Here's a nice image here

    Feel free to critique my package

    And of course, any help on the script so that it doesn't mess up packages or if you can think of another way to do what I'm trying to do, I am all ears!

    Package Names and server information (duh!) have been removed

  • Using anything other than the DTS Designer will hose the display.  If I am going to only use code once to alter the DTS package, I do it at the beginning, then I make it pretty.

    Russel Loski, MCSE Business Intelligence, Data Platform

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

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