SQL Plus

This is an old revision of this page, as edited by YordanGeorgiev (talk | contribs) at 20:48, 25 December 2007 (External links: added bulgarian language ~~~~). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

SQL*Plus is an Oracle command line utility which allows users to run SQL and PL/SQL commands interactively or from a script. Complete documentation for the SQL*Plus interpreter can be found on the Oracle website[1].

SQL*Plus is a simple tool with a basic command line interface, however it is commonly used as it is almost always available in any Oracle software installation.

Command types

SQL*Plus understands SQL statements, PL/SQL blocks and internal commands[2]. all of these may be combined in a script.

An example session might begin by executing sqlplus scott/tiger where scott is an Oracle user with the password tiger. SQL*Plus will present a prompt:

SQL>

You might then execute an SQL query:

SQL> select 'Hello world' as example from dual;

EXAMPLE
--------------------------------
Hello world

Versions

UFI

SQL*Plus's predecessor was called UFI (User Friendly Interface). UFI was included in the first Oracle database releases up to Oracle v4.

The UFI interface was extremely primitive and, in today's terms, anything but user friendly. If a statement was entered incorrectly, UFI issued an error and rolled back the entire transaction.

Advanced UFI

After new features were added to UFI, it was renamed internally to Advanced UFI. The name "Advanced UFI" was never used officially, as the name was changed to SQL*Plus before this version was released.

SQL*Plus

SQL*Plus is the current name of the product.

afiedt.buf file

AFIEDT.BUF is the SQL*Plus default edit save file. When you issue the "edit" command, the last SQL or PL/SQL command will be saved to a file called AFIEDT.BUF and opened in the default editor.

In the early days when SQL*Plus was called UFI (User Friendly Interface) this file was initially named "ufiedt.buf", short for UFI editing buffer.

When the product was renamed to Advanced UIF The file name was changed to "aufiedt.buf" and then to "afiedt.buf" to keep the name short enough for compatibility with some of the odd operating systems that Oracle supported in those days.

Although the product has long been renamed to SQL*Plus, the old file is still in use.

Compatibility

Various software is known to be somewhat compatible with SQL*Plus script commands or offer a SQL*Plus mode of operation. These include TOAD from Quest and others.

References

  1. ^ "Oracle SQL*Plus documentation". Retrieved 2007-11-26.
  2. ^ "SQL*Plus at orafaq.com". Retrieved 2007-11-26.