O'Reilly logo

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

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Site and User Profiles

Two script files are executed every time SQL*Plus is started. These scripts define the site profile and the user profile and are named, respectively, glogin.sql and login.sql. Beginning with Oracle Database 10g, these scripts are executed each time you create a new database connection via the CONNECT command.

The site profile is made up of the commands contained in glogin.sql, which is the global login file . For all recent releases of Oracle, you'll find glogin.sql in the $ORACLE_HOME/ sqlplus/admin directory.

Tip

An Oracle8 install on a Windows system would place glogin.sql in a directory such as C:\ORAWIN95\PLUS80. For an Oracle 7.3 install on Windows, you would find glogin.sql in C:\ORAWIN95\PLUS33, or in a similarly named directory. In those releases, the registry entries PLUS80 and PLUS33 under the Oracle registry tree would point to the respective glogin.sql directories.

The user profile is similar to the site profile, except that it is intended to be user-specific. The script name is login.sql, and it is executed immediately after glogin.sql. SQL*Plus searches for the login.sql file in the current directory first, and then searches the directories listed in the SQLPATH environment variable. In a Unix installation and in Windows installations of recent releases, no default login.sql file or default SQLPATH variable will exist.

Tip

Windows installs of Oracle8 and Oracle 7.3 typically included default, login.sql files in directories named after the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required