Solved

Read DTS Log Status

Posted on 2008-10-15
4
598 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
  • 2
4 Comments
 
LVL 30

Expert Comment

by:nmcdermaid
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

763 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

6 Experts available now in Live!

Get 1:1 Help Now