Hi Gurus,
I am facing a strange issue and not able to see what could be causing it. I already checked this thread and some other blog posts around the same issue. But its slightly different in nature and hence opening a new thread. So here it goes:
I have two similar SSIS 2012 packages that load two different excel files (2016) to SQL tables these packages have a FOR EACH LOOP container and processes the files in a source folder (if present) and archive them after loading into an archive folder. If there is no file found the package completes successfully with a message saying no files found. The packages are executed through a windows task scheduler job. This have been working fine until last week when we loaded a new correction file. The file was loaded into database correctly and moved to archive folder as expected but the job threw the below error alert and logged the same in the log file (Variable names have been changed for security purpose).
Error: 2018-08-17 07:00:27.31 Code: 0xC0202009 Source: PackageName Connection manager "Excel Source" Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft Access Database Engine" Hresult: 0x80004005 Description: "External table is not in the expected format.". End Error Error: 2018-08-17 07:00:28.23 Code: 0xC020801C Source: Copy in Database - Data Flow Task Excel Source [202] Description: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER. The AcquireConnection method call to the connection manager "Excel Source" failed with error code 0xC0202009. There may be error messages posted before this with more information on why the AcquireConnection method call failed. End Error
We are receiving the same error everyday since then even when there is no file to process in source folder. But in my case the error is coming in only Prod server.Interestingly, this is happening only for one of the two packages which have almost same logic except for two different files formats and both run from the same job. Also, the task works fine in my SSDT and in lower environments. I have already checked that the delay validation property for Excel source, For Each Loop container and 'Run64bitRunTime'property are set to True. This server was also rebooted once after the last file processing and there is no task in hung state. Version of SQL and SSIS is 2012, MS-Excel file 2016 and MS Excel driver in the server is 14.00.7180.5000 for 64bit and 6.03.9600.17415 for 32bit. However, I don't think it matters because the other job runs just fine and lower environment has the same configuration and runs the same job without any issues.I am using following expression to dynamically set the excel connection manager:
"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + @[User::FilePath] + ";Extended Properties=\"Excel 12.0 XML;HDR=NO;IMEX=1\";"
I am sure this would be some silly small thing but somehow I am not able to catch it.Hoping to get some help with your valuable suggestions on how to fix this issue.
HTH,
Cheers!!
Ashish
Please mark it as Answered if it answered your question or mark it as Helpful if it helped you solve your problem.