Skip Headers

SQL*Plus Getting Started
Release 9.2 for Windows

Part Number A92157-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

4
Operating System-Specific References

This chapter provides the operating system-specific information that is referenced in the SQL*Plus User's Guide and Reference.

Specific topics discussed are:

Automatic Login

When connecting to an Oracle database on the same Windows computer, you can set up SQL*Plus to do an automatic login by following these steps:

  1. Create an account in the database <PREFIX>USERX for every Windows user (USERX) who needs access to the database. <PREFIX> is the parameter OS_AUTHENT_PREFIX in the initialization parameter file for the database (the default is OPS$). See the Oracle9i Database Reference and the Oracle Advanced Security Administrator's Guide for more information about the OS_AUTHENT_PREFIX initialization parameter.

  2. After logging on to Windows as USERX, you can log in to SQL*Plus using / (slash) instead of username/password.

See "Shortcuts to Starting SQL*Plus" in Chapter 4 of the SQL*Plus User's Guide and Reference which refers you to this guide for information about automatically logging on to SQL*Plus when you log on to your operating system.

TIMING Command

The SQL*Plus TIMING command displays output in hours, minutes, seconds and hundredths of seconds. For example, 02:31:07.55 is 2 hours, 31 minutes and 7.55 seconds.

See "Collecting Timing Statistics on Commands You Run" in Chapter 9 "Tuning SQL*Plus" and the "SET" and "TIMING" commands in Chapter 13 "Command Reference" of the SQL*Plus User's Guide and Reference which discuss how to use the TIMING command and the SET TIMING command to record timing data for an elapsed period.

Interpreting Error Messages

See "Interpreting Error Messages" in Chapter 5 of the SQL*Plus User's Guide and Reference and this guide for information about interpreting error messages. See the SQL*Plus User's Guide and Reference to find explanations and actions for error messages with SP2- amd CPY- prefixes. See the Oracle9i Database Error Messages to find explanations and actions for error codes with prefixes ORA-, TNS- and PLS-.

If you do not find the error code in Oracle9i Database Error Messages, see Oracle9i Database Administrator's Guide for Windows.

Setting Up Your SQL*Plus Environment

When you install SQL*Plus, LOGIN.SQL is copied to the DBS subdirectory, and GLOGIN.SQL is copied to the SQLPLUS\ADMIN subdirectory of your Oracle home directory.

If you modify LOGIN.SQL or GLOGIN.SQL, make sure you do not add any ANSI escape sequences.

See "SQL*Plus Configuration" in Chapter 3 of the SQL*Plus User's Guide and Reference, which describes the LOGIN.SQL and GLOGIN.SQL files.

Sending Results to a File

When you use the SPOOL command from the graphical user interface or the command-line interface, SQL*Plus adds .LST to the file name if you do not specify an extension.

The SPOOL command is available from the File menu in the SQL*Plus graphical user interface. See "File Menu" for more information.

SQL*Plus does not support the use of the SPOOL OUT clause in the command-line.

See "Sending Results to a File" in Chapter 7 and "SPOOL" in Chapter 13 of the SQL*Plus User's Guide and Reference, for more information about the SPOOL command.

@, @@, and START Commands

SQL*Plus 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. For more information about the SQLPATH parameter, see the "SQLPATH Registry Entry".

See the sections "@ (at sign)", "@@ (double at sign)", and "START" in Chapter 13 of the SQL*Plus User's Guide and Reference, which describe how SQL*Plus searches for a file when you use the @, @@, or START command.

HOST Command

In SQL*Plus command-line and graphical user interfaces, you can access the Windows command prompt by entering the HOST command or a dollar sign ($) at the SQL*Plus prompt.

To return to SQL*Plus from the Windows command prompt, enter EXIT.

See "HOST" in Chapter 13 of the SQL*Plus User's Guide and Reference, which describes how to use the HOST command to execute a host operating system command without leaving SQL*Plus.

SET NEWPAGE Command

The SET NEWPAGE 0 command does not clear the screen between pages. Instead, a black box appears in the GUI, or another character in the command-line interface.

See "SET" in Chapter 13 of the SQL*Plus User's Guide and Reference, which describes how to set the NEWPAGE system variable, as well as many other system variables. It is recommended that you use SET NEWPAGE NONE.

PRODUCT_USER_PROFILE Table

The PRODUCT_USER_PROFILE (PUP) table provides product-level security that supplements the user-level security provided by the SQL GRANT and REVOKE commands and user roles.

To create the PUP table

Log in to SQL*Plus as the SYSTEM user and run PUPBLD.SQL which is located in the ORACLE_HOME\SQLPLUS\ADMIN directory with:

 SQL> @%ORACLE_HOME%\SQLPLUS\ADMIN\PUPBLD.SQL 

or

  1. Set an environment variable, SYSTEM_PASS, to hold the SYSTEM user login with:

    C:\> SET SYSTEM_PASS=SYSTEM/PASSWORD
    

    where PASSWORD is the password you have defined for the SYSTEM user. The default SYSTEM user password is MANAGER.

    PUPBLD.BAT reads this login from SYSTEM_PASS to run successfully.

  2. Run the batch file, PUPBLD.BAT, from a command-line prompt with:

    C:\> %ORACLE_HOME%\BIN\PUPBLD.BAT
    

If you are using SQL*Plus with a remote database, you may want to install the PUP table on the remote database. To do this, run PUPBLD.SQL on the server directly, or set the LOCAL parameter in your registry to point to the remote database and then run PUPBLD.SQL.

See the "PRODUCT_USER_PROFILE Table" in Chapter 10, "SQL*Plus Security" of the SQL*Plus User's Guide and Reference for a description of the PUP table.

The PUP table is not used for ODBC connections. If you are unsure, you can usually identify ODBC connections from the form of the connection identifier. For ODBC connections, the connection identifier begins with odbc: or oca:.


Go to previous page Go to next page
Oracle
Copyright © 1996, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback