-
The data source you are attempting to connect to does not exist on your machine.
On Linux and UNIX, SYSTEM data sources are typically defined in /etc/odbc.ini. USER data sources are defined in ~/.odbc.ini.
On Windows, data sources are created in Microsoft ODBC Administrator. The available System data sources are listed in the System DSN tab. The User data sources that are available for the currently logged on user are listed in the User DSN tab.
Refer to your ODBC driver's documentation for information about how to create a data source and the connection details that you need to put in it.
-
You do not have permission to access the location where the data source is stored.
On Linux and UNIX, you need read access to the .ini file that contains the data source.
On Windows, the user account that is attempting to access the data source needs to have sufficient permissions to read the registry key where the data source is stored. System data sources are stored under HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI. User data sources are stored under HKEY_CURRENT_USER\Software\ODBC\ODBC.INI.
-
On Linux and UNIX, your SYSTEM data sources and / or drivers are defined in non-standard files or locations and you have not set the relevant environment variable to tell unixODBC where to find them.
You may need to set ODBCSYSINI
, ODBCINSTINI
or ODBCINI
. For more information, see Linux/UNIX ODBC.
-
The data source is defined for another user.
User data sources are defined for a specific user.
-
The
Driver
attribute is either missing from the data source or has an invalid value.
The ODBC Driver Manager relies on the Driver
attribute to know which ODBC driver to load.
-
The ODBC driver that the
Driver
attribute points to is not installed on your machine.
On Linux and UNIX, to display a list of installed drivers, type odbcinst -q -d
.
On Windows, the Drivers tab in ODBC Administrator lists the installed drivers.
- You are using a DSN-less connection in which the Driver attribute is missing, has an invalid value or points to an ODBC driver that is not installed on your machine.
-
You are attempting to access a remote data source that does not exist.
The remote data source specified in your ODBC-ODBC Bridge client data source (the TargetDSN
attribute value) needs to exist on the machine (or machines) specified with the ServerPort
attribute.
- You are using a DSN-less connection on Windows that specifies a driver whose architecture is different to that of the application's. For example, you are using a 64-bit application, but the driver you specify in the connection string is only available as a 32-bit library. The application and ODBC driver architecture must be the same. (Although you can use the ODBC-ODBC Bridge as a solution if you are unable to get an ODBC driver with the same architecture as that of your application's.) For more information, see 64-bit ODBC.
-
You are using SQL Server and are attempting to create a linked server:
-
You are attempting to use a User ODBC data source. This will only succeed if the SQL Server instance is running under the same user account as the one used to create the data source. Otherwise, you must use a System ODBC data source instead.
–Or–
- You have installed the ODBC driver and configured the ODBC data source on the same machine as SQL Server Management Studio, however the SQL Server instance you are connecting to is on a different machine. The ODBC driver and data source need to be on the same machine as the SQL Server instance.
- You are using SAP BusinessObjects. You need to install your ODBC driver on both the BusinessObjects Server and BusinessObjects Client Tools machines. You need to create a System ODBC data source with the same name on both the BusinessObjects Server and BusinessObjects Client Tools machines. On 64-bit Windows, the BusinessObjects Server is a 64-bit application and the BusinessObjects Client Tools are 32-bit applications. On the BusinessObjects Server machine, you therefore need to configure the data source in the 64-bit version of the ODBC Data Source Administrator. On the BusinessObjects Client Tools machine, you therefore need to configure the data source in the 32-bit version of the ODBC Data Source Administrator.
-
Your application is passing a connection string in an encoding that the Driver Manager cannot handle. For example, a UTF-8 encoded connection string is being passed to
SQLDriverConnectW
, which expects the UCS-2 encoding. You may be able to work around this by configuring your application to behave differently. For example, some versions of the Oracle Heterogeneous Services agent, DG4ODBC, supports the init file setting, HS_NLS_NCHAR = UCS2
, which causes it to pass UCS-2 encoded data to the ODBC APIs rather than UTF-8. Some ODBC driver distributions may include an ANSI-only version of the driver, which may cause your application to behave differently. For example, there is an ANSI-only version of Easysoft SQL Server ODBC driver, which has the suffix "_a":
[MY_SQL_SERVER_ODBC_DRIVER_DSN]
#Driver = Easysoft ODBC-SQL Server
Driver = /usr/local/easysoft/sqlserver/lib/libessqlsrv_a.so