In attempting to add standard DTS logging to a package via Data Tools, I found that my attempt to execute:
Dim provider As LogProvider = p.LogProviders.Add("DTS.LogProviderTextFile.2")
(or any other log provider type,) resulted in:
The log provider type "DTS.LogProviderTextFile.2, {0A039101-ACC1-4E06-943F-279948323883}" specified for log provider "{CC5CB9A4-E0D5-4ECD-8F4E-1E8FB9BDE8A6}" is not recognized as a valid log provider type. This error occurs when an
attempt is made to create a log provider for unknown log provider type. Verify the spelling in the log provider type name.
I created a new package with a single script task using only the example code from the MS documentation for Embedding Logging Programmatically at:
http://msdn.microsoft.com/en-us/library/ms136023(v=sql.110).aspx
consisting of:
Imports Microsoft.SqlServer.Dts.Runtime
Module Module1
Sub Main()
Dim p As Package = New Package()
Dim loggingConnection As ConnectionManager = p.Connections.Add("FILE")
loggingConnection.ConnectionString = "C:\SSISPackageLog.txt"
Dim provider As LogProvider = p.LogProviders.Add("DTS.LogProviderTextFile.2")
provider.ConfigString = loggingConnection.Name
p.LoggingOptions.SelectedLogProviders.Add(provider)
p.LoggingOptions.EventFilterKind = DTSEventFilterKind.Inclusion
p.LoggingOptions.EventFilter = New String() {"OnPreExecute", _"OnPostExecute", "OnError", "OnWarning", "OnInformation"}
p.LoggingMode = DTSLoggingMode.Enabled
' Add tasks and other objects to the package.
End Sub
End Module
I get the same error as listed above in SQL Server 2012 Data Tools on three separate machines. On my primary dev box, where the code fails in Data Tools, running the exact same code in BIDS runs without problems.
Importing the working BIDS package into Data Tools also fails with the same error.
I have not encountered any other 2012 Data Tools issues, but logging is a core pattern that makes me worry that this is a problem that may emerge with other functions in the DTS toolset.
Thanks for any help!!