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

Oracle SQL*Plus: The Definitive Guide

by Jonathan Gennick
March 1999
Intermediate 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.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

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

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

Jonathan Gennick
Oracle SQL

Oracle SQL

Dan Hotka
Oracle PL/SQL

Oracle PL/SQL

Lewis Cunningham

Publisher Resources

ISBN: 1565925785Catalog PageErrata