I recently created an SSIS package on my local machine and it works well. Within the package, it creates a connection to an excel file, reads the data and processes it like a dataset. Something like this:
OleDbConnection con = new OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + FilePath + ";Excel 12.0 Xml;HDR=YES;IMEX=0;");
When I tried to deploy on our test server I received an error. It is important to mention that our test server does not have any version of MS Office installed. So the error I got was :
Error Message ::: The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine. Error StackTrace ::: at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper) at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection) at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup) at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) at System.Data.OleDb.OleDbConnection.Open() at ST_f688224974424dccb939cc4d81318378.csproj.FileImport.ReadXLSFile(String FilePath, String FileHeader, String DataDelimiter, String SheetName) at ST_f688224974424dccb939cc4d81318378.csproj.ScriptMain.Main()
I googled the error and downloaded "Microsoft Access Database Engine 2010 Redistributable" and installed on our Test server. I even restarted the server.
There were two version of files kept on server, I downloaded and installed the 32 bit version of installer. Name of the file is "AccessDatabaseEngine.exe"
. Somewhere on internet it was mentioned that SQL Server Integration services for SQL Server 2008 R2 supports 32 bit version only so it seems I did the right thing.
In my package property, Run64BitRunTime is set to False.
After doing all of above, the job still fails logging the error in Event Manager I have given above. However, when I open the package from SQL server BI Studio directly on the Test server and run it from Visual studio, it works like a charm.
Any help regarding this issue will be greatly appreciated.