24 December, 2010
4 Comments
1 category
If you want to log from a script task, you can use the Dts.Log function.
This function can log to the system table: dbo.sysssislog. If you configure you’re package logging correctly.
Notes
Most importantly, if you want to log from a script task by using the function Dts.Log, enable logging for the specific script task and enable "ScriptTaskLogEntry"
Steps to enable logging from within you SSIS script task |
Make sure you’re Script Task contains a Dts.Log function call, like:
|
In the control flow right click and choose Logging… Check all checkboxes in the treeview, make sure the script task is not grayed out or unchecked Click on the top node in the treeview and add SSIS log provider for SQL Server: |
Enable ScriptTaskLogEntry in the details tab of the script task |
When you run this package, you should see the logging in the table dbo.sysssislog |
Tags: SSIS
Category: Uncategorized
Good Post…saved me a lot of time
Thank you, this saved my day.
I ran into an instance where my script task was grayed out preventing me from enabling ScriptTaskLogEntry. To fix this right click your script task > properties and set “LoggingMode” to “enabled”. Mine defaulted to “UseParentSetting” which did not have an option to enable “ScriptTasakLogEntry”.
I ran into an instance where my script task was grayed out preventing me from enabling ScriptTaskLogEntry. To fix this right click your script task > properties and set “LoggingMode” to “enabled”. Mine defaulted to “UseParentSetting” which did not have an option to enable “ScriptTaskLogEntry”.