?
Solved

Read DTS Log Status

Posted on 2008-10-15
4
Medium Priority
?
606 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 2000 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

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.
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Suggested Courses

741 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