Wednesday, September 1, 2010

SSIS Lotus Notes Integration Duct Tape Fix

So, we're switching from a server running SQL Server 2000 to a new server running SQL Server 2008.  I have this DTS package that for six years has been happily pulling data from a Lotus Notes database.  I was able to create an SSIS package that does the same thing, although using a Data Reader for the Lotus Notes data.  When I run the package itself, on the server, via BIDS, it runs fine.  However, running it from a SQL Server Agent job produces this error:
Error: 2010-09-01 12:42:19.83     Code: 0xC0047062     Source: Transfer LN_All_By_Consultant DataReader Source [1]     Description: System.Data.Odbc.OdbcException: ERROR [S1C00] [Lotus][ODBC Lotus Notes]Driver not capable  ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed  ERROR [01000] [Microsoft][ODBC Driver Manager] The driver doesn't support the version of ODBC behavior that the application requested (see SQLSetEnvAttr).  ERROR [S1000] [Lotus][ODBC Lotus Notes]Failed to switch to ID file C:\Program Files\lotus\notes\data\admin.id. Wrong Password. (Passwords are case sensitive - be sure to use correct upper and lower case.)  ERROR [28000] [Lotus][ODBC Lotus Notes]Invalid authorization specification     at System.Data.Odbc.OdbcConnection.HandleError(OdbcHandle hrHandle, RetCo...  The package execution fa...  The step failed.
After searching for the answer in vain on the Internet, and hitting my head on the desk for three days, I finally came up with this solution:  I am using an Access database file on the server, linking the three Lotus tables I need via ODBC.  Then I create user queries on the linked tables, and voilĂ , SSIS is able to access these via OLE DB and I can get my data.
Of course, if anyone out there has the real solution, please let me know!