Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SSIS: Why is this not logging?

Tags:

ssis

I don't know if this will help, but i enabled logging to a text file called test.txt on my C Drive.

Public Sub Main()
    Dim rowsProcessed As Integer = 100
    Dim emptyBytes(0) As Byte

    Dts.Log("Testing, Test 1,2,3", rowsProcessed.ToString, emptyBytes)

    Dts.TaskResult = ScriptResults.Success
End Sub
like image 560
sadd Avatar asked Dec 03 '10 18:12

sadd


People also ask

What is SSIS event logging?

Event logging in SSIS gives a lot of valuable information about the run-time behavior and execution status of the SSIS package.

How do I view SSIS logs?

View SSIS Catalog Execution Log Open SSMS (SQL Server Management Studio). Navigate to following node (Your Server> Integration Services Catalog > SSISDB > YourFolder > YourProject > YourPackage). Right click on Package > Reports > Standard Reports > All executions like below.


2 Answers

You have to go into the SSIS->Logging menu and tick checkboxes like a crazy checkbox-ticking-ninja to get this to work.

There are various checkboxes that have to be checked, and some of them only appear when you click on the script tasks, so it took me a while to figure this out:

  • First, enable your logging provider (that you have set up, right?) by ticking it on the Providers and Logs tab.
  • Then switch to the Details tab (which shows various events that you might want to log)
  • For the DTS.Log() method you need the ScriptTaskLogEntry event, but they only show up when you click on Script Tasks in the tree on the left.
  • So, click each of your Script Tasks in the tree on the left, enable it for logging, and then tick the Script Tasks event on the details tab.
  • Also make sure your logging provider is ticked for each script task

See also: http://msdn.microsoft.com/en-us/library/ms136131.aspx

like image 61
codeulike Avatar answered Sep 30 '22 17:09

codeulike


This is an old question and @codeulike has answered it well but I would like to add a note about the logging behavior in debug mode, specially for someone new to SSIS or SSIS logging (like me) - Assuming you have all the configuration in place required for logging, if execute a selected task that you expect to log, it still will not log. Only if you execute (or debug) the entire package, then the logging will work.

like image 37
HappyTown Avatar answered Sep 30 '22 18:09

HappyTown