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
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 "Bill Swartz" wrote in message news:uB9A91yhFHA.4048@TK2MSFTNGP10.phx.gbl... > 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 >
Yeah, that writes to the eventlog, but not the output stream of a dtsrun statement.. I should have been clear on which log.... Bill "Allan Mitchell" wrote in message news:uj8KV6yhFHA.2644@TK2MSFTNGP09.phx.gbl... > 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 > > > "Bill Swartz" wrote in message > news:uB9A91yhFHA.4048@TK2MSFTNGP10.phx.gbl... >> 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 >> > >
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 "Allan Mitchell" wrote in message news:uj8KV6yhFHA.2644@TK2MSFTNGP09.phx.gbl... > 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 > > > "Bill Swartz" wrote in message > news:uB9A91yhFHA.4048@TK2MSFTNGP10.phx.gbl... >> 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 >> > >
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 "Bill Swartz" wrote in message news:%23R2OBJ%23hFHA.1252@TK2MSFTNGP09.phx.gbl... > 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 > > > "Allan Mitchell" wrote in message > news:uj8KV6yhFHA.2644@TK2MSFTNGP09.phx.gbl... >> 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 >> >> >> "Bill Swartz" wrote in message >> news:uB9A91yhFHA.4048@TK2MSFTNGP10.phx.gbl... >>> 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 >>> >> >> > >
dooohhhh... I was looking at the system eventLog... Yep, it's there... Thanks Allan.. Bill "Allan Mitchell" wrote in message news:uhk8qT%23hFHA.3544@TK2MSFTNGP15.phx.gbl... > 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 > > > "Bill Swartz" wrote in message > news:%23R2OBJ%23hFHA.1252@TK2MSFTNGP09.phx.gbl... >> 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 >> >> >> "Allan Mitchell" wrote in message >> news:uj8KV6yhFHA.2644@TK2MSFTNGP09.phx.gbl... >>> 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 >>> >>> >>> "Bill Swartz" wrote in message >>> news:uB9A91yhFHA.4048@TK2MSFTNGP10.phx.gbl... >>>> 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 >>>> >>> >>> >> >> > >