Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS Package Logs

Status
Not open for further replies.

plsh

Programmer
Mar 5, 2003
118
ZA
Good day,

Does any one know if it is possible to view the dts package log details from something like VB? Or if you can import the contents of the log into a table within SQL Server?

Thanks in advance.
 
I found this script ( The FAQ talks about accessing the package log from within the package for the purpose of truncating it. Accessing the file is the tough part. Once you're there, you can do what you like with the information. HTH. Good luck!

Code:
' Pkg 240 (Overwrite Pkg Log)
Option Explicit

Function Main()
	Dim oFSO, sLogFile

	sLogFile = DTSGlobalVariables.Parent.LogFileName 

	Set oFSO = CreateObject("Scripting.FileSystemObject")

	If oFSO.FileExists(sLogFile) Then
		oFSO.DeleteFile sLogFile, True
	End If

	Set oFSO = Nothing

	Main = DTSTaskExecResult_Success
End Function

--Angel [rainbow]
-----------------------------------
Every time I lose my mind, I wonder
if it's really worth finding.
 
DTS package log file is present as a text file.You could simply add one more connection in the dtspackage which import into SQL Server table whenever the package got executed.Since you need to specify the location of the log file.so when you add one more connection which import the log file into SQL Server table.You could use Transform Data Task to map the column and contents.

If you dont want any previous package execution history.You could add the step of deleting current log file in the activex
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top