"Unexpected error from external database driver (1)." - sql-server

I have .xlsx file with 27,000 rows. When executing the SSIS package on the server I get the above error. I have tried running the package in 32-bit mode, it did not work. Microsoft does not have a good explanation. I have installed access driver on my machine and on the server.

Assuming that you tried running in 32-bit, and you downloaded Access Database Engine and the issue is not solved
This is caused by a windows security update, this is noticed in the Microsoft Support article, also they provided patches link.
There is a similar question on MSDN about this issue, read the accepted answers:
Unexpected error from external database driver (1)
Side Note: Try opening the Excel and saving it as new Excel workbook to ensure that the excel is not damaged

Remove the Ace Oledb driver 10 and install Ace 2016 version .The Security patch Microsoft provided in October 2017 is causing this issue. Test your SSIS package locally ,if everything is fine install Ace 2016 version on your server .
Here is the download link:
Microsoft Access Database Engine 2016 Redistributable

This issue is caused if the Excel file is in Read-Only mode. Changing the Read-Only mode will fix the issue.

Related

Access Database engine OLEDB in windows server 2016

I have an application that uses Microsoft ACE OLEDB 12.0 driver and hence I have installed 2007 Office System Driver: Data Connectivity Components in my system.
I also have created SSIS packages to pull data from the excel and csv files which get's inserted into the SQL tables using the Microsoft ACE OLEDB 12.0. Below is my connection string
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=c:\myFolder\myOldExcelFile.xls;
Extended Properties="Excel 8.0;HDR=YES";
I wanted to move these applications to the server environment for deployment and When I reached out to the IT for getting Office 2007 system driver to be installed, they said it's not supported in Windows server 2016 and have security vulnerabilities.
Hence I wanted to know whether we have any alternate Microsoft OLEDB provider for SSIS operation? I tried installing office 2010 however I got the error message that
Microsoft OLEDB 12.0 is not registered on my machine.
Will installing Microsoft Access Database Engine 2016 Redistributable help me out in resolving the problem. If yes what will be my connection string. Is the below one correct?
Provider=Microsoft.ACE.OLEDB.16.0;Data Source=c:\myFolder\myOldExcelFile.xls;Extended Properties="Excel 12.0;HDR=YES";
The office 2016 oledb is also not supported in windows server 2016. Hence what security vulnerabilities will occur when we install Office 2007 or 2016 on windows server 2016?
Any help will be highly appreeciated.
Microsoft OLEDB 12.0 is not registered on my machine.
Since you installed Access Database Engine 2010 and you received the error above, then it looks like it is a 32/64 bit problem.
Make sure you installed both redistributables 32 and 64.
If you need to install AccessDataBaseEngine x64 alongside with 32-bit installation, you need to run the installation in passive mode:
Passive mode installation steps
Open the Command Prompt by typing cmd in the Windows search box under the Start menu and selecting cmd.exe
Type the file path and file name of the 64-bit Access Database Engine 2010 install file, followed by a space and /passive (this runs the installation without showing any error messages).
Open the Registry Editor by typing regedit in the Windows search box under the Start menu and selecting regedit.exe
Delete or rename the mso.dll registry value in the following registry key:
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\14.0\Common\FilesPaths"
More details and screenshots are found in the link below
Reference
How to install 64-bit Microsoft Database Drivers alongside 32-bit Microsoft Office

The 'Microsoft.ACE.OLEDB.16.0' provider is not registered on the local machine. (System.Data)

I have Windows 10 pro x64,
Excel 2016 32 bit
and Sql server 2017.
I want to import excel file to sql server, I need to use 32-bit wizard because Microsoft Excel is not shown in 64-bit version, but I face this error:
The 'Microsoft.ACE.OLEDB.16.0' provider is not registered on the local machine. (System.Data)
If you are having problems installing the engine because components are already installed, do this (from Microsoft):
If Office 365 is already installed, side by side detection will prevent the installation from proceeding. Instead perform a /quiet install of these components from command line. To do so, download the AccessDatabaeEngine_x64.exe to your PC, open an administrative command prompt, and provide the installation path and switch Ex: C:\Files\AccessDatabaseEngine_x64.exe /quiet
I had success doing the following (I use Excel 2016 and SSMS 2017)
From Excel
File -> Export -> Change File Type -> Excel 97- 2003 (*.xls)
If you have OS(64bit) and SSMS(64bit) and already install the AccessDatabaseEngine(64bit) and you still received an error, try this following solutions:
1: direct opening the sql server import and export wizard.
if you able to connect using direct sql server import and export wizard, then importing from SSMS is the issue, it's like activating 32bit if you import data from SSMS.
Instead of installing AccessDatabaseEngine(64bit) , try to use the AccessDatabaseEngine(32bit) , upon installation, windows will stop you for continuing the installation if you already have another app installed , if so , then use the following steps. This is from the MICROSOFT. The Quiet Installation.
If Office 365 is already installed, side by side detection will prevent the installation from proceeding. Instead perform a /quiet install of these components from command line. To do so, download the desired AccessDatabaseEngine.exe or AccessDatabaeEngine_x64.exe to your PC, open an administrative command prompt, and provide the installation path and switch Ex: C:\Files\AccessDatabaseEngine.exe /quiet
or check in the Addition Information content from the link below,
https://www.microsoft.com/en-us/download/details.aspx?id=54920
Use this link to download the 64 bit version of the Microsoft Access Database Engine 2016 Redistributable:
https://www.microsoft.com/en-us/download/details.aspx?id=54920
Once installed you can open the import export wizard 64 bit and you will have a data source option for excel.
This is a workaround solution. Ultimately, converting the Excel document to a CSV and using the Tasks/Import Data/Flat File Source option imported my data (although, I was not able to successfully map my datatypes in the import, which I can fix with CAST() later). On upload, change File type to CSV from TXT.
I have Office 365. I used a CSV and gave up on XLSX because:
When I ran the 32 bit version of the AccessDatabaseEngine.exe, I received this error:
When I ran the 64 bit version of AccessDatabaseEnginex64.exe, I received this error:
If you have the Microsoft Access Database Engine and still are facing the same issue make sure that you are accessing the Microsoft SQL Server Management Studio as Administrator.
Instead of using the import/export tasks provided under the database, I utilized "SQL Server 2016 Import and Export Data (64-bit)" service comes with MS SQL Server 2016 installation as per suggested here. In windows 10 you can find it under SQL Server 2016 app. In your case, find SQL Server 2016 Import and Export Data (32-bit) service available in same location.

Can't Open Database, Wrong Version

I'm working on a project for my Internship with a collague.
but when he sent me hisasdf(Visual Studio 2015 Enterprise) and I tried to Open his Database, I got the Following Error:
The database cannot be opened because it is version 852. This server supports version 782 and earlier. A downgrade path is not supported.
Could not open new database. CREATE DATABASE is aborted.
An attempt to attach an auto-named database for file {Filename} failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.
I updated my Sql Server Data Tools to version 14.0.61021.0 and tried again. Unfortunately this didn't work either. (yes I tried turning it off and on again)
So I was wondering if any of you guys could help me out,
Thanks in Advance!
With kind regards,
Yours Truely
The error is saying that you are trying to attach to a database that is from a newer version of SQL Server than you are using on your machine.
I am thinking that your colleague is using SQL Server 2016 and you are using SQL Server 2014. See the versions here in the "internal version" column.
Regarding solutions, I would start by ensuring that you and you're colleague have the same versions installed. You can also try downloading SQL Server 2016 express edition and opening the database there. You can also try this answer as it is a very similar issue.
If you have any questions about this, provide more details on the steps you've taken and I'll be happy to help.

SSIS: version of ODBC source is not compatible with this version of the dataflow

I'm using Visual Studio 2015 to create a simple SSIS package. The data source is a DB2 database, and I'm using an ODBC driver on my workstation to connect to DB2. The target is SQL Server 2014.
The package runs fine locally, but whenever I run it on the server, I'm having trouble with the ODBC data source. The driver on the server is the exact same one with the exact same name as the one on my workstation.
To get the package into the server, I've imported the dtsx file into SSIS in Stored Packages. I've also tried to deploy the project to the Integration Service Catalog, but I get one of these failures related to the ODBC source when doing so --
The version of ODBC File Source, clsid {xxx} is not compatible with this version of the Data Flow.
The component is missing, not registered, not upgradeable, or missing required interfaces. The contact information for this component is "ODBC Source;Connector for Open Database Connectivity (ODBC) by Attunity; Attunity Ltd.; All Rights Reserved; http://www.attunity.com
I've also tried using a file based ODBC source instead of a system one with that file in a shared folder on the server. Again, it runs fine in VS but not on the server.
I've looked at the dtsx file (xml based) and I suspect that there is a conflict with the DTSID for the ODBC driver. I'm not sure how that works but it seems like that ID would be unique for each computer and that SSIS is getting is trying to use the workstation's DTSID on the server.
I'm a bit new to SSIS and Visual Studio so I'm hoping I'm assuming there is a straightforward way to run packages developed on a workstation at the server without these hangups. I just can't find anything specific to this problem anywhere.
We do not have VS or SSDT installed on the server.
EDIT: I added a second sentence in the 2nd error message above. It refers a connector provided by Attunity, which is something I don't understand. The ODBC driver installed on the system is from Data Direct. The CLSID returned in the error message is also associated with an Attunity connector in the server's registry.
There are no ODBC drivers from Attunity showing up in either of the ODBC managers, so it's possible that these are somehow part of a default install or were installed when our server used to have SSDT and VS installed directly on it and were never uninstalled. Or, something else?
I have resolved this issue by changing the Deployment Target Version of Integration Services project in VS in my case from SQL Server 2017 to SQL Server 2016 (the target SQL version). Hope this helps. Old quesition, but came up first in google when I tried to solve my problem.
In my case this issue was caused by deploying an SSIS project to a 2016 server using SQL Mgmt Studio 2017. Once I redeployed using SSMS 2016, it resolved the error.
VS or SSDT by default uses 32-bit drivers, so check there is option when you execute for 32-bit. Or install both 32-bit and 64-bit driver and create ODBC with same name.
This is what i do usually for ODBC connections in SSIS -- create connection in both 32-bit and 64-bit.
So create one with
C:\Windows\SysWOW64\odbcad32.exe (32-bit)
and one with
C:\Windows\System32\odbcad32.exe (64-bit).
I had this same problem when executing my package in SQL Server Agent. I resolved it by turning on the Execution Options "Use 32 Bit Runtime" flag in the agent step. Drove me nuts for a few days, hope this helps.
check the version of your solution vs the SQL version of where you are deploying. I had this issue and matching up versions fixed the problem. My solution was 2017 but the SQL box was 2016. I had to change the solution to 2016. cheers!
In my situation I was having this error and I switched to using the 32-bit version. My initial test worked, then I redeployed using a the project I was working with and I got this error again, even though I had switched Execution Options "Use 32 Bit Runtime" flag.
It ended up that I was having problems with my ODBC Data Source. I was using IBM Informix driver and it was having an issue with the chosen locale. I changed it to use the server's specific local and tested its connection. That then worked and my SSIS package worked on the server.
In another situation with this same Informix driver, I had the database name, slightly incorrect and that gave me this same error.

Run64BitRuntime in SSIS package won't stick

I developed an SSIS package about 6 months ago to migrate a number of access databases into SQL server. I opened the package yesterday to go through another run and noticed a few (X) error indicators. Upon further investigation, the connection managers produced the following error:
The specified provider is not supported. Please choose different
provider in connection manager.
The connection manager then opens, but the previously selected provider is no longer listed. Investigating the text in the project file, I was previously using:
Microsoft.ACE.OLEDB.15.0
Recalling that I did have to set the Run64BitRuntime to false in order to use the 32 bit providers, I double checked the Project Properties -> Configuration Propeties -> Debugging -> Run64BitRuntime setting, which had reverted to True. I switched to false, saved, exited and reopened, and the value had again reverted to True. Several other tries produced the same result. At this point, I believe that is the issue, but haven't yet found a solution.
For full disclosure, the package was developed on SSDT-BI for VS 2012, and I'm now using SSDT-BI for VS 2013. I've attempted to create a new package in case there was an issue there, but the same thing happens with a new package. I also upgraded my Office installation and now have version 16 of the Microsoft Access Driver (*.mdb, *.accdb) listed in ODBC (32-bit) instead of version 15.
Any ideas?
EDIT 1: An access driver is not listed in the provider list within the Connection Manager, but is listed in ODBC 32-bit providers. The Jet 4.0 provider fails with "Unrecognized database format"
EDIT 2: Ran into some posts that indicated if the provider isn't listed VS may be running in 64 bit mode. I doubled checked to verify it is running in 32 bit mode (as shown in Task Manager). Maybe my issue is that the provider isn't showing up at all?
EDIT 3: Reinstalled SSDT-BI for VS 2012, providers are still missing.
EDIT 4: I've tried running the package from VS as well as from the SQL server. The package was previously able to run in both places.
EDIT 5: Decided to try simple ODBC connections instead of the OLE DB provider by adding a new User DSN. Receiving this error:
ODBC driver for Microsoft Access installation problem: Unable to load odbcji32.dll
Which lead me to this link, which claims the recent Microsoft Office updates are to blame. Going to try installing the Office 2013 runtime.
Unfortunately, in this case, a recent Microsoft Office update was to blame. Installing the Microsoft Access 2013 Runtime resolved the issue, found here. The Microsoft Access 2016 Runtime may also work, found here, but for me it produced an error stating:
Windows Installer and Click-to-Run editions of Office programs don't get along for this version...

Resources