SQL*Plus Instant Client
Release
Notes
Release
10.1
February 2004
1 SQL*Plus Instant Client
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.
1.1
Installing SQL*Plus Instant Client
SQL*Plus Instant Client 10.1 can be installed in two ways:
-
By downloading the Basic Instant Client and SQL*Plus Instant Client
packages from the Oracle
Technology Network Instant Client page. The two packages should
be unzipped into one directory. For example, /home/instantclient on
UNIX, or c:\instantclient on Windows.
This table shows the Oracle client-side files required to deploy the
SQL*Plus Instant Client.
|
Platform
|
Description |
Package |
| UNIX |
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 |
Other files included in the Basic package may be
ignored or can be removed to save disk space.
The SQL*Plus Instant Client package should only be
used with the Basic Instant Client package and should never be
installed on an ORACLE_HOME.
-
By choosing the Administrator install option from the Oracle Database
10g Client CD. 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/instantclient on UNIX, or c:\instantclient on Windows.
On UNIX copy these files:
$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
On Windows copy these files:
%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 in one directory,
the environment needs to be configured. Make sure the changes are
local and do not affect existing Oracle installations.
-
If your operating system requires a shared library path
such as LD_LIBRARY_PATH, LIBPATH or SHLIB_PATH, add the name of the directory
containing the Instant Client files, and remove any other Oracle directories.
For example on Solaris:
LD_LIBRARY_PATH=/home/instantclient:${LD_LIBRARY_PATH}
export LD_LIBRARY_PATH
-
Add the directory to the PATH environment variable. This
is mandatory on Windows. If it is not set on UNIX, then an absolute or relative
path must be used to start the SQL*Plus executable. Remove any other Oracle
directories from PATH.
For example on UNIX:
PATH=/home/instantclient:${PATH}
export PATH
For example in a Windows command prompt:
set PATH=c:\instantclient;%PATH%
-
Set SQLPATH to the directory. This lets SQL*Plus find glogin.sql.
For example on UNIX:
SQLPATH=/home/instantclient:${SQLPATH}
export SQLPATH
For example in a Windows command prompt:
set SQLPATH=c:\instantclient;%SQLPATH%
-
Set any Oracle globalization variables required for your locale. See the Oracle Database 10g Globalization Support Guide for more information.
For example on UNIX to set NLS_LANG:
NLS_LANG=JAPANESE_JAPAN.JA16EUC
export NLS_LANG
SQL*Plus is now ready to run. Note that no ORACLE_HOME or ORACLE_SID environment
variables need to be set.
1.2 Connecting
to a Database with SQL*Plus Instant Client
SQL*Plus Instant Client is always 'remote' from any database server. To connect
to a database you must specify the database using an Oracle Net connection identifier.
An example using an Easy Connection identifier to connect to the HR schema
in the MYDB database running on mymachine is:
sqlplus hr/your_password@//mymachine.mydomain:port/MYDB
Using a Net Service Name:
sqlplus hr/your_password@MYDB
Net Service Names can be stored in a number of places, including Oracle Names.
See the 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/your_password@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/your_password@MYDB3
The TWO_TASK (on UNIX) 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/your_password
1.3 Connecting
using AS SYSDBA or AS SYSOPER with SQL*Plus Instant Client
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/your_password@MYDB AS SYSDBA
See the Oracle Database Administrator's Guide for information on Oracle
password files.
1.4 Uninstalling
SQL*Plus Instant Client
To remove the complete SQL*Plus Instant Client, delete the directory containing
the SQL*Plus executable, Oracle libraries and glogin.sql. If you created
a tnsnames.ora file, remove it too. Reset any environment variables such
as LD_LIBRARY_PATH, PATH or TNS_ADMIN.
The SQL*Plus tool can be removed separately from the OCI Instant Client. The
remaining libraries will allow custom written OCI programs or third party database
utilities to connect to a database.
To delete only the SQL*Plus tool from the OCI Instant Client, remove the following
SQL*Plus specific files which are not needed for the OCI Instant Client:
|
Platform
|
Description |
| UNIX |
Windows |
| sqlplus |
sqlplus.exe |
SQL*Plus executable |
| libsqlplus.so |
not applicable |
SQL*Plus library |
| glogin.sql |
glogin.sql |
SQL*Plus site profile |
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.