The Working Directory

Whenever you work with files in SQL*Plus, you must understand the concept of a working directory. The working directory is simply the directory that is used whenever you specify a filename without also including a path. The working directory is where SQL*Plus writes temporary files, such as the afiedt.buf file created when you invoke the EDIT command.

If you work under an operating system like Unix, you will be familiar with the concept of a current working directory. You will likely need to know how to move between directories, and will be familiar with commands such as pwd that tell you what your current directory is. The working directory simply happens to be whatever directory you are in when you invoke SQL*Plus.

Users of the Microsoft Windows operating system tend to be a bit insulated from the concept of a current directory. SQL*Plus is often invoked under Windows by clicking an icon, and the user often does not think of himself as being "in" any particular directory when this is done. Nonetheless, some directory will be current when you run SQL*Plus under Windows. Take a look at Figure 2-9. It shows the properties for the SQL*Plus menu item under Windows XP.

The SQL*Plus shortcut properties under Windows XP

Figure 2-9. The SQL*Plus shortcut properties under Windows XP

Notice the Start in setting shown in Figure 2-9. It's set to the c:\oracle\product\10.1.1.0\Db_1\BIN directory, the same directory in which ...

Get Oracle SQL*Plus: The Definitive Guide, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.