Error Log

  • Hi,

          I am new to DTS Packages. I have a package that has a series of tasks. I have a common log file for the entire package which I config at                DTS package properties(icon)->Logging(tab)-> Error handling/Error File. I specify the file name in this text-box. However, for each run I want to concatenate the timestamp(or date) at the end of the filename filled in that location.

    Let me know if this is possible. If it be possibe, kindly share the method with me in detail.

    Thanks in advance,

    Debayan

     

     

     

  • You could try something like this, create a global variable (g_PackageLog for example) and give it a value including the fully qualified path and then in an ActiveX script:

    Function Main

    DIM sLog

    sLog = DTSGlobalVariables("g_PackageLog").Value & Month(Now) & Day(Now) & Year(Now)

    DTSGlobalVariables.Parent.LogFileName = sLog

    Main = DTSTaskExecResult_Success

    End Function

    Everyday the package runs it would get a new file name containing the current date, you could even add hours, minutes and seconds if you are concerned about it running several times in one day. 

  • Thanx a lot for this answer. It works great. Thanx for yr timely help.

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

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