Skip to Main Content
Oracle SQL*Plus: The Definitive Guide
book

Oracle SQL*Plus: The Definitive Guide

by Jonathan Gennick
March 1999
Intermediate to advanced content levelIntermediate to advanced
528 pages
14h 39m
English
O'Reilly Media, Inc.
Content preview from Oracle SQL*Plus: The Definitive Guide

Environment Variable Settings

There are a number of environment variables that can affect how SQL*Plus operates. One of the most commonly used of these is the SQLPATH variable. SQLPATH functions much like a command search path, except that it applies to SQL scripts. It contains a list of directories to search when looking for a script. The way you set SQLPATH and other variables depends on the specific operating system you are using. The next few sections demonstrate how SQLPATH is set under Windows 3.1, Windows 95, Windows 98, Windows NT, and Unix. Following these examples is a complete list of all the environment variables that apply to SQL*Plus.

Setting an Environment Variable

Under Unix, SQL*Plus settings are stored in environment variables. You usually set these variables with the Unix export command. The situation is pretty much the same for Windows 3.1 and DOS, except that you use the DOS SET command. In later versions of Windows, such as Windows 95, these settings are stored in the registry.

Unix

To set an environment variable from Unix, you generally use either the export or setenv command, depending on which shell you are using. The following example, using the Korn shell, shows how to set the SQLPATH variable to point to your home directory:

$ export SQLPATH=$HOME

Here is the same example using the C Shell’s setenv command:

$ setenv SQLPATH $HOME

Note that with export you use an equals sign between the variable and the value, while with setenv you do not. You can use ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Oracle SQL*Plus: The Definitive Guide, 2nd Edition

Oracle SQL*Plus: The Definitive Guide, 2nd Edition

Jonathan Gennick
Oracle PL/SQL Programming, Third Edition

Oracle PL/SQL Programming, Third Edition

Steven Feuerstein, Bill Pribyl
Oracle SQL

Oracle SQL

Dan Hotka

Publisher Resources

ISBN: 1565925785Supplemental ContentCatalog PageErrata