Oracle7 Administrator's Reference for UNIX

Contents Index Home Previous Next

Administering SQL*Plus

Setup Files

The setup files for SQL*Plus are glogin.sql, the global setup file, and login.sql, for local and individual use. The glogin.sql and login.sql files contain either SQL statements or SQL*Plus commands that you choose to execute at the beginning of each SQL*Plus session. When you invoke SQL*Plus, glogin.sql is read first, followed by login.sql.

The glogin.sql File

The glogin.sql file is executed regardless of your current directory. The DBA can customize the glogin.sql file. When you install (rather than upgrade) SQL*Plus, existing glogin.sql files are deleted. The glogin.sql file is in $ORACLE_HOME/sqlplus/admin.

The login.sql File

The SQLPATH environment variable contains a list of directories, separated by colons. SQL*Plus searches for the login.sql file in the directories listed in SQLPATH.

Following is a sample login.sql file:

set echo off
set feedback 4
set pause on
set pause "PLEASE PRESS RETURN TO CONTINUE"
set message on
set echo on

The pupbld.sql File

$ORACLE_HOME/sqlplus/admin/pupbld.sql contains a script to build the PRODUCT_USER_PROFILE table and a description of the script. To invoke pupbld.sql using pupbld in the $ORACLE_HOME/bin directory, set the SYSTEM_PASS variable to the string SYSTEM/password and set the ORACLE_HOME variable.

Installing the SQL*Plus Demonstrations Manually

The $ORACLE_HOME/sqlplus/demo directory contains demonstration files that are installed automatically by the install script. You can use the SQL statements in the $ORACLE_HOME/sqlplus/demo/demobld.sql file to build the scott demonstration database by entering:

$ demobld scott/tiger

The demonstration database tables can also be accessed from the scott account on your Oracle system (the password is tiger).

Installing the SQL*Plus Help Tables Manually

To install the SQL*Plus help tables manually:

$ helpins

See Also: The README.doc file in the $ORACLE_HOME/sqlplus/doc directory for more information.


Contents Index Home Previous Next