SQL*Plus User's Guide and Reference
Release 8.1.5

A66736-01

Library

Product

Contents

Index

Prev Up Next

Command Reference, 41 of 52


SHOW

Purpose

Shows the value of a SQL*Plus system variable or the current SQL*Plus environment.

Syntax

SHO[W]  option

where option represents one of the following terms or clauses:

system_variable
ALL
BTI[TLE]
ERR[ORS] [{FUNCTION|PROCEDURE|PACKAGE|PACKAGE BODY|
   TRIGGER|VIEW|TYPE|TYPE BODY} [schema.]name]
LNO
PARAMETERS [parameter_name]
PNO
REL[EASE]
REPF[OOTER]
REPH[EADER]
SGA
SPOO[L]
SQLCODE
TTI[TLE]
USER

Terms and Clauses

Refer to the following list for a description of each term or clause:

system_variable

      Represents any system variable set by the SET command.

ALL

      Lists the settings of all SHOW options, except ERRORS, in alphabetical order.

BTI[TLE]

      Shows the current BTITLE definition.

ERR[ORS] [{FUNCTION|PROCEDURE|PACKAGE|PACKAGE BODY
|TRIGGER|VIEW|TYPE|TYPE BODY} [schema.]name]

    Shows the compilation errors of a stored procedure (includes stored functions, procedures, and packages). After you use the CREATE command to create a stored procedure, a message is displayed if the stored procedure has any compilation errors. To see the errors, you use SHOW ERRORS.

    When you specify SHOW ERRORS with no arguments, SQL*Plus shows compilation errors for the most recently created or altered stored procedure. When you specify the type (function, procedure, package, package body, trigger, view, type, or type body) and the name of the PL/SQL stored procedure, SQL*Plus shows errors for that stored procedure. For more information on compilation errors, see your PL/SQL User's Guide and Reference.

    schema contains the named object. If you omit schema, SHOW ERRORS assumes the object is located in your current schema.

    SHOW ERRORS output displays the line and column number of the error (LINE/COL) as well as the error itself (ERROR). LINE/COL and ERROR have default widths of 8 and 65, respectively. You can alter these widths using the COLUMN command.

LNO

      Shows the current line number (the position in the current page of the display and/or spooled output).

PARAMETERS [parameter_name]

      Displays the current values for one or more initialization parameters. You can use a string after the command to see a subset of parameters whose names include that string. For example, if you enter:

      SQL> SHOW PARAMETERS COUNT 
      
      

      you would see:

      NAME                             TYPE     VALUE  
      ------------------------------   -----    -----  
      db_file_multiblock_read_count    integer  12
      spin_count                       integer  0
      
      

      The SHOW PARAMETERS command, without any string following the command, displays all initialization parameters.

      Note, your output may vary depending on the version and configuration of the Oracle database server to which you are connected.

PNO

      Shows the current page number.

REL[EASE]

      Shows the release number of Oracle that SQL*Plus is accessing.

REPF[OOTER]

      Shows the current REPFOOTER definition.

REPH[EADER]

      Shows the current REPHEADER definition.

SPOO[L]

      Shows whether output is being spooled.

SGA

      Displays information about the current instance's System Global Area.

SQLCODE

      Shows the value of SQL.SQLCODE (the SQL return code of the most recent operation).

TTI[TLE]

      Shows the current TTITLE definition.

USER

      Shows the username under which you are currently accessing SQL*Plus.

Examples

To list the current LINESIZE, enter

SQL> SHOW LINESIZE

If the current linesize equals 80 characters, SQL*Plus will give the following response:

linesize 80

The following example illustrates how to create a stored procedure and then show its compilation errors:

SQL> connect system/manager
SQL> create procedure scott.proc1 as
SQL> begin
SQL>   :p1 := 1;
SQL> end;
SQL> /
Warning: Procedure created with compilation errors.
SQL> show errors
Errors for PROCEDURE SCOTT.PROC1:
LINE/COL ERROR
--------------------------------------------------------
3/3      PLS-00049: bad bind variable 'P1'
SQL> show errors procedure proc1
No errors.
SQL> show errors procedure scott.proc1
Errors for PROCEDURE SCOTT.PROC1:
LINE/COL ERROR
--------------------------------------------------------
3/3      PLS-00049: bad bind variable 'P1'

To show whether AUTORECOVERY is enabled, enter

SQL> SHOW AUTORECOVERY
autorecovery ON

To display the connect string for the default instance, enter

SQL> SHOW INSTANCE
instance "local"

To display the location for archive logs, enter

SQL> SHOW LOGSOURCE
logsource "/usr/oracle81/dbs/arch"

To display information about the SGA, enter

SQL> SHOW SGA
Total System Global Area    7629732 bytes 
Fixed Size                    60324 bytes 
Variable Size               6627328 bytes 
Database Buffers             409600 bytes 
Redo Buffers                 532480 bytes 

Prev Up Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index