Настройка odbc linux oracle

Настройка odbc linux oracle

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 ~/.odbc.ini

* — Optional parameters

On Windows

  1. 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.
  3. 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 .
Читайте также:  Настройка сети linux ifconfig

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.

Читайте также:  Свой обработчик сигналов linux

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:

  1. 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].
  2. Remove the DSN entry of the Oracle ODBC driver from odbc.ini . The default name of the DSN entry is like [OracleODBC-19c] .
  3. Delete all files and directories in the Instant Client ODBC directory.

The procedure to uninstall Instant Client ODBC on Windows is:

  1. Remove the DSN associated with the Oracle ODBC driver in the ODBC Data Source Administrator (odbcad32) console.
  2. Execute odbc_uninstall.exe from the Instant Client ODBC directory.
  3. Delete all files and directories in the Instant Client ODBC directory.

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:

Platform unixODBC Driver Manager Version
Linux 32bit, 64bit 2.3.1
Solaris SPARC64 32bit, 64bit 2.3.1
Solaris 32bit, 64bit 2.3.1
AIX 5L 32bit, 64bit 2.3.1
HP IA64 32bit, 64bit 2.3.1
z/Linux 31bit, 64bit 2.3.1

For Instant Client 11g:

Читайте также:  По для linux резервное копирование
Platform unixODBC Driver Manager Version
Linux 32bit, 64bit 2.2.11, 2.2.14
Solaris SPARC64 32bit, 64bit 2.2.11
Solaris 32bit, 64bit 2.2.11
AIX 5L 32bit, 64bit 2.2.11
HP IA64 32bit, 64bit 2.2.11
z/Linux 31bit, 64bit 2.2.11

Oracle ODBC Driver Resources

  • Oracle Instant Client — Download ODBC
  • Oracle C and C++ Interfaces — Home page
  • Using the Oracle ODBC Driver — Database Development Guide
  • Oracle ODBC — Discussion forum
  • ODBC Driver Release Notes — Release information

Related Technologies

  • Scripting Languages — Using Node.js, PHP, Python and Ruby with Oracle Database
  • Oracle Database 12c Application Development — More great technologies
  • VirtualBox — Desktop virtualization
  • Database App Development VM — Prebuilt VirtualBox VM with Oracle Database 12c installed
  • Oracle Database Cloud Service — Database cloud service supporting any size workload
  • Oracle Databasec and Oracle Database «XE» Express Edition — Free Developer Downloads
  • Oracle Linux — Free yum repository server, with the latest errata

Источник

Configuring the ODBC Driver for Oracle

This feature will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Instead, use the ODBC driver provided by Oracle.

You can control performance of the ODBC Driver for Oracle by knowing the data environment and correctly setting the parameters of the data source connection through the ODBC Data Source Administrator dialog box or through connect string parameters. The dialog box provides the following controls for connecting to a data source using the dialog box or using connect strings:

  • User DSN tab Lists the Data Source Names that are local to the computer.
  • System DSN tab Enables you to add or remove a system data source. System data sources can be accessed by all users on the local computer.
  • File DSN tab Enables you to add or remove a file data source from the local computer. File data sources can be shared by all users who have the same driver installed.
  • Drivers tab Lists the installed ODBC drivers.
  • Tracing tab Enables you to specify how the ODBC Driver Manager traces calls to ODBC functions. You can configure tracing separately for each installed ODBC application.
  • Connection Pooling tab Enables you to select connection options for each installed driver.
  • About tab Lists the installed ODBC component files.

After you add a data source, you can use the ODBC Data Source Administrator dialog box to configure the access to your data source. Select a data source, and then click one of the tabs to edit or review the information.

Обратная связь

Отправить и просмотреть отзыв по

Источник

Оцените статью
Adblock
detector