Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Dynamic Logging Properties

Author  Topic 

Doghound
Starting Member

4 Posts

Posted - 2007-02-07 : 10:48:17
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?

Doghound
Starting Member

4 Posts

Posted - 2007-02-07 : 17:54:56
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: [url]http://img182.imageshack.us/my.php?image=messeduptt7.png[/url]

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
Go to Top of Page
   

- Advertisement -