DTS - DTSPackageLog in Data Driven Query or Data Pump Task

Posted on 2006-04-11
Last Modified: 2012-06-27
In an "ActiveX Script" task, I can access the DTSPackageLog object, but in ActiveX scripts embedded in the Data Driven Query or Data Pump task, the DTSPackageLog object is not available to use.

Does anyone know why?  I don't see why DTS exposes that object for some ActiveX scripts and not others.

But the real question is, is there a way I can write to the package log while I'm in a Data Driven Query or Data Pump task?
Question by:khooc
    LVL 75

    Expert Comment

    by:Anthony Perkins
    >>Does anyone know why? <<
    I don't see why not.  Can you show us what you are doing and what error you are getting.

    >>But the real question is, is there a way I can write to the package log while I'm in a Data Driven Query or Data Pump task?<<
    You do realize the Package log does not get written to until the Package finishes, right?

    Author Comment

    Hi acperkins,

    To give you an idea (SQL Server 2000 DTS),

    1. Create a Data Driven Query Task or Data Pump Task and double click to see its properties.
    2. Go to the Transformations tab
    3. Select Name, Edit -> Properties and an ActiveX script should come up
    4. Type in DTSPackageLog.WriteStringToLog "Test"
    5. OK, OK, OK and try to run it.

    An error should come up saying that DTSPackageLog doesn't exist.
    LVL 75

    Accepted Solution

    You are right.  DTSPackageLog can only be used with an ActiveX Script Task.

    Author Comment

    Gee... since no one has said anything, I guess DTSPackageLog is limited in that sense.

    I wonder if it'll work if you set it to a DTSGlobalVariable in a previous task and then retrieve it later in the pump/query task.

    Anyway the project is done now so I'm onto other bigger and better things :-)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Introduced in Microsoft SQL Server 2005, the Copy Database Wizard ( is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
    This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
    Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
    Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now