- Драйвера odbc для linux
- Oracle Instant Client ODBC Installation Notes
- Installing Oracle Instant Client Basic and Basic Lite
- Installing Oracle Instant Client ODBC
- On Windows
- Environment setup for ODBC applications
- Contents of the Oracle Instant Client ODBC Package
- Patching Oracle Instant Client ODBC
- Uninstalling Oracle ODBC Instant Client
- Recommended unixODBC Driver Manager versions for Linux/UNIX
- Installing and Configuring an ODBC Driver on Linux (DEB / RPM)
- What is an ODBC Driver?
- Prerequisites
- Which ODBC Driver Manager to Choose on Linux?
- Debian-Specific Prerequisites
- RPM-Specific Prerequisites
- Installing and Configuring an ODBC Driver on Ubuntu
- Installing and Configuring an ODBC Driver on CentOS
- Step-by-Step ODBC Data Source Setup on Linux
Драйвера odbc для linux
Your search did not match any results.
We suggest you try the following to help find what you’re looking for:
- Check the spelling of your keyword search.
- Use synonyms for the keyword you typed, for example, try “application” instead of “software.”
- Try one of the popular searches shown below.
- Start a new search.
Oracle Instant Client ODBC Installation Notes
Oracle’s Instant Client ODBC software is a standalone package that offers the full functionality of the Oracle ODBC driver (except the Oracle service for Microsoft Transaction Server) with a simple install.
The ODBC driver has Oracle’s standard client-server version interoperability, see Support Doc ID 207303.1. For example Instant Client ODBC 19c can connect to Oracle Database 11.2 or later.
Installing Oracle Instant Client Basic and Basic Lite
Instant Client ODBC requires the Oracle Instant Client Basic or Basic Light package (depending on your locale requirements) also be installed. Download the desired package from OTN for your operating system and follow the installation instructions on the download page. For example, unzip the package to C:\instantclient_19_3 on Windows, unzip to /opt/oracle/instantclient_19_3 on Linux or other platforms, or use yum to install the RPM packages on Linux.
More details on Oracle Instant Client is in the Oracle Call Interface Programmer’s Guide.
Installing Oracle Instant Client ODBC
On Linux and UNIX
1. Download Install the Instant Client Basic or Basic Light package as described above.
2. Download the Instant Client ODBC package. Unzip it in the same directory as your Basic or Basic Light package. Or, if using the RPM package on Linux, install it with yum .
3. Install the unixODBC driver manager if it is not already available. Refer to the «Recommended unixODBC Driver Manager version» section in this document for more information.
4. Execute odbc_update_ini.sh from the Instant Client directory.
5. Set any Oracle Globalization variables required for your locale. See the Oracle Database Globalization Support Guide for more information. For example on Linux you could set export NLS_LANG=JAPANESE_JAPAN.JA16EUC to work in the JA16EUC character in Japanese.
Parameter | Description |
---|---|
ODBCDM_Home | unixODBC driver manager home directory path |
Install_Location* | Oracle Instant Client directory path. The default path is the current directory |
Driver_Name* | Driver name to identify the Oracle ODBC driver residing in current Oracle Instant Client home. The default name will be like «Oracle 19c ODBC driver» |
DSN* | Sets ODBC DSN name. The default name will be «OracleODBC-19c» |
ODBCINI* | Directory path of the .odbc.ini file. The default path is the user’s home directory, for example |
* — Optional parameters
On Windows
- Install the Instant Client Basic or Basic Light package, as described above.
- Download the Instant Client ODBC package. Unzip it in the same directory as your Basic or Basic Light package.
- Execute odbc_install.exe from the Instant Client directory. If Instant Client is 11g or lower, start the command prompt with the Administrator privilege. To install with Japanese language support, execute the command odbc_install.exe JA .
Environment setup for ODBC applications
An ODBC application has to load the Oracle Instant Client ODBC driver’s shared library file (see next section) to connect to Oracle Database. On Linux/Unix the directory path of the shared library should be set in the environment variable LD_LIBRARY_PATH, or platform equivalent. It can also be configured in /etc/ld.so.conf. On Windows it should be set in the PATH environment variable.
Refer to the topics Environment Variables for OCI Instant Client and Database Connection Strings in the Oracle Call Interface Programmer’s Guide for setting up the Database Connection string and related environment variables like TNS_ADMIN, TWO_TASK, LOCAL etc.
Contents of the Oracle Instant Client ODBC Package
Description | Linux and UNIX | Windows |
---|---|---|
Oracle ODBC driver shared library | libsqora.so.XX.Y. For example libsqora.so.19.1 | sqora32.dll |
Installation file | odbc_update_ini.sh | odbc_install.exe, odbc_uninstall.exe |
Oracle ODBC driver configuration dialog window (GUI) | Not available | sqoras32.dll, sqresus.dll, sqresja.dll |
Help System | help/ | help/ |
Patching Oracle Instant Client ODBC
Note: Backup the Oracle ODBC driver shared library and other files before patching them.
On Linux and UNIX Patching the Instant Client ODBC driver on Linux/UNIX can be done by generating the Instant Client ODBC package and Basic or Basic Light package in a patched ORACLE_HOME. The procedure for patching and generating Instant Client ODBC, Basic and Basic Light packages is given in the Oracle Call Interface Programmer’s Guide. These new packages should then be unzipped into the Instant Client directory that needs to be patched. This method of patching is recommended.
Alternatively the Oracle Instant Client ODBC driver can be patched by copying the files that are listed below from a patched ORACLE_HOME:
- ODBC driver shared library file:
For 19c: libsqora.so.19.1
For 18c: libsqora.so.18.1
For 12c: libsqora.so.12.1
For 11g: libsqora.so.11.1 - Required additional files when using Oracle Instant Client Basic:
For 19c: libociei.so, libclntshcore.so.19.1, libclntsh.so.19.1, libnnz19.so, libons.so
For 18c: libociei.so, libclntshcore.so.18.1, libclntsh.so.18.1, libnnz18.so, libons.so
For 12c: libociei.so, libclntshcore.so.12.1, libclntsh.so.12.1, libnnz12.so, libons.so
For 11g: libclntsh.so.11.1, libociei.so, libnnz11.so - Required additional files when using Oracle Instant Client Basic Light:
For 19c: libclntsh.so.19.1, libclntshcore.so.19.1, libociicus.so, libnnz19.so, libons.so
For 18c: libclntsh.so.18.1, libclntshcore.so.18.1, libociicus.so, libnnz18.so, libons.so
For 12c: libclntsh.so.12.1, libclntshcore.so.12.1, libociicus.so, libnnz12.so, libons.so
For 11g: libclntsh.so.11.1, libociicus.so, libnnz11.so
On Windows Patching the Instant Client ODBC driver on Windows can be done only by manually copying the ODBC driver shared library files and supporting library files from a patched ORACLE_HOME or from an unpacked Oracle Database Bundle patch. These should be copied into the Instant Client directory. Generating an Instant Client ODBC package is not available on Windows.
The files that must be copied to the Instant Client directory:
- ODBC driver shared library files: sqora32.dll, sqoras32.dll, sqresus.dll, sqresja.dll
- Required additional files when using Oracle Basic Instant Client:
For 19c: oraociei19.dll, orannzsbb19.dll, oci.dll, oraons.dll, ociw32.dll, oraociei19.sym, orannzsbb19.sym, oci.sym, ociw32.sym
For 18c: oraociei18.dll, orannzsbb18.dll, oci.dll, oraons.dll, ociw32.dll, oraociei18.sym, orannzsbb18.sym, oci.sym, ociw32.sym
For 12c: oraociei12.dll, orannzsbb12.dll, oci.dll, oraons.dll, ociw32.dll, oraociei12.sym, orannzsbb12.sym, oci.sym, ociw32.sym
For 11g: oraociei11.dll, orannzsbb11.dll, oci.dll, ociw32.dll, oraociei11.sym, orannzsbb11.sym, oci.sym, ociw32.sym - Required additional files when using Oracle Basic Light Instant Client:
For 19c: oraociicus19.dll, orannzsbb19.dll, oci.dll, oraons.dll, ociw32.dll, oraociicus19.sym, orannzsbb19.sym, oci.sym, ociw32.sym
For 18c: oraociicus18.dll, orannzsbb18.dll, oci.dll, oraons.dll, ociw32.dll, oraociicus18.sym, orannzsbb18.sym, oci.sym, ociw32.sym
For 12c: oraociicus12.dll, orannzsbb12.dll, oci.dll, oraons.dll, ociw32.dll, oraociicus12.sym, orannzsbb12.sym, oci.sym, ociw32.sym
For 11g: oraociicus11.dll, orannzsbb11.dll, oci.dll, ociw32.dll, oraociicus11.sym, orannzsbb11.sym, oci.sym, ociw32.sym
Note: While copying from the Oracle Database Bundle patch, some of the files above may be missing. This implies that those files are unchanged and do not need to be patched.
Uninstalling Oracle ODBC Instant Client
On Linux and UNIX
The procedure to uninstall Instant Client ODBC on Linux/UNIX is:
- Remove the Oracle ODBC driver entry from the odbcinst.ini file of the unixODBC driver manager. The default name of this entry is like [Oracle 19c ODBC driver].
- Remove the DSN entry of the Oracle ODBC driver from odbc.ini . The default name of the DSN entry is like [OracleODBC-19c] .
- Delete all files and directories in the Instant Client ODBC directory.
On Windows
The procedure to uninstall Instant Client ODBC on Windows is:
- Remove the DSN associated with the Oracle ODBC driver in the ODBC Data Source Administrator (odbcad32) console.
- Execute odbc_uninstall.exe from the Instant Client ODBC directory.
- Delete all files and directories in the Instant Client ODBC directory.
Recommended unixODBC Driver Manager versions for Linux/UNIX
For Instant Client 18 and 19:
Platform | unixODBC Driver Manager Version |
---|---|
Linux 32bit, 64bit | 2.3.4 |
Solaris SPARC64 32bit, 64bit | 2.3.4 |
Solaris 32bit, 64bit | 2.3.4 |
AIX 5L 32bit, 64bit | 2.3.4 |
HP IA64 32bit, 64bit | 2.3.4 |
z/Linux 31bit, 64bit | 2.3.4 |
For Instant Client 12.1 and 12.2:
Источник
Installing and Configuring an ODBC Driver on Linux (DEB / RPM)
This article explains how to install, configure, and test Devart ODBC drivers on Debian-based or RPM-based Linux distributions.
What is an ODBC Driver?
Open Database Connectivity (ODBC) is an industry-standard application programming interface for database access. It is based on call-level specifications for database APIs and uses SQL as its database access language.
An ODBC driver uses the ODBC interface to access data in database management systems. It allows an ODBC-compliant application to gain access to one or more data sources.
ODBC drivers work under the control of an ODBC driver manager, which is a library that manages communication between the ODBC-aware application and ODBC drivers. The driver manager carries out a number of tasks, such as resolving data source names, loading and unloading of the driver, processing and passing ODBC function calls to the driver, mapping function calls and data types between different versions of the ODBC standard, e.g. between version 3.x and 2.x.
On Linux systems, you can choose between the unixODBC and iODBC driver manager. We recommend using the unixODBC driver manager as it is more popular among Linux users and our drivers are fully compatible with it. If you would like to use iODBC with our drivers on Linux, you would have to manually modify the configuration files of the driver manager; note though that full compatibility with iODBC and stable operation of the drivers is not guaranteed in this event.
You can choose to install the ODBC driver using the DEB or RPM package, depending on your Linux distribution. Both DEB and RPM packages of Devart ODBC drivers require unixODBC as the driver manager.
Prerequisites
1. Prior to installing an ODBC driver on Linux, you need to install the unixODBC driver manager and its dependencies. To verify whether unixODBC is installed in the system, you can run the commands which odbcinst and which isql, which should return the path to the corresponding tools, or just run isql, which should print the syntax and available options for the isql utility.
2. Verify that the bitness of the driver that you are going to install matches the bitness of your Linux system and the unixODBC driver manager. The bitness of the driver is indicated on the download page of our website; also can you find out the bitness of the driver by looking at the .deb filename — a 32-bit driver contains i386 in its filename, whereas a 64-bit driver contains amd64.
To learn about the bitness of your Linux system, run the command uname -m, which should print x86_64 on a 64-bit system and anything else like i386 / i486 / i586 / i686 on a 32-bit system.
Which ODBC Driver Manager to Choose on Linux?
Sometimes, our users ask, which ODBC driver manager they should choose on a Linux system, unixODBC or iODBC. Both of them are open-source implementations of the ODBC standard, which enable non-Windows systems to communicate with databases via ODBC. We recommend using the unixODBC driver manager with our ODBC drivers on Linux, mainly because it is more stable than iODBC.
Advantages of unixODBC include support by many ODBC applications by default, availability of a cursor library, thread safety (including flags to protect handles at different levels), support for the latest ODBC 3.8 standard, and others. Historically, iODBC has been used mostly on macOS.
Debian-Specific Prerequisites
For a Debian derivative, such as Ubuntu, the following packages are required:
- odbcinst1debian2 – this package contains the libodbcinst library from unixODBC, a library used by ODBC drivers for reading their configuration settings from /etc/odbc.ini and
/.odbc.ini;
These packages depend on each other, so if you try to install them separately, you will most likely get an error saying that one package depends on another package from the list, and you will keep going round in circles. The solution is to install the packages with a single command: sudo apt-get install odbcinst1debian2 libodbc1 odbcinst unixodbc
RPM-Specific Prerequisites
To retrieve a list of available RPM packages of the unixODBC driver manager, run sudo yum search unixODBC.
To install the 64-bit version of the unixODBC driver manager and all of its dependencies on a RHEL-derivative such as CentOS, run the command: sudo yum install -y unixODBC.x86_64 in the terminal.
The above command installs all programs and libraries in the unixODBC package, such as isql, odbcinst, libodbcinst, libodbc.
Installing and Configuring an ODBC Driver on Ubuntu
Let’s see how to install an ODBC driver on Ubuntu, which is a popular open-source Linux distribution based on Debian. For the sake of this tutorial, we will install Devart ODBC Driver for PostgreSQL, but the following steps are true for other Devart ODBC drivers as well.
There are two ways to install the driver on Ubuntu: using the Ubuntu Software Center (a discontinued high-level graphical front end for the APT/dpkg package management system) or using the dpkg manager for Debian packages.
1. To install the driver with Software Center, navigate to the directory with the .deb package of the ODBC driver and double click on the file. This will launch Software Center, where you only need to click on the Install button.
2. To install the driver using the command line, open a terminal window and navigate to the directory with the .deb package using the cd command, e.g. cd
/Downloads. Run the command sudo dpkg -i devartodbcpostgresql_amd64.deb in the terminal.
Note that the devartodbcpostgresql part of the filename is driver-specific, it will be different for other drivers. Once the installation has been successfully completed, we can configure a DSN to test connection to our database server.
During installation, a sample system DSN is created by the driver in odbc.ini, which is a registry and configuration file for ODBC Data Source Names. To configure the connection parameters, open the file in any text editor – for example, nano, and specify connection information.
You can either navigate to the folder /etc and double click on the odbc.ini file or run the command sudo nano /etc/odbc.ini in the terminal to open the file and start editing it. After entering the connection information, save the changes.
If you prefer to configure a user DSN, run sudo nano
/.odbc.ini in the terminal.
Now it is time to test our DSN for its connectivity to the database server and execute a few SQL statements using the interactive command-line tool isql. In the terminal, run the isql command followed by the name of the data source, e.g. isql Devart_PostgreSQL. If an ODBC connection has been successfully established, you should see the appropriate message printed.
Let’s try and execute an SQL statement to retrieve all fields from the table ‘cars’. Note that in order to remove extra white space from the isql output, we had to reconnect to the database system to add the -mNUM option, which limits the column display width to NUM characters.
Installing and Configuring an ODBC Driver on CentOS
Among the RPM-based distributions, we have chosen CentOS to install the RPM file of the ODBC driver.
Navigate to the directory with the RPM file and run the command sudo rpm -ivh devart-odbc-postgresql.x86_64.rpm to install the ODBC driver for Linux (64-bit version). Once the installation has been successfully completed, you can configure the DSN that is created during installation, or you can create a new one.
Navigate to the folder /etc and double click on the odbc.ini file or simply run the command sudo nano /etc/odbc.ini in the terminal to open the file for editing. After configuring the DSN parameters, save the changes to the odbc.ini file.
Now you can connect to the data source by issuing the command isql Devart_PostgreSQL, and then execute a query against the database to fetch data.
Step-by-Step ODBC Data Source Setup on Linux
- Run isql to verify whether unixODBC is installed.
- If not, install unixODBC: run sudo apt-get install odbcinst1debian2 libodbc1 odbcinst unixodbc for DEB or sudo yum install -y unixODBC.x86_64 for RPM.
- Run uname -m to verify that the installer matches the bitness of your system and unixODBC.
- To install the driver, run sudo dpkg -i drivername_amd64.deb for the .deb package or sudo rpm -ivh drivername.x86_64.rpm for the .rpm package.
- Run sudo nano /etc/odbc.ini to add entries to the odbc.ini file. Configure a DSN and save the changes.
- Run isql dsn_name to connect to the data source.
By following the instructions in this article, you can easily install and configure an ODBC driver on Linux and execute SQL statements to access or modify data in the database.
Источник