Oracle Instant Client - Installing
From ARSWiki
Contents |
ARServer Installation with Oracle's Instant Client
Remedy uses the OCI api when the backend database is Oracle. OCI is an acronym for Oracle Call Interface and is a low level api for accessing an Oracle database. More information about OCI is available at the following sites:
At the time this article was written, the Instant Client was available for the following platforms (covers all available Remedy platforms, and then some):
- Solaris x86
- Windows 64-bit Itanium
- Linux x86-64
- Mac OS X
- Linux x86
- Linux Itanium
- Linux AMD64 (32-bit and 64-bit)
- z/Linux (32-bit and 64-bit)
- Microsoft Windows (32-bit)
- Solaris Operating System (SPARC) (64-bit)
- Solaris Operating System (SPARC) (32-bit)
- HP-UX PA-RISC (64-bit)
- HP-UX PA-RISC (32-bit)
- AIX5L (64-bit)
- AIX5L (32-bit)
- HP Tru64 UNIX
- HP-UX Itanium (64-bit)
- HP-UX Itanium (32-bit)
Advantages to using the Instant Client
- Reduced Storage
- Simplified Installation and Maintenance
- X is not required on Unix platforms
- Patching requires only an rpm update on the Linux platform
Download Oracle's Instant Client
The Oracle Instant Client is freely available (mostly anyway, depending on your stance; review the license agreement) from Oracle's site.
Available Releases
There are several different flavors of the Instant Client, as enumerated below. For a Remedy server to function, the Basic Lite flavor is all that is required. For the purpose of this article, we will use the SQL*Plus flavor, because it can be useful at times to have the SQL*Plus client on the server (automated migrations, manual server connectivity testing, etc.).
- Basic: All files required to run OCI, OCCI, and JDBC-OCI applications
- Basic Lite: Smaller version of the Basic, with only English error messages and Unicode, ASCII, and Western European character set support
- JDBC Supplement: Additional support for XA, Internationalization, and RowSet operations under JDBC
- SQL*Plus: Additional libraries and executable for running SQL*Plus with Instant Client
- SDK: Additional header files and an example makefile for developing Oracle applications with Instant Client
- ODBC: Additional libraries for enabling ODBC applications
Installing the Instant Client
Linux
This section will walk you through installing the Oracle Instant Client on the (CentOS 4.4) Linux platform using the rpm method of installation. The CentOS 4.4 server this was performed on was the minimal install set, with the following additional rpm's:
- bind-libs
- bind-utils
- elfutils
- expat
- gmp
- libxml2
- libxml2-python
- python
- python-elementtree
- python-sqlite
- python-urlgrabber
- readline
- rpm-python
- sqlite
- strace
- traceroute
- wget
- yum
- sendmail
- mailx
- diffutils
- vixie-cron
- man
- rsync
Total storage used for the OS (minimal install), additional packages, and Oracle Instant Client is 255mb. As you can see, the storage requirements are very small with this configuration.
Get the Software
Download the following rpm packages to the targeted Remedy server:
- Instant Client Package - Basic (oracle-instantclient-basic-10.2.0.3-1.i386.rpm)
- Instant Client Package - SQL*Plus (oracle-instantclient-sqlplus-10.2.0.3-1.i386.rpm)
Install the Software
Prior to installing the rpm's, we can view the files contained within the rpm as follows:
[root@arsdev oic]# rpm -ql oracle-instantclient-basic-10.2.0.3-1 /usr/lib/oracle/10.2.0.3/client/bin/genezi /usr/lib/oracle/10.2.0.3/client/lib/libclntsh.so.10.1 /usr/lib/oracle/10.2.0.3/client/lib/libnnz10.so /usr/lib/oracle/10.2.0.3/client/lib/libocci.so.10.1 /usr/lib/oracle/10.2.0.3/client/lib/libociei.so /usr/lib/oracle/10.2.0.3/client/lib/libocijdbc10.so /usr/lib/oracle/10.2.0.3/client/lib/ojdbc14.jar [root@arsdev oic]# rpm -ql oracle-instantclient-sqlplus-10.2.0.3-1 /usr/bin/sqlplus /usr/lib/oracle/10.2.0.3/client/bin/sqlplus /usr/lib/oracle/10.2.0.3/client/lib/glogin.sql /usr/lib/oracle/10.2.0.3/client/lib/libsqlplus.so /usr/lib/oracle/10.2.0.3/client/lib/libsqlplusic.so
This step must be performed as root.
[root@arsdev oic]# rpm -Uvh oracle-instantclient-basic-10.2.0.3-1.i386.rpm oracle-instantclient-sqlplus-10.2.0.3-1.i386.rpm Preparing... ########################################### [100%] 1:oracle-instantclient-ba########################################### [ 50%] 2:oracle-instantclient-sq########################################### [100%]
Configure the SQL*Plus Client
The following environment variables must be set:
LD_LIBRARY_PATH=/usr/lib/oracle/10.2.0.3/client/lib:${LD_LIBRARY_PATH}
NLS_LANG=AMERICAN_AMERICA.UTF8
SQLPATH=/usr/lib/oracle/10.2.0.3/client/lib:${SQLPATH}
export LD_LIBRARY_PATH NLS_LANG SQLPATH
Now to configure the SQL*Plus client to use TNSNames for instance name resolution:
mkdir /usr/lib/oracle/10.2.0.3/network mkdir /usr/lib/oracle/10.2.0.3/network/admin touch /usr/lib/oracle/10.2.0.3/network/admin/tnsnames.ora ORACLE_HOME=/usr/lib/oracle/10.2.0.3 export ORACLE_HOME
Now to define the /usr/lib/oracle/10.2.0.3/network/admin/tnsnames.ora contents with our oracle instances:
ORACLE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora01)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = oracle)
)
)
Testing the SQL*Plus Configuration
If the above steps were performed properly, you should be able to connect to your remote Oracle instance as illustrated below.
[root@arsdev oic]# sqlplus /nolog SQL*Plus: Release 10.2.0.3.0 - Production on Tue Mar 6 19:04:41 2007 Copyright (c) 1982, 2006, Oracle. All Rights Reserved. SQL> connect system/manager@oracle Connected. SQL>
Windows
This installation was performed Windows 2003 Server - Standard Edition. All Microsoft updates (as of 2007/03/09) were applied prior to starting the installation process.
Get the Software
Download the following files on the targeted Remedy server:
- Instant Client Package - Basic (instantclient-basic-win32-10.2.0.3-20061115.zip)
- Instant Client Package - SQL*Plus (instantclient-sqlplus-win32-10.2.0.3-20061115.zip)
Install the Software
- Create the installation directories.
- The directory structure was designed to conform to the directory structure defined in Oracle's Instant Client documentation.
- Create the following directories:
C:\instantclient10_2
- Extract the OCI zip (instantclient-basic-win32-10.2.0.3-20061115.zip) into C:\instantclient10_2
- Extract the SQL*Plus zip (instantclient-sqlplus-win32-10.2.0.3-20061115.zip) into C:\instantclient10_2
- Update the Path statement to include C:\instantclient10_2
- Right click My Computer, select Properties
- Click the Advanced tab
- Click the Environment Variables button
- Update the PATH environment variable in the 'System Variables' section
- Create a new environment variable SQL_PATH
- Right click My Computer, select Properties
- Click the Advanced tab
- Click the Environment Variables button
- Click 'New' button under the 'User Variables' section
- Use the following parameters:
- Variable: SQL_PATH
- Value: C:\instantclient10_2
- The resulting files should be as follows:
C:\>dir /O:N /Q /S c:\instantclient10_2
Volume in drive C has no label.
Volume Serial Number is E8A7-E706
Directory of c:\instantclient10_2
03/09/2007 07:11 PM <DIR> BUILTIN\Administrators .
03/09/2007 07:11 PM <DIR> BUILTIN\Administrators ..
10/02/2006 11:36 PM 1,600,090 BUILTIN\Administrators classes12.jar
08/30/2004 02:18 AM 1,525 BUILTIN\Administrators glogin.sql
11/16/2006 04:04 PM 352,256 BUILTIN\Administrators oci.dll
10/10/2006 02:39 PM 77,824 BUILTIN\Administrators ocijdbc10.dll
11/16/2006 03:12 PM 18,432 BUILTIN\Administrators ociw32.dll
10/02/2006 11:36 PM 1,545,954 BUILTIN\Administrators ojdbc14.jar
10/10/2006 07:48 AM 1,093,632 BUILTIN\Administrators orannzsbb10.dll
11/16/2006 04:11 PM 778,240 BUILTIN\Administrators oraocci10.dll
11/16/2006 04:08 PM 91,295,744 BUILTIN\Administrators oraociei10.dll
10/12/2006 04:46 AM 1,650,688 BUILTIN\Administrators Orasqlplusic10.dll
10/12/2006 04:37 AM 557,056 BUILTIN\Administrators sqlplus.exe
11 File(s) 98,971,441 bytes
Total Files Listed:
11 File(s) 98,971,441 bytes
2 Dir(s) 16,072,417,280 bytes free
Configure the SQL*Plus Client
- Create a file named c:\instantclient10_2\NETWORK\ADMIN\tnsnames.ora. Populate this file with your Oracle instance information. See the example below for a simple reference.
ORACLE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = ora01.home.arswiki.org)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = oracle)
)
)
The resulting files should be as follows:
C:\>dir /O:N /Q /S c:\instantclient10_2
Volume in drive C has no label.
Volume Serial Number is E8A7-E706
Directory of c:\instantclient10_2
03/09/2007 07:21 PM <DIR> BUILTIN\Administrators .
03/09/2007 07:21 PM <DIR> BUILTIN\Administrators ..
10/02/2006 11:36 PM 1,600,090 BUILTIN\Administrators classes12.jar
08/30/2004 02:18 AM 1,525 BUILTIN\Administrators glogin.sql
03/09/2007 07:20 PM <DIR> BUILTIN\Administrators network
11/16/2006 04:04 PM 352,256 BUILTIN\Administrators oci.dll
10/10/2006 02:39 PM 77,824 BUILTIN\Administrators ocijdbc10.dll
11/16/2006 03:12 PM 18,432 BUILTIN\Administrators ociw32.dll
10/02/2006 11:36 PM 1,545,954 BUILTIN\Administrators ojdbc14.jar
10/10/2006 07:48 AM 1,093,632 BUILTIN\Administrators orannzsbb10.dll
11/16/2006 04:11 PM 778,240 BUILTIN\Administrators oraocci10.dll
11/16/2006 04:08 PM 91,295,744 BUILTIN\Administrators oraociei10.dll
10/12/2006 04:46 AM 1,650,688 BUILTIN\Administrators Orasqlplusic10.dll
10/12/2006 04:37 AM 557,056 BUILTIN\Administrators sqlplus.exe
11 File(s) 98,971,441 bytes
Directory of c:\instantclient10_2\network
03/09/2007 07:20 PM <DIR> BUILTIN\Administrators .
03/09/2007 07:20 PM <DIR> BUILTIN\Administrators ..
03/09/2007 07:21 PM <DIR> BUILTIN\Administrators admin
0 File(s) 0 bytes
Directory of c:\instantclient10_2\network\admin
03/09/2007 07:21 PM <DIR> BUILTIN\Administrators .
03/09/2007 07:21 PM <DIR> BUILTIN\Administrators ..
03/09/2007 07:20 PM 198 BUILTIN\Administrators tnsnames.ora
1 File(s) 198 bytes
Total Files Listed:
12 File(s) 98,971,639 bytes
8 Dir(s) 16,072,417,280 bytes free
Testing the SQL*Plus Configuration
If the above steps were performed properly, you should be able to connect to your remote Oracle instance as illustrated below.
Microsoft Windows [Version 5.2.3790] (C) Copyright 1985-2003 Microsoft Corp. C:\Documents and Settings\Administrator>sqlplus /nolog SQL*Plus: Release 10.2.0.3.0 - Production on Fri Mar 9 19:21:29 2007 Copyright (c) 1982, 2006, Oracle. All Rights Reserved. SQL> connect system/manager@oracle Connected. SQL>

