SQL*Plus Instant Client Release Notes Release 10.1 |
|
January 2005
SQL*Plus Instant Client offers all the functionality of SQL*Plus command-line, without the need for a traditional ORACLE_HOME installation. SQL*Plus Instant Client is easy to install, and uses significantly less disk space.
SQL*Plus Instant Client is available on platforms that support the OCI Instant Client. See the Oracle Call Interface Programmer's Guide for more information on the OCI Instant Client.
SQL*Plus Instant Client does not include a database.
SQL*Plus Instant Client 10.1 can be downloaded from the Oracle Technology Network (OTN) or installed from the Oracle Database 10g Client Release CD.
Download matching versions, i.e. 10.1.0.4, of the Basic Instant Client and SQL*Plus Instant Client packages from the OTN Instant Client page.
On Linux, use rpm -i for the initial install of the RPM packages, or rpm -u to upgrade to a newer version of the packages.
On other platforms the two packages should be unzipped into one directory, for example, /home/instantclient10_1 on UNIX or c:\instantclient10_1 on Windows. This table shows the Oracle client-side files required to deploy SQL*Plus Instant Client 10.1.
Platform |
Description | Package | |
UNIX/Linux | Windows | ||
sqlplus | sqlplus.exe | SQL*Plus executable | SQL*Plus |
libsqlplus.so | not applicable | SQL*Plus library | |
glogin.sql | glogin.sql | SQL*Plus site profile | |
libclntsh.so.10.1 | oci.dll | Client code library | Basic |
libociei.so | oraociei10.dll | OCI Instant Client data shared library | |
libnnz10.so | orannzsbb10.dll | Security library |
Files included in the Basic package which are not listed may be ignored or can be removed to save disk space.
The SQL*Plus Instant Client package should never be installed on an ORACLE_HOME.
Run the installer on the Oracle Database 10g Client CD and choose the Administrator option. After the installation completes, create a new directory and copy the SQL*Plus and OCI Instant Client files to it. All libraries must be copied from the same ORACLE_HOME into one directory. For example /home/instantclient10_1 on UNIX and Linux, or c:\instantclient10_1 on Windows.
$ORACLE_HOME/instantclient/libociei.so $ORACLE_HOME/lib/libclntsh.so.10.1 $ORACLE_HOME/lib/libnnz10.so $ORACLE_HOME/lib/libsqlplus.so $ORACLE_HOME/bin/sqlplus $ORACLE_HOME/sqlplus/admin/glogin.sql
%ORACLE_HOME%\instantclient\oraociei10.dll %ORACLE_HOME%\bin\oci.dll %ORACLE_HOME%\bin\orannzsbb10.dll %ORACLE_HOME%\bin\sqlplus.exe %ORACLE_HOME%\sqlplus\admin\glogin.sql
After the required files are installed, the environment needs to be configured.
The SQL*Plus Instant Client executable should only be used with the matching version of the Basic Instant Client.
Note that no ORACLE_HOME or ORACLE_SID environment variables need to be set.
The RPMs install into Oracle specific sub-directories in the /usr file system. The sub-directory structure enables multiple versions of Instant Client to be available.
For example on Solaris in the Bourne or Korn shells:
LD_LIBRARY_PATH= /usr/lib/oracle/10.1.0.4/client/lib:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH
Make sure the sqlplus executable installed from the RPM is found first in your PATH. To test, enter "which sqlplus", which should return /usr/bin/sqlplus. If not, remove any other Oracle directories from PATH, or put /usr/bin before other SQL*Plus executables in the PATH, or use an absolute or relative path to start SQL*Plus.
For example to set the path in the bash shell:
PATH=/usr/bin:${PATH} export PATH
If you install multiple versions of SQL*Plus, you may need to change the symbolic link /usr/bin/sqlplus to the version of SQL*Plus matching the libraries in LD_LIBRARY_PATH. For 10.1.0.4, /usr/bin/sqlplus is a symbolic link to the SQL*Plus binary at /usr/lib/oracle/10.1.0.4/client/bin/sqlplus.
Set SQLPATH to the directory containing glogin.sql.
For example:
SQLPATH=/usr/lib/oracle/10.1.0.4/client/lib:${SQLPATH} export SQLPATH
Set Oracle globalization variables required for your locale. A default locale will be assumed if no variables are set. See the Oracle Database Globalization Support Guide for more information.
For example to set NLS_LANG for a Japanese environment:
NLS_LANG=JAPANESE_JAPAN.JA16EUC export NLS_LANG
LD_LIBRARY_PATH=/home/instantclient10_1:${LD_LIBRARY_PATH} export LD_LIBRARY_PATH
PATH=/home/instantclient10_1:${PATH} export PATH
SQLPATH=/home/instantclient10_1:${SQLPATH} export SQLPATH
NLS_LANG=JAPANESE_JAPAN.JA16EUC export NLS_LANG
The environment may be configured using SET commands in a Windows command prompt or made permanent by setting the Environment Variables in the System Properties.
For example, to set environment variables in Windows 2000 using System Properties, open System from the Control Panel, click the Advanced tab and then click Environment Variables.
Add the directory containing the Instant Client files to the PATH system environment variable. Remove any other Oracle directories from PATH.
For example add c:\instantclient10_1 to the beginning of the PATH.
For example create a user variable SQLPATH set to c:\instantclient10_1
For example, to set NLS_LANG for a Japanese environment, create a user environment variable NLS_LANG set to JAPANESE_JAPAN.JA16EUC.
An example using an Easy Connection identifier to connect to the HR schema in the MYDB database running on mymachine is:
sqlplus hr@//mymachine.mydomain:port/MYDB
Alternatively you can use a Net Service Name:
sqlplus hr@MYDB
Net Service Names can be stored in a number of places, including LDAP. The use of LDAP is recommended to take advantage of the new features of Oracle Database 10g. See the Oracle Database Net Services Reference Guide for more information.
If you want to use Net Service Names configured in a local Oracle Net tnsnames.ora file, then set the environment variable TNS_ADMIN to the directory containing the tnsnames.ora file. For example, on UNIX, if your tnsnames.ora file is in /home/user1 and it defines the Net Service Name MYDB2:
TNS_ADMIN=/home/user1 export TNS_ADMIN sqlplus hr@MYDB2
If TNS_ADMIN is not set, then an operating system dependent set of directories is examined to find tnsnames.ora. This search path includes looking in the directory specified by the ORACLE_HOME environment variable for network/admin/tnsnames.ora. This is the only reason to set the ORACLE_HOME environment variable for SQL*Plus Instant Client. If ORACLE_HOME is set when running Instant Client applications, it must be set to a directory that exists.
This example assumes the ORACLE_HOME environment variable is set, and the $ORACLE_HOME/network/admin/tnsnames.ora or %ORACLE_HOME%\network\admin\tnsnames.ora file defines the Net Service Name MYDB3:
sqlplus hr@MYDB3
The TWO_TASK (on UNIX or Linux) or LOCAL (on Windows) environment variable can be set to a connection identifier. This removes the need to explicitly enter the connection identifier whenever a connection is made in SQL*Plus or SQL*Plus Instant Client. This UNIX example connects to the database known as MYDB4:
TNS_ADMIN=/home/user1 export TNS_ADMIN TWO_TASK=MYDB4 export TWO_TASK sqlplus hr
On Windows, TNS_ADMIN and LOCAL may be set in the System Properties as described in section 1.2.3
To connect AS SYSDBA or AS SYSOPER to perform DBA tasks, you need to set up an Oracle password file on the database server using the database's orapwd utility. Once this is configured, your SQL*Plus Instant Client connection string might look something like:
sqlplus sys@MYDB AS SYSDBA
See the Oracle Database Administrator's Guide for information on Oracle password files.
If the Linux RPMs were installed, use rpm -qa to find the Instant Client SQL*Plus and Basic package names and run rpm -e to remove them. Otherwise for all platforms manually delete the directory containing the SQL*Plus executable, Oracle libraries and glogin.sql
Reset environment variables such as PATH, SQLPATH, LD_LIBRARY_PATH and TNS_ADMIN.
Remove tnsnames.ora if necessary.
The SQL*Plus tool can be removed separately from the OCI Instant Client. The remaining libraries enable custom written OCI programs or third party database utilities to connect to a database.
If Linux RPMs were installed, use rpm -e only on the SQL*Plus Instant Client package. Otherwise for all platforms manually remove the following SQL*Plus specific files:
Platform
|
Description | |
UNIX/Linux | Windows | |
sqlplus | sqlplus.exe | SQL*Plus executable |
libsqlplus.so | not applicable | SQL*Plus library |
glogin.sql | glogin.sql | SQL*Plus site profile |
Reset environment variables and remove tnsnames.ora if necessary.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.
Copyright © 2003, 2004 Oracle Corporation.
All Rights Reserved.