[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Read DTS Log Status

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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

650 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