1

I'm currently generating a large number (100s) of SSIS packages from C# that are being used to import MS Access databases to a staging area on SQL Server. This is a first step to removing MS Access from this organisation. These packages are working well and as they are generated automatically it is straightforward to add in new MS Access DBs as I become aware of them.

However, ideally I'd like to add in logging in the generated packages to track performance / exceptions. There appears to be support within EzAPI for this (LogProvider classes for example), but I've been unable to find any documentation.

Does anyone have an example of where they are doing this using the EzAPI SSIS API?

billinkc
  • 59,250
  • 9
  • 102
  • 159
Steve Homer
  • 3,852
  • 2
  • 22
  • 41

1 Answers1

1

Here you find an example of configuring Sql Server Logging Provider:

        Package pkg = ezPkg.getPackage();
        pkg.LoggingMode = DTSLoggingMode.Enabled;            
        LogProvider provider = pkg.LogProviders.Add("DTS.LogProviderSQLServer.2");
        provider.ConfigString = yourDBConnectionComponent.CM.Name;
        pkg.LoggingOptions.SelectedLogProviders.Add(provider);
        pkg.LoggingOptions.EventFilterKind = DTSEventFilterKind.Inclusion;
        pkg.LoggingOptions.EventFilter = new String[]
        {
            "OnPreExecute",
            "OnPostExecute",
           ......................
        };
qwertz1123
  • 1,173
  • 10
  • 27