Discussion:
dts Logging
(too old to reply)
Bill Swartz
2005-07-12 22:03:07 UTC
Permalink
Does anyone know how to write to or modify the log output of dts?

Currently the output looks something like this..
DTSRun: Loading...

DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSDynamicPropertiesTask_2
DTSRun OnFinish: DTSStep_DTSDynamicPropertiesTask_2
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2
DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_2
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_3
DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_3
DTSRun OnStart: DTSStep_ValidateConnections
DTSRun OnError: DTSStep_ValidateConnections, Error = -2147220421 (8004043B)
Error string: The task reported failure on execution.
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp


I intentionally failed this, but want to write to the log a provide some
background about what was happening and what the failure was.

Thanks
Bill
Allan Mitchell
2005-07-12 22:10:13 UTC
Permalink
You can write to the log but ONLY from the AX Script task using
WriteStringToLog() method. Everything else though is set in stone (at least
for the current release)
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
Post by Bill Swartz
Does anyone know how to write to or modify the log output of dts?
Currently the output looks something like this..
DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSDynamicPropertiesTask_2
DTSRun OnFinish: DTSStep_DTSDynamicPropertiesTask_2
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2
DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_2
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_3
DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_3
DTSRun OnStart: DTSStep_ValidateConnections
DTSRun OnError: DTSStep_ValidateConnections, Error = -2147220421 (8004043B)
Error string: The task reported failure on execution.
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
I intentionally failed this, but want to write to the log a provide some
background about what was happening and what the failure was.
Thanks
Bill
Bill Swartz
2005-07-12 22:43:22 UTC
Permalink
Yeah, that writes to the eventlog, but not the output stream of a dtsrun
statement.. I should have been clear on which log....

Bill
Post by Allan Mitchell
You can write to the log but ONLY from the AX Script task using
WriteStringToLog() method. Everything else though is set in stone (at
least for the current release)
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
Post by Bill Swartz
Does anyone know how to write to or modify the log output of dts?
Currently the output looks something like this..
DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSDynamicPropertiesTask_2
DTSRun OnFinish: DTSStep_DTSDynamicPropertiesTask_2
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2
DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_2
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_3
DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_3
DTSRun OnStart: DTSStep_ValidateConnections
DTSRun OnError: DTSStep_ValidateConnections, Error = -2147220421 (8004043B)
Error string: The task reported failure on execution.
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
I intentionally failed this, but want to write to the log a provide some
background about what was happening and what the failure was.
Thanks
Bill
Bill Swartz
2005-07-13 19:37:03 UTC
Permalink
Any thoughts on why the following isn't making it to the log file.. (log
file is set to 16mb with overwrite as needed)

errorFlag is True and package is reporting a failure to the GUI.

If (errorFlag) Then
DTSGlobalVariables("ErrorMessage").Value = errMsg
DTSPackageLog.WriteStringToLog errMsg
Main = DTSTaskExecResult_Failure
Else
Main = DTSTaskExecResult_Success
End If

Bill
Post by Allan Mitchell
You can write to the log but ONLY from the AX Script task using
WriteStringToLog() method. Everything else though is set in stone (at
least for the current release)
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
Post by Bill Swartz
Does anyone know how to write to or modify the log output of dts?
Currently the output looks something like this..
DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSDynamicPropertiesTask_2
DTSRun OnFinish: DTSStep_DTSDynamicPropertiesTask_2
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2
DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_2
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_3
DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_3
DTSRun OnStart: DTSStep_ValidateConnections
DTSRun OnError: DTSStep_ValidateConnections, Error = -2147220421 (8004043B)
Error string: The task reported failure on execution.
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
I intentionally failed this, but want to write to the log a provide some
background about what was happening and what the failure was.
Thanks
Bill
Allan Mitchell
2005-07-13 19:55:26 UTC
Permalink
In what log are you looking? The messages will appear in the package
execution log that you enable at the package level
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
Post by Bill Swartz
Any thoughts on why the following isn't making it to the log file.. (log
file is set to 16mb with overwrite as needed)
errorFlag is True and package is reporting a failure to the GUI.
If (errorFlag) Then
DTSGlobalVariables("ErrorMessage").Value = errMsg
DTSPackageLog.WriteStringToLog errMsg
Main = DTSTaskExecResult_Failure
Else
Main = DTSTaskExecResult_Success
End If
Bill
Post by Allan Mitchell
You can write to the log but ONLY from the AX Script task using
WriteStringToLog() method. Everything else though is set in stone (at
least for the current release)
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
Post by Bill Swartz
Does anyone know how to write to or modify the log output of dts?
Currently the output looks something like this..
DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSDynamicPropertiesTask_2
DTSRun OnFinish: DTSStep_DTSDynamicPropertiesTask_2
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2
DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_2
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_3
DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_3
DTSRun OnStart: DTSStep_ValidateConnections
DTSRun OnError: DTSStep_ValidateConnections, Error = -2147220421 (8004043B)
Error string: The task reported failure on execution.
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
I intentionally failed this, but want to write to the log a provide some
background about what was happening and what the failure was.
Thanks
Bill
Bill Swartz
2005-07-13 20:26:26 UTC
Permalink
dooohhhh... I was looking at the system eventLog... Yep, it's there...

Thanks Allan..

Bill
Post by Allan Mitchell
In what log are you looking? The messages will appear in the package
execution log that you enable at the package level
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
Post by Bill Swartz
Any thoughts on why the following isn't making it to the log file.. (log
file is set to 16mb with overwrite as needed)
errorFlag is True and package is reporting a failure to the GUI.
If (errorFlag) Then
DTSGlobalVariables("ErrorMessage").Value = errMsg
DTSPackageLog.WriteStringToLog errMsg
Main = DTSTaskExecResult_Failure
Else
Main = DTSTaskExecResult_Success
End If
Bill
Post by Allan Mitchell
You can write to the log but ONLY from the AX Script task using
WriteStringToLog() method. Everything else though is set in stone (at
least for the current release)
--
Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.SQLIS.com - You thought DTS was good. here we show you the new stuff.
www.konesans.com - Consultancy from the people who know
Post by Bill Swartz
Does anyone know how to write to or modify the log output of dts?
Currently the output looks something like this..
DTSRun: Loading...
DTSRun: Executing...
DTSRun OnStart: DTSStep_DTSDynamicPropertiesTask_2
DTSRun OnFinish: DTSStep_DTSDynamicPropertiesTask_2
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_2
DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_2
DTSRun OnStart: DTSStep_DTSExecuteSQLTask_3
DTSRun OnFinish: DTSStep_DTSExecuteSQLTask_3
DTSRun OnStart: DTSStep_ValidateConnections
DTSRun OnError: DTSStep_ValidateConnections, Error = -2147220421 (8004043B)
Error string: The task reported failure on execution.
Error source: Microsoft Data Transformation Services (DTS) Package
Help file: sqldts80.hlp
I intentionally failed this, but want to write to the log a provide
some background about what was happening and what the failure was.
Thanks
Bill
Luis Gonzalez
2009-06-19 15:55:02 UTC
Permalink
please review in the next URL "http://www.sqldts.com/232.aspx" that solution.


url:http://www.ureader.com/msg/11461052.aspx

Continue reading on narkive:
Loading...