Error Logging in DTS

  • Hi

    I want to insert some user defined messages in error file of DTS package.  is it possible and how. 

    To briefly explain what I am doing,  I have table A containing unique rows.  Table B is imported and it also has certain unique rows.  I do a join on table A and table B to find out those rows in table A which are not contained in table B. These rows are defined as missing rows and I want to insert these row names in error file.

    I have already tried using DTSPackageLog in my activeXscript task. It gave me error ('Object required - DTSPackageLog).  I even tried to use DTSPackageLog as a stand alone application.  And I have no idea where DTSPackageLog will write to in case if it works.

    Any help will be appreciated.

  • Why do you not just add a task at the end of the job that:

     

    1. Selects all records from table a where aid not in table b.id.

    2. Then export the results of the sql script into a text file.

    Just need two connections - One to the data source and one to the text file. You can even put it in the same dts package at the end.


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

  • First, make sure you have enabled DTS Package Logging on the Package Properties page.

    If you log to SQL Server, then the log information can be found in sysdtspackagelog, sysdtssteplog and sysdtstasklog tables that are located in the msdb database. You can view the logs by right-clicking on the package in Enterprise Manager.

    You also have the option of logging to a text file, but personally I don't think that's as useful as logging to a table that you can query for results.

    Also, the DTSPackageLog methods will only work when the package it executing. It will fail if you're just executing one of the tasks to test it.

    --------------------
    Colt 45 - the original point and click interface

  • Thanks.  Finally I decided to put messages in windows event log.

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

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