SQL*Plus
Getting Started
Release 8.0.5 for Windows NT and Windows 95/98 A64421-01 |
|
This chapter provides the operating system-specific information
that is referenced in SQL*Plus User's Guide
and Reference.
Specific topics discussed are:
"Access to Sample Tables" in Chapter 1 of the SQL*Plus User's Guide and Reference discusses the sample data that you must load into your database in order to work through the exercises.
Note: If you access a database installed on another computer, your database administrator should build these tables for you. |
To load the data, start SQL*Plus with the user account for
working through the examples. The SQL*Plus
User's Guide and Reference refers to the user name SCOTT with the
password TIGER, but you can use any account that has the resource privilege.
Enter the following command at the SQL*Plus prompt:
SQL> @ORACLE_HOME\DBS\DEMOBLD.SQL
When you finish working through the examples, you can remove the sample data from the database by entering the following command:
SQL> @ORACLE_HOME\DBS\DEMODROP.SQL
"Shortcuts to Starting SQL*Plus" in Chapter 2 of the SQL*Plus
User's Guide and Reference refers you to this guide for information
about automatically logging on to SQL*Plus when you log on to your operating
system.
When connecting to an Oracle database on the same Windows NT or Windows 95/98 machine, you can set up SQL*Plus to do an automatic login by following these steps:
The section "Collecting Timing Statistics on Commands You
Run" in Chapter 2 and the sections "SET" and "TIMING" in Chapter 7 of the
SQL*Plus User's Guide and Reference
discuss how to use the TIMING command and the SET TIMING command to record
timing data for an elapsed period.
SQL*Plus for Windows NT/95 displays the accumulated time
in milliseconds.
"Interpreting Error Messages" in Chapter 2 of the SQL*Plus
User's Guide and Reference refers you to the Oracle8
Error Messages manual and this guide to find error codes that begin
with the letters ORA.
If you do not find the error code in the Oracle8 Error
Messages manual, see the Getting Started guide provided with
your Oracle database.
"Setting Up Your SQL*Plus Environment" in Chapter 3 of the
SQL*Plus User's Guide and Reference
describes the LOGIN.SQL and GLOGIN.SQL files.
When you install SQL*Plus for Windows NT/95, LOGIN.SQL is
copied to the DBS subdirectory of your Oracle home directory.
When you install SQL*Plus for Windows NT/95, GLOGIN.SQL is
copied to the PLUS80 subdirectory of your Oracle home directory.
If you modify LOGIN.SQL or GLOGIN.SQL, make sure you do not
add any ANSI escape sequences.
Some Oracle products use a LOGIN file named LOGIN.NEW. If
this file exists on your computer, make sure you do not use it with SQL*Plus
for Windows NT/95.
"Sending Results to a File" in Chapter 4 of the SQL*Plus
User's Guide and Reference describes the SPOOL command.
This command is available in the File menu of SQL*Plus for
Windows NT/95. See the section "File Menu" in Chapter 2 of this guide for
more information.
When you use the SPOOL command from the graphical user interface
or the command line interface, SQL*Plus for Windows NT/95 adds .LST to
the file name if you do not specify an extension.
SQL*Plus for Windows NT/95 does not support the use of the
SPOOL OUT clause at the command line.
"Setting Up the Site Profile" in Chapter 6 of the SQL*Plus
User's Guide and Reference describes the Site Profile, a SQL*Plus
command file created by the database administrator.
This command file is not applicable to the Windows NT or
Windows 95/98 environment.
The sections "@ ("at" sign)," "@@(double "at" sign)," and
"START" in Chapter 7 of the SQL*Plus User's
Guide and Reference describe how SQL*Plus searches for a file when
you use the @, @@, or START command.
SQL*Plus for Windows NT/95 searches the current default directory
for the file name that you specify with the @, @@, or START command. If
SQL*Plus cannot find this file, the program searches a path to find the
file.
You can specify the path that SQL*Plus searches by modifying
the SQLPATH parameter in your registry.
"EXIT" in Chapter 7 of the SQL*Plus
User's Guide and Reference describes how to use the EXIT command
to run SQL*Plus command files in batch mode.
SQL*Plus for Windows NT/95 does not support batch mode.
"HOST" in Chapter 7 of the SQL*Plus
User's Guide and Reference describes how to use the HOST command
to execute a host operating system command without leaving SQL*Plus.
In SQL*Plus for Windows NT/95, you can access the MS-DOS
command prompt by entering the HOST command or a dollar sign ($) at the
SQL*Plus prompt.
To return to SQL*Plus from the MS-DOS command prompt, enter
the EXIT command.
"SET" in Chapter 7 of the SQL*Plus
User's Guide and Reference describes how to set the NEWPAGE system
variable, as well as many other system variables.
The SET NEWPAGE 0 command does not clear the screen between
pages. Instead, a black box appears. This occurs because the text printing
APIs do not support the formfeed character "/f" on these platforms.
"PRODUCT_USER_PROFILE Table" in Appendix E of the SQL*Plus
User's Guide and Reference describes the PRODUCT_USER_PROFILE table,
which provides product-level security that supplements the user-level security
provided by the SQL GRANT and REVOKE commands and user roles.
To create this table, you or your database administrator
must run the PUPBLD.SQL file, which is located in the ORACLE_HOME\DBS
directory.
If you are using SQL*Plus for Windows NT/95 with a remote
database, you may want to install the PRODUCT_USER_PROFILE table on the
remote database. To do this, run PUPBLD.SQL on the server directly. Or,
you can set the LOCAL parameter in your registry to point to the remote
database and then run PUPBLD.SQL.