Solved

Read DTS Log Status

Posted on 2008-10-15
4
603 Views
Last Modified: 2013-11-30
Hi all,

I have the following code which runs a DTS package:

        Dim oPackage As DTS.Package = New DTS.Package()
        oPackage.LoadFromSQLServer( _
            ServerName:="SQLSVR1", _
            Flags:=DTS.DTSSQLServerStorageFlags.DTSSQLStgFlag_UseTrustedConnection, _
            PackageName:="CO_PRODUCT_IMPORT")
        oPackage.Execute()
        oPackage.UnInitialize()
        oPackage = Nothing

This DTS package simply imports a CSV file into an SQL Server 2000 table, appending the data onto existing data.

My question is, how can I read the DTS package log status (Success or Fail) from within my VB.NET Windows app?

I am using VS 2005 and SQL Server 2000.

Thanks.
0
Comment
Question by:FMabey
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 22726962
Assuming this is DTS and not SSIS, there's a bunch of sysdts* tables in MSDB, including sysdtspackagelog and sysdtssteplog
If this is indeed DTS then I can go and dig up a view I have that lets you interrogate the logs (there's a bit of table joining required)
0
 
LVL 3

Author Comment

by:FMabey
ID: 22728685
nmcdermaid,

This is indeed DTS. If you could provide me with those views that would be great.
0
 
LVL 31

Expert Comment

by:James Murrell
ID: 22733737
For this u need to set the dts logging option

Package --> properties --> select logging tab and specify a table or text file (should be on the local drive) to log the dts activity andstores the details in the table or text file
0
 
LVL 30

Accepted Solution

by:
nmcdermaid earned 500 total points
ID: 22819230
I can't find the script and I dont have SQL 2000 installed. Luckily I think someone's already done it.
 http://www.planet-source-code.com/vb/scripts/ShowCodeAsText.asp?txtCodeId=354&lngWId=5
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

749 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