SQL Quickref

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 115

Oracle8 Server

SQL Language Quick Reference


Release 8.0

The Database for


Network Computing 

A Product of
Core Competency Development

Enabling the Information Age

1
Oracle8 Server SQL Language Quick Reference

Copyright  1999 Oracle Corporation. All rights reserved.

Author: Bill Sawyer Date: February 1999


email: wsawyer.us
Group: Oracle Support Services
Core Competency Development

This manual closely follows the format of the Oracle7 Server SQL Language Quick
Reference (Part No. 5421-70-1292, Authored December 1992 and Part No. A12712-01,
Authored August 10, 1993). Eric Armstrong was the original author of the above
mentioned manual.

The manual is for INTERNAL ORACLE DISTRIBUTION ONLY! It is not intended for
customer dissemination. All of the information in this manual, with the exception of the
section on X$ Tables, is derived from the Oracle8 Server manuals.

Specifically, the following manuals were used:


• Oracle8 SQL Reference, Part No. A58225-01
• SQL*Plus Quick Reference, Part No. A53718-01
• PL/SQL User’s Guide and Reference, Part No. A58236-01
• Oracle8 Server Reference, Part No. A58242-01

The discussion of X$ Tables was taken from GSX entries published and available from
WebIV via the URL: http://webiv.us.oracle.com/

The entry numbers for the WebIV entries are: Note.31082.1 and Note.22241.1.

The manual is published under an “Open Availability” standard within Oracle. What
does that mean? Well, the original references published in 1992/93 are highly valued and
used within Oracle Support Services. To the best of my knowledge, this manual
represents the first successful attempt to update the original manuals since 1993.
Obviously, this should not have been allowed to happen. As a result, I intend to do my
best to keep this manual updated. People who would like to help are welcome to do so.
They can contact me via email, and I will gladly send them the softcopy for update.

The Adobe Acrobat version of this file will be available at:


http://apps02.us.oracle.com/people/wsawyer/sql_qref.pdf

The Adobe Acrobat Reader is available for a Windows platforms at:


ftp://pcsupport.us.oracle.com/acrobat/3.01/

Other Adobe Acrobat Readers are available from Adobe at: http://www.adobe.com/

2
SQL Language Quick Reference
This Reference briefly describes elements of SQL and the Oracle8 data dictionary. For details on SQL, refer to the Oracle8 SQL
Reference, Part No. A58225 or via the Oracle web at:
http://st-doc.us.oracle.com/8.0/804/server.804/a58225.pdf

For details on the data dictionary, refer to the Oracle8 Reference, Part No. A58242, or via the Oracle web at: http://st-
doc.us.oracle.com/8.0/804/server.804/a58242.pdf

Other documentation on the Oracle7 and Oracle8 database is available via the Oracle web at:
http://st-doc.us.oracle.com/

Index of Major Sections


PARAMETERS ..................................................................................................................................................................................... 4
EXAMPLE DATA ................................................................................................................................................................................. 4
FUNCTIONS.......................................................................................................................................................................................... 6
PSEUDOCOLUMNS........................................................................................................................................................................... 12
INTERNAL DATATYPE SUMMARY.............................................................................................................................................. 12
HINTS................................................................................................................................................................................................... 12
SCHEMA OBJECTS........................................................................................................................................................................... 14
OPERATORS ...................................................................................................................................................................................... 15
SQL RESERVED WORDS................................................................................................................................................................. 17
SQL KEY WORDS.............................................................................................................................................................................. 17
PL/SQL RESERVED WORDS........................................................................................................................................................... 19
DATA DEFINITION LANGUAGE COMMANDS .......................................................................................................................... 20
DATA MANIPULATION LANGUAGE COMMANDS .................................................................................................................. 21
TRANSACTION CONTROL COMMANDS.................................................................................................................................... 22
SESSION CONTROL COMMANDS ................................................................................................................................................ 22
SYSTEM CONTROL COMMANDS................................................................................................................................................. 22
SQL COMMANDS .............................................................................................................................................................................. 23
SQL*PLUS QUICK REFERENCE ................................................................................................................................................... 85
DATABASE INITIALIZATION PARAMETERS ........................................................................................................................... 91
DATA DICTIONARY VIEWS........................................................................................................................................................... 97
DYNAMIC PERFORMANCE TABLES......................................................................................................................................... 105
DATABASE SQL SCRIPTS............................................................................................................................................................. 111
X$ TABLES........................................................................................................................................................................................ 113

3
Parameters

Parameters act as placeholders in syntax diagrams. They appear in lowercase. Parameters are usually names of database objects,
Oracle datatype names, or expressions. When you see a parameter in a syntax diagram, substitute an object or expression of the
appropriate type in your SQL statement. For example, to write a CREATE TABLE statement, use the name of the table you want to
create, such as EMP, in place of the table parameter in the syntax diagram. (Note that parameter names appear in italics in the text.)

This lists shows parameters that appear in the syntax diagrams and provides examples of the values you might substitute for them in
your statements:

table The substitution value must be the name of an object of the type specified by the parameter. For a list of all
types of objects, see the section, “Schema Objects”.
c The substitution value must be a single character from your database character set.
’text’ The substitution value must be a text string in single quotes. See the syntax description of 'text' in “Text”.
char The substitution value must be an expression of datatype CHAR or VARCHAR2 or a character literal in
single quotes.
condition The substitution value must be a condition that evaluates to TRUE or FALSE. See the syntax description of
condition in “Condition”.
date The substitution value must be a date constant or an expression of DATE datatype.
d
expr The substitution value can be an expression of any datatype as defined in the syntax description of expr in
“Expressions”.
integer The substitution value must be an integer as defined by the syntax description of integer in “Integer”.
label The substitution value must be an expression of datatype MLSLABEL. For information on such expressions,
see your Trusted Oracle documentation.
Number The substitution value must be an expression of NUMBER datatype or a number constant as defined in the
m syntax description of number in “Number”.
n
raw The substitution value must be an expression of datatype RAW.
rowid The substitution value must be an expression of datatype ROWID.
subquery The substitution value must be a SELECT statement that will be used in another SQL statement. See
“Subqueries”.
:host_variable The substitution value must be the name of a variable declared in an embedded SQL program. This reference
also uses :host_integer and :d to indicate specific datatypes.
cursor The substitution value must be the name of a cursor in an embedded SQL program.
db_name The substitution value must be the name of a nondefault database in an embedded SQL program.
db_string The substitution value must be the database identification string for a Net8 database connection. For details,
see the user's guide for your specific Net8 protocol.
statement_name The substitution value must be an identifier for a SQL statement or PL/SQL block.
block_name

Example Data

Many of the examples in this reference operate on sample tables. The definitions of some of these tables appear in a SQL script
available on your distribution medium. On most operating systems the name of this script is UTLSAMPL.SQL, although its exact
name and location depend on your operating system. This script creates sample users and creates these sample tables in the schema of
the user SCOTT:

CREATE TABLE dept


(deptno NUMBER(2) CONSTRAINT pk_dept PRIMARY KEY,
dname VARCHAR2(14),
loc VARCHAR2(13) );
CREATE TABLE emp
(empno NUMBER(4) CONSTRAINT pk_emp PRIMARY KEY,
ename VARCHAR2(10),
job VARCHAR2(9),
mgr NUMBER(4),
hiredate DATE,
sal NUMBER(7,2),
comm NUMBER(7,2),
deptno NUMBER(2) CONSTRAINT fk_deptno REFERENCES dept );
CREATE TABLE bonus
(ename VARCHAR2(10),
job VARCHAR2(9),
sal NUMBER,
comm NUMBER );

4
CREATE TABLE salgrade
(grade NUMBER,
losal NUMBER,
hisal NUMBER );

The script also fills the sample tables with this data:

SELECT * FROM dept

DEPTNO DNAME LOC


------- ---------- ---------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON

SELECT * FROM emp

EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO


----- ------- --------- ------ --------- ------ ------ -------
7369 SMITH CLERK 7902 17-DEC-80 800 20
7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7782 CLARK MANAGER 7839 09-JUN-81 2450 10
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7839 KING PRESIDENT 17-NOV-81 5000 10
7844 TURNER SALESMAN 7698 08-SEP-81 1500 30
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7934 MILLER CLERK 7782 23-JAN-82 1300 10

SELECT * FROM salgrade

GRADE LOSAL HISAL


----- ----- -----
1 700 1200
2 1201 1400
3 1401 2000
4 2001 3000
5 3001 9999

To perform all the operations of the script, run it when you are logged into Oracle as the user SYSTEM.

5
Functions

Single-Row Numeric Functions

ABS Returns the absolute value of n.


ACOS Returns the arc cosine of n. Inputs are in the range of -1 to 1, and outputs are in the range of 0 to ∏and are expressed
in radians.
ASIN Returns the arc sine of n. Inputs are in the range of -1 to 1, and outputs are in the range of -∏/2 to ∏/2 and are
expressed in radians.
ATAN Returns the arc tangent of n. Inputs are in an unbounded range, and outputs are in the range of -∏/2 to ∏/2 and are
expressed in radians.
ATAN2 Returns the arc tangent of n and m. Inputs are in an unbounded range, and outputs are in the range of -∏ to ∏,
depending on the signs of n and m, and are expressed in radians. Atan2(n,m) is the same as atan2(n/m).
CEIL Returns smallest integer greater than or equal to n.
COS Returns the cosine of n (an angle expressed in radians).
COSH Returns the hyperbolic cosine of n.
EXP Returns e raised to the nth power; e = 2.71828183
FLOOR Returns largest integer equal to or less than n.
LN Returns the natural logarithm of n, where n is greater than 0.
LOG Returns the logarithm, base m, of n. The base m can be any positive number other than 0 or 1 and n can be any
positive number.
MOD Returns remainder of m divided by n. Returns m if n is 0.
POWER Returns m raised to the nth power. The base m and the exponent n can be any numbers, but if m is negative, n must
be an integer.
ROUND Returns n rounded to m places right of the decimal point; if m is omitted, to 0 places. m can be negative to round off
digits left of the decimal point. m must be an integer.
SIGN If n<0, the function returns -1; if n=0, the function returns 0; if n>0, the function returns 1.
SIN Returns the sine of n (an angle expressed in radians).
SINH Returns the hyperbolic sine of n.
SQRT Returns square root of n. The value n cannot be negative. SQRT returns a "real" result.
TAN Returns the tangent of n (an angle expressed in radians).
TANH Returns the hyperbolic tangent of n.
TRUNC Returns n truncated to m decimal places; if m is omitted, to 0 places. M can be negative to truncate (make zero) m
digits left of the decimal point.

Number Format Models

Element Description
9 Return value with the specified number of digits with a leading space if positive. Return value with the specified
number of digits with a leading minus if negative. Leading zeros are blank, except for a zero value, which returns a
zero for the integer part of the fixed-point number.
0 Return leading zeros. Return trailing zeros.
$ Return value with a leading dollar sign.
B Return blanks for the integer part of a fixed-point number when the integer part is zero (regardless of "0’s in the
format model).
MI Return negative value with a trailing minus sign "-". Return positive value with a trailing blank.
S Return negative value with a leading minus sign "-". Return positive value with a leading plus sign "+". Return
negative value with a trailing minus sign "-". Return positive value with a trailing plus sign "+".
PR Return negative value in <angle brackets>. Return positive value with a leading and trailing blank.
D Return a decimal character (that is, a period ".") in the specified position.
G Return a group separator in the position specified.
C Return the ISO currency symbol in the specified position.
L Return the local currency symbol in the specified position.
, (comma) Return a comma in the specified position.
. (period) Return a decimal point (that is, a period ".") in the specified position.
V Return a value multiplied by 10n (and if necessary, round it up), where n is the number of 9’s after the "V".
EEEE Return a value using in scientific notation.
RN Return a value as Roman numerals in uppercase. Return a value as Roman numerals in lowercase. Value can be an
rn integer between 1 and 3999.
FM Return a value with no leading or trailing blanks.

6
Single-Row Character Functions Returning Character Values

CHR Returns the character having the binary equivalent to n in either the database character set or the national
character set. If the USING NCHAR_CS clause is not specified, this function returns the character having the
binary equivalent to n as a VARCHAR2 value in the database character set. If the USING NCHAR_CS clause
is specified, this function returns the character having the binary equivalent to n as a NVARCHAR2 value in
the national character set.
CONCAT Returns char1 concatenated with char2. This function is equivalent to the concatenation operator (||). For
information on this operator, see “Concatenation Operator”.
INITCAP Returns char, with the first letter of each word in uppercase, all other letters in lowercase. Words are delimited
by white space or characters that are not alphanumeric.
LOWER Returns char, with all letters lowercase. The return value has the same datatype as the argument char (CHAR or
VARCHAR2).
LPAD Returns char1, left-padded to length n with the sequence of characters in char2; char2 defaults to a single
blank. If char1 is longer than n, this function returns the portion of char1 that fits in n. The argument n is the
total length of the return value as it is displayed on your terminal screen. In most character sets, this is also the
number of characters in the return value. However, in some multibyte character sets, the display length of a
character string can differ from the number of characters in the string.
LTRIM Removes characters from the left of char, with all the leftmost characters that appear in set removed; set
defaults to a single blank. Oracle begins scanning char from its first character and removes all characters that
appear in set until reaching a character not in set and then returns the result.
NLS_INITCAP Returns char, with the first letter of each word in uppercase, all other letters in lowercase. Words are delimited
by white space or characters that are not alphanumeric. The value of 'nlsparams' can have this form:
'NLS_SORT = sort'where sort is either a linguistic sort sequence or BINARY. The linguistic sort sequence
handles special linguistic requirements for case conversions. Note that these requirements can result in a return
value of a different length than the char. If you omit 'nlsparams', this function uses the default sort sequence for
your session. For information on sort sequences, see Oracle8 Reference.
NLS_LOWER Returns char, with all letters lowercase. The 'nlsparams' can have the same form and serve the same purpose as
in the NLS_INITCAP function.
NLS_UPPER Returns char, with all letters uppercase. The 'nlsparams' can have the same form and serve the same purpose as
in the NLS_INITCAP function.
REPLACE Returns char with every occurrence of search_string replaced with replacement_string. If replacement_string is
omitted or null, all occurrences of search_string are removed. If search_string is null, char is returned. This
function provides a superset of the functionality provided by the TRANSLATE function. TRANSLATE
provides single-character, one-to-one substitution. REPLACE allows you to substitute one string for another as
well as to remove character strings.
RPAD Returns char1, right-padded to length n with char2, replicated as many times as necessary; char2 defaults to a
single blank. If char1 is longer than n, this function returns the portion of char1 that fits in n. The argument n
is the total length of the return value as it is displayed on your terminal screen. In most character sets, this is
also the number of characters in the return value. However, in some multibyte character sets, the display length
of a character string can differ from the number of characters in the string.
RTRIM Returns char, with all the rightmost characters that appear in set removed; set defaults to a single blank.
RTRIM works similarly to LTRIM.
SOUNDEX Returns a character string containing the phonetic representation of char. This function allows you to compare
words that are spelled differently, but sound alike in English.
SUBSTR Returns a portion of char, beginning at character m, n characters long. If m is 0, it is treated as 1. If m is
positive, Oracle counts from the beginning of char to find the first character. If m is negative, Oracle counts
backwards from the end of char. If n is omitted, Oracle returns all characters to the end of char. If n is less than
1, a null is returned. Floating-point numbers passed as arguments to substr are automatically converted to
integers.
SUBSTRB The same as SUBSTR, except that the arguments m and n are expressed in bytes, rather than in characters. For
a single-byte database character set, SUBSTRB is equivalent to SUBSTR. Floating-point numbers passed as
arguments to substrb are automatically converted to integers.
TRANSLATE Returns char with all occurrences of each character in from replaced by its corresponding character in to.
Characters in char that are not in from are not replaced. The argument from can contain more characters than
to. In this case, the extra characters at the end of from have no corresponding characters in to. If these extra
characters appear in char, they are removed from the return value. You cannot use an empty string for to to
remove all characters in from from the return value. Oracle interprets the empty string as null, and if this
function has a null argument, it returns null.
UPPER Returns char, with all letters uppercase. The return value has the same datatype as the argument char.

7
Single-Row Character Functions Returning Numeric Values
ASCII Returns the decimal representation in the database character set of the first character of char. If your database
character set is 7-bit ASCII, this function returns an ASCII value. If your database character set is EBCDIC
Code Page 500, this function returns an EBCDIC value. Note that there is no similar EBCDIC character
function.
INSTR Searches char1 beginning with its nth character for the mth occurrence of char2 and returns the position of the
character in char1 that is the first character of this occurrence. If n is negative, Oracle counts and searches
backward from the end of char1. The value of m must be positive. The default values of both n and m are 1,
meaning Oracle begins searching at the first character of char1 for the first occurrence of char2. The return
value is relative to the beginning of char1, regardless of the value of n, and is expressed in characters. If the
search is unsuccessful (if char2 does not appear m times after the nth character of char1) the return value is 0.
INSTRB The same as INSTR, except that n and the return value are expressed in bytes, rather than in characters. For a
single-byte database character set, INSTRB is equivalent to INSTR.
LENGTH Returns the length of char in characters. If char has datatype CHAR, the length includes all trailing blanks. If
char is null, this function returns null.
LENGTHB Returns the length of char in bytes. If char is null, this function returns null. For a single-byte database
character set, LENGTHB is equivalent to LENGTH.
NLSSORT Returns the string of bytes used to sort char. The value of ’nlsparams’ can have the form

Date Functions
ADD_MONTHS(d,n) Returns the date d plus n months. The argument n can be any integer. If d is the last day of the month or
if the resulting month has fewer days than the day component of d, then the result is the last day of the
resulting month. Otherwise, the result has the same day component as d.
LAST_DAY Returns the date of the last day of the month that contains d. You might use this function to determine
how many days are left in the current month.
MONTHS_BETWEEN Returns number of months between dates d1 and d2. If d1 is later than d2, result is positive; if earlier,
negative. If d1 and d2 are either the same days of the month or both last days of months, the result is
always an integer; otherwise Oracle calculates the fractional portion of the result based on a 31-day
month and considers the difference in time components of d1 and d2.
NEW_TIME Returns the date and time in time zone z2 when date and time in time zone z1 are d. The arguments z1
and z2 can be any of these text strings:
ROUND Returns the date and time in time zone z2 when date and time in time zone z1 are d. The arguments z1
and z2 can be any of these text strings:
SYSDATE Returns the current date and time. Requires no arguments. In distributed SQL statements, this function
returns the date and time on your local database. You cannot use this function in the condition of a
CHECK constraint.
TRUNC Returns d with the time portion of the day truncated to the unit specified by the format model fmt. If you
omit fmt, d is truncated to the nearest day. See "ROUND and TRUNC" for the permitted format models
to use in fmt.

Date Format Models


Element Meaning
-
/
,
. Punctuation and quoted text is reproduced in the result.
;
:
’text’
AD
A.D. AD indicator with or without periods.
AM
A.M. Meridian indicator with or without periods.
BC
B.C. BC indicator with or without periods.
CC One greater than the first two digits of a four-digit year; "S" prefixes BC dates with "-". For example,
SCC ’20’ from ’1900’.
D Day of week (1-7).
DAY Name of day, padded with blanks to length of 9 characters.
DD Day of month (1-31)
DDD Day of year (1-366)
DY Abbreviated name of day
E Abbreviated era name (Japanese Imperial, ROC Official, and Thai Buddha calendars).
EE Full era name (Japanese Imperial, ROC Official, and Thai Buddha calendars).
HH Hour of day (1-12)

8
The RR Date Format Element
If the specified 2-digit year is
0-49 50-99
If the last two digits 0-49 The return date is The return date is
of the current year in the current in the preceding
are: century. century.
50-99 The return date is The return date is
in the next century. in the current
century.

Date Format Element Suffixes


Suffix Meaning Example Element Example Value
TH Ordinal Number DDTH 4TH
SP Spelled Number DDSP FOUR
SPTH or THSP Spelled, ordinal number DDSPTH FOURTH

Date Format Models for the ROUND and TRUNC Date Functions
CC
SCC One greater than the first two digits of a four-digit year.
SYYYY
YYYY
YEAR
SYEAR Year (rounds up on July 1)
YYY
YY
Y
IYYY
IY ISO Year
IY
I
Q Quarter (rounds up on the 16th day of the 2nd month of the quarter)
MONTH
MON Month (rounds up on the sixteenth day)
MM
RM
WW Same day of the week as the first day of the year.
IW Same day of the week as the first day of the ISO year.
W Same day of the week as the first day of the month
DDD
DD Day
J
DAY
DY Starting day of the week
D
HH
HH12 Hour
HH24
MI Minute

Conversion Functions
CHARTOROWID Converts a value from CHAR or VARCHAR2 datatype to ROWID datatype.
CONVERT Converts a character string from one character set to another. The char argument is the value to be
converted. The dest_char_set argument is the name of the character set to which char is
converted. The source_char_set argument is the name of the character set in which char is stored
in the database. The default value is the database character set.
HEXTORAW Converts char containing hexadecimal digits to a raw value.
RAWTOHEX Converts raw to a character value containing its hexadecimal equivalent.
ROWIDTOCHAR Converts a ROWID value to VARCHAR2 datatype. The result of this conversion is always 18
characters long.
TO_CHAR Converts d of DATE datatype to a value of VARCHAR2 datatype in the format specified by the
( date conversion) date format fmt. If you omit fmt, d is converted to a VARCHAR2 value in the default date format.
For information on date formats, see “Format Models”.
TO_CHAR Converts n of NUMBER datatype to a value of VARCHAR2 datatype, using the optional number
( number conversion) format fmt. If you omit fmt, n is converted to a VARCHAR2 value exactly long enough to hold its
significant digits. For information on number formats, see “Format Models”.

9
TO_DATE Converts char of CHAR or VARCHAR2 datatype to a value of DATE datatype. The fmt is a date
format specifying the format of char. If you omit fmt, char must be in the default date format. If
fmt is ’J’, for Julian, thenchar must be an integer. For information on date formats, see “Format
Models”. The ’nlsparams’ has the same purpose in this function as in the TO_CHAR function for
date conversion. Do not use the TO_DATE function with a DATE value for the char argument.
The returned DATE value can have a different century value than the original char, depending on
fmt or the default date format. For information on date formats, see “Date Format Models”.
TO_MULTI_BYTE Returns char with all of its single-byte characters converted to their corresponding multibyte
characters. Any single-byte characters in char that have no multibyte equivalents appear in the
output string as single-byte characters. This function is only useful if your database character set
contains both single-byte and multibyte characters.
TO_NUMBER Converts char, a value of CHAR or VARCHAR2 datatype containing a number in the format
specified by the optional format model fmt, to a value of NUMBER datatype.
TO_SINGLE_BYTE Returns char with all of its multibyte character converted to their corresponding single-byte
characters. Any multibyte characters in char that have no single-byte equivalents appear in the
output as multibyte characters. This function is only useful if your database character set contains
both single-byte and multibyte characters.
TRANSLATE USING Converts text into the character set specified for conversions between the database character set
and the national character set. The text argument is the expression to be converted. Specifying the
USING CHAR_CS argument converts text into the database character set. The output datatype is
VARCHAR2. Specifying the USING NCHAR_CS argument converts text into the national
character set. The output datatype is NVARCHAR2. This function is similar to the Oracle
CONVERT function, but must be used instead of CONVERT if either the input or the output
datatype is being used as NCHAR or NVARCHAR2.

SQL Functions for Datatype Conversion


TO: CHAR NUMBER DATE RAW ROWID
FROM:
CHAR - TO_NUMBER TO_DATE HEXTORAW CHARTOROWID

NUMBER TO_CHAR - TO_DATE


(number,'J')
DATE TO_CHAR TO_CHAR (date,'J') -

RAW RAWTOHEX -

ROWID ROWIDTOCHAR -

Other Single-Row Functions


DUMP Returns a VARCHAR2 value containing the datatype code, length in bytes, and internal
representation of expr. The returned result is always in the database character set. For the
datatype corresponding to each code, see the Table. The argument return_format
specifies the format of the return value and can have any of the values listed below. By
default, the return value contains no character set information. To retrieve the character
set name of expr, specify any of the format values below, plus 1000. For example, a
return_format of 1008 returns the result in octal, plus provides the character set name of
expr.
EMPTY_[B | C]LOB Returns an empty LOB locator that can be used to initialize a LOB variable or in an
INSERT or UPDATE statement to initialize a LOB column or attribute to EMPTY.
EMPTY means that the LOB is initialized, but not populated with data. You cannot use
the locator returned from this function as a parameter to the DBMS_LOB package or the
OCI.
BFILENAME Returns a BFILE locator that is associated with a physical LOB binary file on the server's
file system. A directory is an alias for a full pathname on the server's file system where
the files are actually located; 'filename' is the name of the file in the server's file system.
Neither 'directory' nor 'filename' need to point to an existing object on the file system at
the time you specify BFILENAME. However, you must associate a BFILE value with a
physical file before performing subsequent SQL, PL/SQL, DBMS_LOB package, or OCI
operations. For more information, see CREATE DIRECTORY.
GREATEST Returns the greatest of the list of exprs. All exprs after the first are implicitly converted
to the datatype of the first exprs before the comparison. Oracle compares the exprs using
nonpadded comparison semantics. Character comparison is based on the value of the
character in the database character set. One character is greater than another if it has a
higher value. If the value returned by this function is character data, its datatype is
always VARCHAR2.

10
LEAST Returns the least of the list of exprs. All exprs after the first are implicitly converted to
the datatype of the first expr before the comparison. Oracle compares the exprs using
nonpadded comparison semantics. If the value returned by this function is character
data, its datatype is always VARCHAR2.
NLS_CHARSET_DECL_LEN Returns the declaration width (in number of characters) of an NCHAR column. The
bytecnt argument is the width of the column. The csid argument is the character set ID of
the column. NLS_CHARSET_ID. Returns the NLS character set ID number
corresponding to NLS character set name, text. The text argument is a run-time
VARCHAR2 value. The text value ’CHAR_CS’ returns the server’s database character
set ID number. The text value ’NCHAR_CS’ returns the server’s national character set ID
number. Invalid character set names return null. For a list of character set names, see
Oracle8 Reference.
NLS_CHARSET_NAME Returns the name of the NLS character set corresponding to ID number n. The character
set name is returned as a VARCHAR2 value in the database character set. If n is not
recognized as a valid character set ID, this function returns null. For a list of character
set IDs, see Oracle8 Reference.

NVL If expr1 is null, returns expr2; if expr1 is not null, returns expr1. The arguments expr1
and expr2 can have any datatype. If their datatypes are different, Oracle converts expr2
to the datatype of expr1 before comparing them. The datatype of the return value is
always the same as the datatype of expr1, unless expr1 is character data, in which case
the return value’s datatype is VARCHAR2.

UID Returns an integer that uniquely identifies the current user.


USER Returns the current Oracle user with the datatype VARCHAR2. Oracle compares values
of this function with blank-padded comparison semantics. In a distributed SQL
statement, the UID and USER functions identify the user on your local database. You
cannot use these functions in the condition of a CHECK constraint.
USERENV Returns information of VARCHAR2 datatype about the current session. This
information can be useful for writing an application-specific audit trail table or for
determining the language-specific characters currently used by your session. You cannot
use USERENV in the condition of a CHECK constraint. The argument option can have
any of these values: ISDBA, LANGUAGE, TERMINAL, SESSIONID, ENTRYID,
LANG, or INSTANCE.
VSIZE Returns the number of bytes in the internal representation of expr. If expr is null, this
function returns null.

Object Reference Functions


DEREF Returns the object reference of argument e. Argument e must be an expression that returns a REF to
an object.
REFTOHEX Converts argument r to a character value containing its hexadecimal equivalent.
MAKE_REF Creates a REF to a row of an object view using key as the primary key. For more information about
object views, see Oracle8 Application Developer’s Guide.

Group Functions
AVG Returns average value of n.
COUNT Returns the number of rows in the query. If you specify expr, this function returns rows where expr
is not null. You can count either all rows, or only distinct values of expr. If you specify the asterisk
(*), this function returns all rows, including duplicates and nulls.
MAX Returns maximum value of expr.
MIN Returns minimum value of expr.
STDDEV Returns standard deviation of x, a number. Oracle calculates the standard deviation as the square root
of the variance defined for the VARIANCE group function.
SUM Returns sum of values of n.
VARIANCE Returns variance of x, a number.

11
Pseudocolumns
A pseudocolumn behaves like a table column, but is not actually stored in the table. You can select from pseudocolumns, but you
cannot insert, update, or delete their values. This section describes these pseudocolumns:
• CURRVAL and NEXTVAL
• LEVEL
• ROWID
• ROWNUM

Internal Datatype Summary


Internal Datatype Description
VARCHAR2(size) Variable-length character string having maximum length size bytes. Maximum size is 4000, and
minimum is 1. You must specify size for a VARCHAR2.
NVARCHAR2(size) Variable-length character string having maximum length size characters or bytes, depending on the
choice of national character set. Maximum size is determined by the number of bytes required to
store each character, with an upper limit of 4000 bytes. You must specify size for NVARCHAR2.
NUMBER(p,s) Number having precision p and scale s. The precision p can range from 1 to 38. The scale s can
range from -84 to 127.
LONG Character data of variable length up to 2 gigabytes, or 2 31 -1 bytes.
DATE Valid date range from January 1, 4712 BC to December 31, 4712 AD.
RAW(size) Raw binary data of length size bytes. Maximum size is 2000 bytes. You must specify size for a
RAW value.
LONG RAW Raw binary data of variable length up to 2 gigabytes.
ROWID Hexadecimal string representing the unique address of a row in its table. This datatype is primarily
for values returned by the ROWID pseudocolumn.
CHAR(size) Fixed length character data of length size bytes. Maximum size is 2000 bytes. Default and minimum
size is 1 byte.
NCHAR(size) Fixed-length character data of length size characters or bytes, depending on the choice of national
character set. Maximum size is determined by the number of bytes required to store each character,
with an upper limit of 2000 bytes. Default and minimum size is 1 character or 1 byte, depending on
the character set.
MLSLABEL Binary format of an operating system label. This datatype is used for backward compatibility with
Trusted Oracle.
CLOB A character large object containing single-byte characters. Variable-width character sets are not
supported. Maximum size is 4 gigabytes.
NCLOB A character large object containing fixed-width multibyte characters. Variable-width character sets
are not supported. Maximum size is 4 gigabytes. Stores national character set data.

Hints
Hint Syntax Description
Optimization Approaches and Goals
/*+ ALL_ROWS */ explicitly chooses the cost-based approach to optimize a statement
block with a goal of best throughput (that is, minimum total resource
consumption)
/*+ CHOOSE */ causes the optimizer to choose between the rule-based approach and
the cost-based approach for a SQL statement based on the presence
of statistics for the tables accessed by the statement
/*+ FIRST_ROWS */ explicitly chooses the cost-based approach to optimize a statement
block with a goal of best response time (minimum resource usage to
return first row)
/*+ RULE */ explicitly chooses rule-based optimization for a statement block
Access Methods
/*+ AND_EQUAL(table index) */ explicitly chooses an execution plan that uses an access path that
merges the scans on several single-column indexes
/*+ CLUSTER(table) */ explicitly chooses a cluster scan to access the table
/*+ FULL(table) */ explicitly chooses a full table scan for the table
/*+ HASH(table) */ explicitly chooses a hash scan to access the table
/*+ HASH_AJ(table) */ transforms a NOT IN subquery into a hash antijoin to access the
specified table
/*+ HASH_SJ (table) */ transforms a NOT IN subquery into a hash anti-join to access the
specified table
/*+ INDEX(table index) */ explicitly chooses an index scan for the specified table

12
/*+ INDEX_ASC(table index) */ explicitly chooses an ascending-range index scan for the specified
table
/*+ INDEX_COMBINE(table index) */ If no indexes are given as arguments for the INDEX_COMBINE
hint, the optimizer uses whatever Boolean combination of bitmap
indexes has the best cost estimate. If particular indexes are given as
arguments, the optimizer tries to use some Boolean combination of
those particular bitmap indexes.
/*+ INDEX_DESC(table index) */ explicitly chooses a descending-range index scan for the specified
table
/*+ INDEX_FFS(table index) */ causes a fast full index scan to be performed rather than a full table
scan
/*+ MERGE_AJ (table) */ transforms a NOT IN subquery into a merge anti-join to access the
specified table
/*+ MERGE_SJ (table) */ transforms a correlated EXISTS subquery into a merge semi-join to
access the specified table
/*+ ROWID(table) */ explicitly chooses a table scan by ROWID for the specified table
/*+ USE_CONCAT */ forces combined OR conditions in the WHERE clause of a query to
be transformed into a compound query using the UNION ALL set
operator
Join Orders
/*+ ORDERED */ causes Oracle to join tables in the order in which they appear in the
FROM clause
/*+ STAR */ forces the large table to be joined last using a nested-loops join on
the index
Join Operations
/*+ DRIVING_SITE (table) */ forces query execution to be done at a different site from that
selected by Oracle
/*+ USE_HASH (table) */ causes Oracle to join each specified table with another row source
with a hash join
/*+ USE_MERGE (table) */ causes Oracle to join each specified table with another row source
with a sort-merge join
/*+ USE_NL (table) */ causes Oracle to join each specified table to another row source with
a nested-loops join using the specified table as the inner table
Parallel Execution
/*+ APPEND */ specifies that data is simply appended (or not) to a table; existing free
/*+ NOAPPEND */ space is not used. Use these hints only following the INSERT
keyword.
/*+ NOPARALLEL(table) */ disables parallel scanning of a table, even if the table was created
with a PARALLEL clause
/*+ PARALLEL(table, instances) */ allows you to specify the desired number of concurrent slave
processes that can be used for the operation.
DELETE, INSERT, and UPDATE operations are considered for
parallelization only if the session is in a PARALLEL DML enabled
mode. (Use ALTER SESSION PARALLEL DML to enter this
mode.)
/*+ PARALLEL_INDEX allows you to parallelize fast full index scan for partitioned and
nonpartitioned indexes that have the PARALLEL attribute
/*+ NOPARALLEL_INDEX */ overrides a PARALLEL attribute setting on an index
Other Hints
/*+ CACHE */ specifies that the blocks retrieved for the table in the hint are placed
at the most recently used end of the LRU list in the buffer cache
when a full table scan is performed
/*+ NOCACHE */ specifies that the blocks retrieved for this table are placed at the least
recently used end of the LRU list in the buffer cache when a full
table scan is performed
/*+ MERGE (table) */ causes Oracle to evaluate complex views or subqueries before the
surrounding query
/*+ NO_MERGE (table) */ causes Oracle not to merge mergeable views
/*+ PUSH_JOIN_PRED (table) */ causes the optimizer to evaluate, on a cost basis, whether or not to
push individual join predicates into the view
/*+ NO_PUSH_JOIN_PRED (table) */ Prevents pushing of a join predicate into the view
/*+ PUSH_SUBQ */ causes nonmerged subqueries to be evaluated at the earliest possible
place in the execution plan
/*+ STAR_TRANSFORMATION */ makes the optimizer use the best plan in which the transformation
has been used.

13
Schema Objects

A schema is a collection of logical structures of data, or schema objects. A schema is owned by a database user and has the same
name as that user. Each user owns a single schema. Schema objects can be created and manipulated with SQL and include the
following types of objects:
• clusters
• database links
• database triggers
• external procedure libraries
• index-only tables
• indexes
• packages
• sequences
• stored functions
• stored procedures
• synonyms
• tables
• views

In addition, the following schema objects are available if you are using Oracle’s distributed functionality:
• snapshots
• snapshot logs

In addition, the following schema objects are available if the objects option is installed on your database server:
• object tables
• object types
• object views

Nonschema Objects
Other types of objects are also stored in the database and can be created and manipulated with SQL but are not contained in a
schema:
• directories
• profiles
• roles
• rollback segments
• tablespaces
• users

Parts of Schema Objects


Some schema objects are made up of parts that you must name, such as:
• columns in a table or view
• index and table partitions
• integrity constraints on a table
• packaged procedures, packaged stored functions, and other objects stored within a package

Namespaces for Schema Objects

14
Namespaces for Nonschema Objects

The following diagram shows the general syntax for referring to an object or a part:

where:

object is the name of the object.


schema is the schema containing the object. The schema qualifier allows you to refer to an object in a schema other than
your own. Note that you must be granted privileges to refer to objects in other schemas. If you omit schema,
Oracle assumes that you are referring to an object in your own schema.
Only schema objects can be qualified with schema. Schema objects are shown in the Figure. Nonschema
objects, shown in the Figure, cannot be qualified with schema because they are not schema objects. (An
exception is public synonyms, which can optionally be qualified with "PUBLIC". The quotation marks are
required.)
part is a part of the object. This identifier allows you to refer to a part of a schema object, such as a column or a
partition of a table. Note that not all types of objects have parts.
dblink applies only when you are using Oracle’s distributed functionality. This is the name of the database containing
the object. The dblink qualifier allows you to refer to an object in a database other than your local database. If
you omit dblink, Oracle assumes that you are referring to an object in your local database. Note that not all SQL
statements allow you to access objects on remote databases.

Operators

Operator Precedence

Operator Operation
+, - identity, negation
*, / multiplication, division
+, -, || addition, subtraction, concatenation
=, !=, <, >, <=, >=, IS NULL, LIKE, comparison
BETWEEN, IN
NOT exponentiation, logical negation
AND conjunction
OR disjunction

Arithmetic Operators

Operator Purpose
+ - Denotes a positive or negative expression. These are unary operators.
* / Multiplies, divides. These are binary operators.
+ - Adds, subtracts. These are binary operators.

Concatenation Operator

Operator Purpose
|| Concatenates character strings.

15
Comparison Operators

Operator Purpose
= Equality test.
!= ^= <> ¬= Inequality test. Some forms of the inequality operator may be unavailable on some platforms.
> "Greater than" and "less than" tests.
<
>= "Greater than or equal to" and "less than or equal to" tests.
<=
IN "Equal to any member of" test. Equivalent to "= ANY".
NOT IN Equivalent to "!=ALL". Evaluates to FALSE if any member of the set is NULL.
ANY SOME Compares a value to each value in a list or returned by a query. Must be preceded by =, !=, >, <, <=,
>=. Evaluates to FALSE if the query returns no rows.
ALL Compares a value to every value in a list or returned by a query. Must be preceded by =, !=, >, <, <=,
>=. Evaluates to TRUE if the query returns no rows.
[NOT] BETWEEN [Not] greater than or equal to x and less than or equal to y.
x AND y
[NOT] BETWEEN [Not] greater than or equal to x and less than or equal to y.
x AND y
EXISTS TRUE if a subquery returns at least one row.
x [NOT] LIKE y TRUE if x does [not] match the pattern y. Within y, the character "%" matches any string of zero or
more characters except null. The character "_" matches any single character. Any character, excepting
percent (%) and underbar (_) may follow ESCAPE; a wildcard character is treated as a literal if
[ESCAPE 'z']
preceded by the character designated as the escape character.

IS [NOT] NULL Tests for nulls. This is the only operator that you should use to test for nulls. See “Nulls”.

Logical Operators

Operator Function
NOT Returns TRUE if the following condition is FALSE. Returns FALSE if it is TRUE. If it is
UNKNOWN, it remains UNKNOWN.
AND Returns TRUE if both component conditions are TRUE. Returns FALSE if either is FALSE.
Otherwise returns UNKNOWN.
OR Returns TRUE if either component condition is TRUE. Returns FALSE if both are FALSE. Otherwise
returns UNKNOWN.

Set Operators

Operator Returns
UNION All rows selected by either query.
UNION ALL All rows selected by either query, including all duplicates.
INTERSECT All distinct rows selected by both queries.
MINUS All distinct rows selected by the first query but not the second.

Other SQL Operators

Operator Purpose
(+) Indicates that the preceding column is the outer join column in a join. See “Outer Joins”.
PRIOR Evaluates the following expression for the parent row of the current row in a hierarchical, or tree-
structured, query. In such a query, you must use this operator in the CONNECT BY clause to define
the relationship between parent and child rows. You can also use this operator in other parts of a
SELECT statement that performs a hierarchical query. The PRIOR operator is a unary operator and
has the same precedence as the unary + and - arithmetic operators. See “Hierarchical Queries”.

16
SQL Reserved Words
ACCESS AUDIT OMPRESS DESC*
ADD* BETWEEN* CONNECT* DISTINCT*
ALL* BY* CREATE* DROP*
ALTER* CHAR* CURRENT* ELSE*
AND* CHECK* DATE* EXCLUSIVE
ANY* CLUSTER DECIMAL* EXISTS
AS* COLUMN DEFAULT* FILE
ASC* COMMENT DELETE* FLOAT*
FOR* LONG PCTFREE SUCCESSFUL
FROM* MAXEXTENTS PRIOR* SYNONYM
GRANT* MINUS PRIVILEGES* SYSDATE
GROUP* MODE PUBLIC* TABLE*
HAVING* MODIFY RAW THEN*
IDENTIFIED NETWORK RENAME TO*
IMMEDIATE* NOAUDIT RESOURCE TRIGGER
IN* NOCOMPRESS REVOKE* UID
INCREMENT NOT* ROW UNION*
INDEX NOWAIT ROWID UNIQUE*
INITIAL NULL* ROWNUM UPDATE*
INSERT* NUMBER ROWS* USER*
INTEGER* OF* SELECT* VALIDATE
INTERSECT* OFFLINE SESSION* VALUES*
INTO* ON* SET* VARCHAR*
IS* ONLINE SHARE VARCHAR2
LEVEL* OPTION* SIZE* VIEW*
LIKE* OR* SMALLINT* WHENEVER*
LOCK ORDER* START WHERE
WITH*

SQL Key Words


ACCOUNT CACHE_INSTANCES CONSTRAINT* DEGREE
ACTIVATE CANCEL CONSTRAINTS* DEREF
ADMIN CASCADE* CONTENTS DIRECTORY
AFTER CAST CONTINUE* DISABLE
ALLOCATE* CFILE CONTROLFILE DISCONNECT
ALL_ROWS CHAINED CONVERT* DISMOUNT
ANALYZE CHANGE COST DISTRIBUTED
ARCHIVE CHARACTER* COUNT* DML
ARCHIVELOG CHAR_CS CPU_PER_CALL DOUBLE*
ARRAY CHECKPOINT CPU_PER_SESSION DUMP
AT* CHOOSE CURRENT_SCHEMA DANGLING
AUTHENTICATED CHUNK CURRENT_USER* EACH
AUTHORIZATION CLEAR CURSOR* ENABLE
AUTOEXTEND CLOB CYCLE END*
AUTOMATIC CLONE CLOSE* ENFORCE
BACKUP CLOSED_CACHED_ DATABASE ESCAPE*
OPEN_CURSORS
BECOME COALESCE* DATAFILE ESTIMATE
BEFORE COLUMNS DATAFILES EVENTS
BEGIN* COMMIT* DATAOBJNO EXEMPT*
BFILE COMMITTED DBA EXCEPTIONS
BITMAP COMPATIBILITY DEALLOCATE* EXCHANGE
BLOB COMPILE DEBUG EXCLUDING
BLOCK COMPLETE DEC* EXECUTE*
BODY COMPOSITE_LIMIT DECLARE* EXPIRE
COMPUTE DEFERRABLE EXPLAIN
CACHE CONNECT_TIME DEFERRED EXTENT
EXTENTS INDEXES MANAGE NLS_CALENDAR
EXTERNALLY INDICATOR* MASTER NLS_CHARACTERSET
IND_PARTITION MAX* NLS_ISO_CURRENCY

17
FAILED_LOGIN_ INITIALLY MAXARCHLOGS NLS_LANGUAGE
ATTEMPTS
FALSE INITRANS MAXDATAFILES NLS_NUMERIC_
CHARACTERS
FAST INSTANCE MAXINSTANCES NLS_SORT
FIRST_ROWS INSTANCES MAXLOGFILES NOS_SPECIAL_
CHARS
FLAGGER INSTEAD MAXLOGHISTORY NLS_TERRITORY
FLUSH INT* MAXLOGMEMBERS NOARCHIVELOG
FORCE INTERMEDIATE MAXSIZE NOCACHE
FOREIGN* ISOLATION* MAXTRANS NOCYCLE
FREELIST ISOLATION_LEVEL MAXVALUE NOFORCE
FREELISTS ENTRY MEMBER NOLOGGING
FULL KEEP MIN* NOMAXVALUE
FUNCTION KEY* MINEXTENTS NOMINVALUE
KILL MINIMUM NONE
GLOBAL* MINVALUE NOORDER
GLOBALLY LAYER MOUNT NOOVERIDE
GLOBAL_NAME LESS MOVE NOPARALLEL
GROUPS LIBRARY MTS_DISPATCHERS NORESETLOGS
HASH LIMIT MULTISET NOREVERSE
HASHKEYS LINK NORMAL
HEADER LIST NATIONAL* NOSORT
INSTANCE LOB NCHAR* NOTHING
HEAP LOCAL* NCHAR_CS NUMERIC*
LOG NCLOB NVARCHAR2
IDLE_TIME LOGFILE NEEDED OBJECT
IF LOGGING NESTED OBJNO
INCLUDING LOGICAL_READS_ NEW OBJNO_REUSE
PER_CALL
INDEXED LOGICAL_READS_ NEXT* OFF
PER_SESSION
OID PLSQL_DEBUG RESIZE SHARED_POOL
OIDINDEX POST_ RESTRICTED SHRINK
TRANSACTION
OLD PRECISION* RETURN
ONLY* PRESERVE* RETURNING SNAPSHOT
OPCODE PRIMARY* REUSE SOME*
OPEN* PRIVATE REVERSE SORT
OPTIMAL PRIVATE_SGA ROLE SPECIFICATION
OPTIMIZER_GOAL PRIVILEGE ROLES SPLIT
ORGANIZATION PROCEDURE* ROLLBACK* SQLCODE*
OVERFLOW PROFILE ROWLABEL SQLERROR*
OWN PURGE RULE SQL_TRACE
STANDBY
PACKAGE QUEUE SAMPLE STATEMENT_ID
PARALLEL QUOTA SAVEPOINT STATISTICS
PARTITION SCAN_INSTANCES STOP
PASSWORD RANGE SCHEMA* STORAGE
PASSWORD_GRACE_TIME RBA SCN STORE
PASSWORD_LIFE_TIME READ* SCOPE STRUCTURE
PASSWORD_LOCK_TIME REAL* SD_ALL SUM*
PASSWORD_REUSE_MAX REBUILD SD_INHIBIT SWITCH
PASSWORD_REUSE_TIME RECOVER SD_SHOW SYSDBA
PASSWORD_VERIFY_ RECOVERABLE SEGMENT SYSOPER
FUNCTION
PCTINCREASE RECOVERY SEG_BLOCK SYSTEM
PCTTHRESHOLD REF SEG_FILE
PCTUSED REFERENCES* SEQUENCE TABLES
PCTVERSION REFERENCING SERIALIZABLE TABLESPACE
PERCENT REFRESH SESSIONS_PER_ TABLESPACE_NO
USER
PERMANENT REPLACE SESSION_CACHED_ TABNO
CURSORS

18
PLAN RESET SHARED TEMPORARY*
RESETLOGS
THAN TRUE UNLOCK VALIDATION
THE TRUNCATE UNRECOVERABLE VALUE
THREAD TX UNTIL* VARRAY
TIME TYPE UNUSABLE VARYING*
TIMESTAMP UNUSED WHEN
TOPLEVEL UBA UPDATABLE WITHOUT
TRACE UNARCHIVED USAGE* WORK*
TRACING UNDER USE WRITE*
TRANSACTION* UNDO USING*
TRANSITIONAL UNLIMITED XID
TRIGGERS

PL/SQL Reserved Words


ABORT ACCEPT ACCESS ADD ALL
ALTER AND ANY ARRAY ARRAYLEN
AS ASC ASSERT ASSIGN AT
AUDIT AUTHORIZATION AVG BASE_TABLE BEGIN
BETWEEN BINARY_INTEGER BODY BOOLEAN BY
CASE CHAR CHAR_BASE CHECK CLOSE
CLUSTER CLUSTERS COLAUTH COLUMN COMMENT
COMMIT COMPRESS CONNECT CONSTANT CRASH
CREATE CURRENT CURRVAL CURSOR DATABASE
DATA_BASE DATE DBA DEBUGOFF DEBUGON
DECLARE DECIMAL DEFAULT DEFINTION DELAY
DELETE DESC DIGITS DISPOSE DISTINCT
DO DROP ELSE ELSIF END
ENTRY EXCEPTION EXCEPTION_INIT EXCLUSIVE EXISTS
EXIT FALSE FETCH FILE FLOAT
FOR FORM FROM FUNCTION GENERIC
GOTO GRANT GROUP HAVING IDENTIFIED
IF IMMEDIATE IN INCREMENT INDEX
INDEXES INDICATOR INITIAL INSERT INTEGER
INTERFACE INTERSECT INTO IS LEVEL
LIKE LIMITED LOCK LONG LOOP
MAX MAXEXTENTS MIN MINUS MLSLABEL
MOD MODE NATURAL NATURALN NEW
NEXTVAL NOAUDIT NOCOMPRESS NOT NOWAIT
NULL NUMBER NUMBER_BASE OF OFLINE ON
ONLINE OPEN OPTION OR ORDER
OTHERS OUT PACKAGE PARTITION PCTFREE
PLS_INTEGER POSITIVE POSITIVEN PRAGMA PRIOR
PRIVATE PRIVILEGES PROCEDURE PUBLIC RAISE
RANGE RAW REAL RECORD REF
RELEASE REMR RENAME RESOURCE RETURN
REVERSE REVOKE ROLLBACK ROW ROWID
ROWLABEL ROWNUM ROWS ROWTYPE RUN
SAVEPOINT SCHEMA SELECT SEPERATE SESSION
SET SHARE SIGNTYPE SMALLINT SPACE
SQL SQLCODE SQLERRM START STATEMENT
STDDEV SUBTYPE SUCCESSFUL SUM SYNONYM
SYSDATE TABAUTH TABLE TABLES TASK
TERMINATE THEN TO TRIGGER TRUE
TYPE UID UNION UNIQUE UPDATE
USE USER VALIDATE VALUES VARCHAR
VARCHAR2 VARIANCE VIEW VIEWS WHEN
WHENEVER WHERE WHILE WITH WORK
WRITE XOR

19
Data Definition Language Commands

Command Purpose
ALTER CLUSTER Change the storage characteristics of a cluster. Allocate an extent for a cluster.
ALTER DATABASE Open/mount the database.
Convert an Oracle7 data dictionary when migrating to Oracle8.
Prepare to downgrade to an earlier release of Oracle.
Choose ARCHIVELOG/NOARCHIVELOG mode.
Perform media recovery.
Add/drop/clear redo log file groups members.
Rename a datafile/redo log file member.
Back up the current control file.
Back up SQL commands (that can be used to re-create the database) to the trace file.
Create a new datafile.
Resize one or more datafiles.
Create a new datafile in place of an old one for recovery purposes.
Enable/disable autoextending the size of datafiles.
Take a datafile online/offline.
Enable/disable a thread of redo log file groups.
Change the database’s global name.
ALTER FUNCTION Recompile a stored function.
ALTER INDEX Redefine an index’s future storage allocation.
ALTER PACKAGE Recompile a stored package.
ALTER PROCEDURE Recompile a stored procedure.
ALTER PROFILE Add or remove a resource limit to or from a profile.
ALTER RESOURCE COST Specify a formula to calculate the total cost of resources used by a session.
ALTER ROLE Change the authorization needed to access a role.
ALTER ROLLBACK SEGMENT Change a rollback segment’s storage characteristics.
Bring a rollback segment online/offline.
Shrink a rollback segment to an optimal or given size.
ALTER SEQUENCE Redefine value generation for a sequence.
ALTER SNAPSHOT Change a snapshot’s storage characteristics, automatic refresh time, or automatic refresh
mode.
ALTER SHAPSHOT LOG Change a snapshot log’s storage characteristics.
ALTER TABLE Add a column/integrity constraint to a table.
Redefine a column, to change a table’s storage characteristics.
Enable/disable/drop an integrity constraint.
Enable/disable table locks on a table.
Enable/disable all triggers on a table.
Allocate an extent for the table.
Allow/disallow writing to a table.
Modify the degree of parallelism for a table.
ALTER TABLESPACE Add/rename datafiles.
Change storage characteristics.
Take a tablespace online/offline.
Begin/end a backup.
Allow/disallow writing to a tablespace.
ALTER TRIGGER Enable/disable a database trigger.
ALTER TYPE Change a user-defined type.
ALTER USER Change a user’s password, default tablespace, temporary tablespace, tablespace quotas,
profile, or default roles.
ALTER VIEW Recompile a view.
ANALYZE Collect performance statistics, validate structure, or identify chained rows for a table,
cluster, or index.
AUDIT Choose auditing for specified SQL commands or operations on schema objects.
COMMENT Add a comment about a table, view, snapshot, or column to the data dictionary.
CREATE CLUSTER Create a cluster that can contain one or more tables.
CREATE CONTROLFILE Re-create a control file.
CREATE DATABASE Create a database.
CREATE DATABASE LINK Create a link to a remote database.
CREATE DIRECTORY Create a directory database object for administering access to and use of BFILEs stored
outside the database.
CREATE FUNCTION Create a stored function.
CREATE INDEX Create an index for a table or cluster.

20
CREATE LIBRARY Create a library from which SQL and PL/SQL can call external third-generation language
(3GL) functions and procedures.
CREATE PACKAGE Create the specification of a stored package.
CREATE PACKAGE BODY Create the body of a stored package
CREATE PROCEDURE Create a stored procedure.
CREATE PROFILE Create a profile and specify its resource limits.
CREATE ROLE Create a role.
CREATE ROLLBACK SEGMENT Create a rollback segment.
CREATE SCHEMA Issue multiple CREATE TABLE, CREATE VIEW, and GRANT statements in a single
transaction.
CREATE SEQUENCE Create a sequence for generating sequential values.
CREATE SHAPSHOT Create a snapshot of data from one or more remote master tables.
CREATE SNAPSHOT LOG Create a snapshot log containing changes made to the master table of a snapshot.
CREATE SYNONYM Create a synonym for a schema object.
CREATE TABLE Create a table, defining its columns, integrity constraints, and storage allocation.
CREATE TABLESPACE Create a place in the database for storage of schema objects, rollback segments, and
temporary segments, naming the datafiles that make up the tablespace.
CREATE TRIGGER Create a database trigger.
CREATE TYPE Create an object type, named varying array (VARRAY), nested table type, or an
incomplete object type.
CREATE USER Create a database user.
CREATE VIEW Define a view of one or more tables or views.
DROP CLUSTER Remove a cluster from the database.
DROP DATABASE LINK Remove a database link.
DROP DIRECTORY Remove a directory from the database.
DROP FUNCTION Remove a stored function from the database.
DROP INDEX Remove an index from the database.
DROP LIBRARY Remove a library object from the database.
DROP PACKAGE Remove a stored package from the database.
DROP PROCEDURE Remove a stored procedure from the database.
DROP PROFILE Remove a profile from the database.
DROP ROLE Remove a role from the database.
DROP ROLLBACK SEGMENT Remove a rollback segment from the database.
DROP SEQUENCE Remove a sequence from the database.
DROP SNAPSHOT Remove a snapshot from the database.
DROP SNAPSHOT LOG Remove a snapshot log from the database.
DROP SYNONYM Remove a synonym from the database.
DROP TABLE Remove a table from the database.
DROP TABLESPACE Remove a tablespace from the database.
DROP TRIGGER Remove a trigger from the database.
DROP TYPE Remove a user-defined type from the database.
DROP USER Remove a user and the objects in the user’s schema from the database.
DROP VIEW Remove a view from the database.
GRANT Grant system privileges, roles, and object privileges to users and roles.
NOAUDIT Disable auditing by reversing, partially or completely, the effect of a prior AUDIT
statement.
RENAME Change the name of a schema object.
REVOKE Revoke system privileges, roles, and object privileges from users and roles.
TRUNCATE Remove all rows from a table or cluster and free the space that the rows used.

Data Manipulation Language Commands

Command Purpose
DELETE Remove rows from a table.
EXPLAIN PLAN Return the execution plan for a SQL statement.
INSERT Add new rows to a table.
LOCK TABLE Lock a table or view, limiting access to it by other users.
SELECT Select data in rows and columns from one or more tables.
UPDATE Change data in a table.

21
Transaction Control Commands

Command Purpose
COMMIT Make permanent the changes made by statements issued since the beginning of the current transaction.
ROLLBACK Undo all changes since the beginning of a transaction or since a savepoint.
SAVEPOINT Establish a point back to which you may roll.
SET TRANSACTION Establish properties for the current transaction.

Session Control Commands

Command Purpose
ALTER SESSION Enable/disable the SQL trace facility.
Enable/disable global name resolution.
Change the values of the session’s NLS parameters.
In a parallel server, indicate that the session must access database files as if the session were connected
to another instance.
Close a database link.
Send advice to remote databases for forcing an in-doubt distributed transaction.
Permit or prohibit procedures and stored procedures from issuing COMMIT and ROLLBACK
statements.
Change the goal of the cost-based optimization approach.
SET ROLE Enable/disable roles for the current session.

System Control Commands

Command Purpose
ALTER SYSTEM Alter the Oracle instance by performing a specialized function.

22
SQL Commands

ALTER CLUSTER
Purpose
Redefines storage and parallelism characteristics of a cluster. See also "Altering Clusters".

Syntax

23
ALTER DATABASE
Purpose
To alter an existing database in one of these ways:
• mount the database, clone, or standby database
• convert an Oracle7 data dictionary when migrating to Oracle8
• open the database
• choose ARCHIVELOG or NOARCHIVELOG mode for redo log file groups
• perform media recovery
• add or drop a redo log file group or a member of a redo log file group
• clear and initialize an online redo log file
• rename a redo log file member or a datafile
• back up the current control file
• back up SQL commands (that can be used to re-create the database) to the database’s trace file
• take a datafile online or offline
• enable or disable a thread of redo log file groups
• change the database’s global name
• prepare to downgrade to an earlier release of Oracle
• resize one or more datafiles
• create a new datafile in place of an old one for recovery purposes
• enable or disable the autoextending of the size of datafiles

Syntax:

24
logfile_descriptor::=

autoextend_clause::=

recover_clause: See the RECOVER clause.

ALTER FUNCTION
Purpose
To recompile a standalone stored function. See also "Recompiling Standalone Functions".

Syntax

25
ALTER INDEX
Purpose
Use ALTER INDEX to:
• change storage allocation for, rebuild, or rename an index
• rename, split, remove, mark as unusable, rebuild, or modify physical or logging attributes of a partition of a partitioned
index
• modify the physical, parallel, or logging attributes of a nonpartitioned index
• modify the default physical, parallel, or logging attributes of index partitions
• rebuild an index to store the bytes of the index block in reverse order
• modify a nested table index

Syntax

26
parallel_clause: See PARALLEL clause.

storage_clause: See STORAGE clause.

deallocate_unused_clause: See DEALLOCATE UNUSED clause.

27
ALTER PACKAGE
Purpose
To recompile a stored package. See also "Recompiling Stored Packages".

Syntax

ALTER PROCEDURE
Purpose
To recompile a stand-alone stored procedure. See also "Recompiling Stored Procedures".

Syntax

ALTER PROFILE
Purpose
To add, modify, or remove a resource limit or password management in a profile.

Syntax

28
ALTER RESOURCE COST
Purpose
To specify a formula to calculate the total resource cost used in a session. For any session, this cost is limited by the value of the
COMPOSITE_LIMIT parameter in the user’s profile.

Syntax

ALTER ROLE
Purpose
To change the authorization needed to enable a role.

Syntax

ALTER ROLLBACK SEGMENT


Purpose
To alter a rollback segment by:
• bringing it online
• taking it offline
• changing its storage characteristics
• shrinking it to an optimal or given size

Syntax

storage_clause: See STORAGE clause.

29
ALTER SEQUENCE
Purpose
To change the sequence by
• changing the increment between future sequence values
• setting or eliminating the minimum or maximum value
• changing the number of cached sequence numbers
• specifying whether the sequence continues to generate numbers after reaching the maximum or minimum value
• specifying whether sequence numbers must be ordered

Syntax

ALTER SESSION
Purpose
To alter your current session in one of the following ways:
• enable or disable the SQL trace facility
• enable or disable global name resolution
• change the values of NLS parameters
• specify the size of the cache used to hold frequently used cursors
• enable or disable the closing of cached cursors on COMMIT or ROLLBACK
• in a parallel server, indicate that the session must access database files as if the session were connected to another instance
• enable, disable, and change the behavior of hash join operations
• change the handling of remote procedure call dependencies
• change transaction level handling
• close a database link
• send advice to remote databases to force an in-doubt distributed transaction
• permit or prohibit stored procedures and functions from issuing COMMIT and ROLLBACK statements
• change the goal of the cost-based optimization approach
• in a parallel server, enable DML statements to be considered for parallel execution
• to insert, update, or delete from tables with indexes or index partitions marked as unusable
• allow deferrable constraints to be checked either immediately following every DML statement or at the end of a
transaction

30
Syntax

31
32
33
ALTER SNAPSHOT
Purpose
To alter a snapshot in one of the following ways:
• changing its storage characteristics
• changing its automatic refresh mode and times

Syntax

parallel_clause: See the PARALLEL clause

storage_clause: See the STORAGE clause

34
For the syntax of the following clauses, see ALTER TABLE:
• physical_attributes_clause
• LOB_storage_clause
• modify_LOB_storage_clause
• modify_partition_clause
• move_partition_clause
• add_partition_clause
• split_partition_clause
• modify_default_attributes_clause
• rename_partition_clause

ALTER SNAPSHOT LOG


Purpose
Changes the storage characteristics of a snapshot log. For more information on snapshot logs, see CREATE SNAPSHOT.

Syntax

For the syntax of the following clauses, see ALTER TABLE:


• physical_attributes_clause
• modify_partition_clause
• rename_partition_clause
• move_partition_clause
• add_partition_clause
• split_partition_clause
• modify_default_attributes

35
ALTER SYSTEM
Purpose
To dynamically alter your Oracle instance in one of the following ways:
• to explicitly perform a checkpoint
• to verify access to datafiles
• to terminate a session
• to enable or disable resource limits
• to enable distributed recovery in a single-process environment
• to disable distributed recovery
• to restrict logons to Oracle to only those users with RESTRICTED SESSION system privilege
• to clear all data from the shared pool in the system global area (SGA)
• to enable or disable global name resolution
• to dynamically change or disable limits or thresholds for concurrent usage licensing and named user licensing
• to manually archive redo log file groups or to enable or disable automatic archiving
• to manage shared server processes or dispatcher processes for the multithreaded server architecture
• to explicitly switch redo log file groups

Syntax

archive_log_clause: See the ARCHIVE LOG clause.

36
set_clause::=

37
dispatch_clause::=

38
options_clause::=

39
ALTER TABLE
Purpose
To alter the definition of a table in one of the following ways:
• add a column
• add an integrity constraint
• redefine a column (datatype, size, default value)
• modify storage characteristics or other parameters
• modify the real storage attributes of a nonpartitioned table or the default attributes of a partitioned table
• enable, disable, or drop an integrity constraint or trigger
• explicitly allocate an extent
• explicitly deallocate the unused space of a table
• allow or disallow writing to a table
• modify the degree of parallelism for a table
• modify the logging attributes of a non-partitioned table, partitioned table or table partition(s)
• modify the CACHE/NOCACHE attributes
• add, modify, split, move, drop, or truncate table partitions
• rename a table or a table partition
• add or modify index-organized table characteristics
• add or modify LOB columns
• add or modify object type, nested table type, or VARRAY type column
• add integrity constraints to object type columns

Syntax

40
add_column_options::=

column_constraint, table_constraint: See the CONSTRAINT clause

column_ref_clause::=

table_ref_clause::=

modify_column_options::=

physical_attributes_clause::=

storage_clause: See STORAGE clause.

LOB_storage_clause::=

LOB_parameters::=

LOB_index_clause::=

41
LOB_index_parameters::=

modify_LOB_storage_clause::=

modify_LOB_index_clause::=

nested_table_storage_clause::=

drop_clause: See the DROP clause.

allocate_extent_clause::=

deallocate_unused_clause: See the DEALLOCATE UNUSED clause.

index_organized_table_clauses::=

42
partitioning_clauses::=

rename_partition_clause::=

43
parallel_clause: See the PARALLEL clause.

ALTER TABLESPACE
Purpose
To alter an existing tablespace in one of the following ways:
• add datafile(s)
• rename datafiles
• change default storage parameters
• take the tablespace online or offline
• begin or end a backup
• allow or disallow writing to a tablespace
• change the default logging attribute of the tablespace
• change the minimum tablespace extent length

Syntax

44
filespec: See "Filespec".

storage_clause: See STORAGE clause.

ALTER TRIGGER
Purpose
To enable, disable, or compile a database trigger.

Syntax

ALTER TYPE
Purpose
To recompile the specification and/or body, or to change the specification of an object type by adding new object member
subprogram specifications.

Syntax

45
ALTER USER
Purpose
To change any of the following characteristics of a database user:
• authentication mechanism of the user
• password
• default tablespace for object creation
• tablespace for temporary segments created for the user
• tablespace access and tablespace quotas
• limits on database resources
• default roles

Syntax

ALTER VIEW
Purpose
To recompile a view or an object view.

Syntax

ANALYZE

Purpose
To perform one of the following functions on an index or index partition, table or table partition, index-organized table, or cluster:
• collect statistics about the schema object used by the optimizer and store them in the data dictionary
• delete statistics about the schema object from the data dictionary
• validate the structure of the schema object
• identify migrated and chained rows of the table or cluster
• collect statistics on scalar object attributes
• validate and update object references (REFs)

46
Syntax

ARCHIVE LOG clause

Purpose
To manually archive redo log file groups or to enable or disable automatic archiving.

Syntax

47
AUDIT (SQL Statements)

Purpose
To choose specific SQL statements for auditing in subsequent user sessions. To choose particular schema objects for auditing, see
AUDIT (Schema Objects).

Syntax

AUDIT (Schema Objects)


Purpose
To choose a specific schema object for auditing. To choose particular SQL commands for auditing, see AUDIT (SQL Statements).
Auditing keeps track of operations performed by database users. For a brief conceptual overview of auditing, including how to enable
auditing, see the AUDIT (SQL Statements). Note that auditing options established by the AUDIT command (Schema Objects) apply
to current sessions as well as to subsequent sessions.

Syntax

COMMENT
Purpose
To add a comment about a table, view, snapshot, or column into the data dictionary.

Syntax

48
COMMIT
Purpose
To end your current transaction and make permanent all changes performed in the transaction. This command also erases all
savepoints in the transaction and releases the transaction’s locks. See also "About Transactions". You can also use this command to
commit an in-doubt distributed transaction manually.

Syntax

CONSTRAINT clause
Purpose
To define an integrity constraint. An integrity constraint is a rule that restricts the values for one or more columns in a table or an
index-organized table.

Syntax

table_constraint::=

49
column_constraint::=

storage_clause: See the STORAGE clause.

CREATE CLUSTER
Purpose
To create a cluster. A cluster is a schema object that contains one or more tables, all of which have one or more columns in common.

Syntax

storage_clause: See the STORAGE clause.

parallel_clause: See the PARALLEL clause.

50
CREATE CONTROLFILE
Purpose
To re-create a control file in one of the following cases:
• All copies of your existing control files have been lost through media failure.
• You want to change the name of the database.
• You want to change the maximum number of redo log file groups, redo log file members, archived redo log files, datafiles,
or instances that can concurrently have the database mounted and open.

Syntax

filespec: See "Filespec".

CREATE DATABASE
Purpose
To create a database, making it available for general use, with the following options:
• to establish a maximum number of instances, datafiles, redo log files groups, or redo log file members
• to specify names and sizes of datafiles and redo log files
• to choose a mode of use for the redo log
• to specify the national and database character sets

Syntax

51
CREATE DATABASE LINK
Purpose
To create a database link. A database link is a schema object in the local database that allows you to access objects on a remote
database. The remote database can be either an Oracle or a non-Oracle system.

Syntax

CREATE DIRECTORY
Purpose
Use CREATE DIRECTORY to create a directory object, which represents an operating system directory for administering access to,
and the use of, BFILEs stored outside the database. A directory is an alias for a full pathname on the server’s file system where the
files are actually located.

Syntax

52
CREATE FUNCTION
Purpose
To create a stored function or to register an external function. A stored function (also called a user function) is a set of PL/SQL
statements you can call by name. Stored functions are very similar to procedures, except that a function returns a value to the
environment in which it is called. User functions can be used as part of a SQL expression. For a general discussion of procedures and
functions, see CREATE PROCEDURE. For examples of creating functions, see "Examples". An external function is a third-
generation language (3GL) routine stored in a shared library that can be called from SQL or PL/SQL. To call an external function, you
must provide information in your PL/SQL function about where to find the external function, how to call it, and what to pass to it.
The CREATE FUNCTION command creates a function as a standalone schema object. You can also create a function as part of a
package. For information on creating packages, see CREATE PACKAGE. For more information about registering external functions,
see the PL/SQL User’s Guide and Reference.

Syntax

external_body::=

CREATE INDEX
Purpose
To create an index on:
• one or more columns of a table, a partitioned table, or a cluster
• one or more scalar typed object attributes of a table or a cluster
• a nested table storage table for indexing a nested table column
An index is a schema object that contains an entry for each value that appears in the indexed column(s) of the table or cluster and
provides direct, fast access to rows. A partitioned index consists of partitions containing an entry for each value that appears in the
indexed column(s) of the table.

53
Syntax

parallel_clause: See PARALLEL clause.

storage_clause: See STORAGE clause

54
CREATE LIBRARY
Purpose
To create a schema object (library), which represents an operating-system shared library, from which SQL and PL/SQL can call
external third-generation-language (3GL) functions and procedures. See "Examples"

Syntax

filespec: See "Filespec".

CREATE PACKAGE
Purpose
To create the specification for a stored package. A package is an encapsulated collection of related procedures, functions, and other
program objects stored together in the database. The specification declares these objects.

Syntax

CREATE PACKAGE BODY


Purpose
To create the body of a stored package. A package is an encapsulated collection of related procedures, stored functions, and other
program objects stored together in the database. The body defines these objects. Packages are an alternative to creating procedures
and functions as standalone schema objects. For a discussion of packages, including how to create packages, see
CREATE PACKAGE.

Syntax

CREATE PROCEDURE
Purpose
To create a standalone stored procedure or to register an external procedure. A procedure is a group of PL/SQL statements that you
can call by name. An external procedure is a third-generation language (3GL) routine stored in a shared library which can be called
from SQL or PL/SQL. To call an external procedure, you must provide information in your PL/SQL function about where to find the
external procedure, how to call it, and what to pass to it. For more information about registering external procedures, see the
PL/SQL User’s Guide and Reference.

55
Syntax

CREATE PROFILE
Purpose
To create a profile. A profile is a set of limits on database resources. If you assign the profile to a user, that user cannot exceed limits.

56
Syntax

CREATE ROLE
Purpose
To create a role. A role is a set of privileges that can be granted to users or to other roles. See also "Using Roles". For a detailed
description and explanation of using global roles, see Oracle8 Distributed Database Systems .

Syntax

CREATE ROLLBACK SEGMENT


Purpose
To create a rollback segment. A rollback segment is an object that Oracle uses to store data necessary to reverse, or undo, changes
made by transactions.

Syntax

storage_clause: See the STORAGE clause.

57
CREATE SCHEMA
Purpose
To create multiple tables and views and perform multiple grants in a single transaction.

Syntax

CREATE SEQUENCE
Purpose
To create a sequence. A sequence is a database object from which multiple users may generate unique integers. You can use
sequences to automatically generate primary key values.

Syntax

CREATE SNAPSHOT
Purpose
To create a snapshot. A snapshot is a table that contains the results of a query of one or more tables, often located on a remote
database.

Syntax

58
physical_attributes_clause: See ALTER TABLE.

parallel_clause: See the PARALLEL clause.

index_physical_attributes_clause: See ALTER INDEX.

select_command: See SELECT.

LOB_storage_clause: See CREATE TABLE.

table_partition_clause: See CREATE TABLE.

CREATE SNAPSHOT LOG


Purpose
To create a snapshot log. A snapshot log is a table associated with the master table of a snapshot. Oracle stores changes to the master
table’s data in the snapshot log and then uses the snapshot log to refresh the master table’s snapshots.

Syntax

59
parallel_clause: See PARALLEL clause.

storage_clause: See STORAGE clause.

LOB_storage_clause: See CREATE TABLE.

table_partition_clause: See CREATE TABLE.

physical_attributes_clause: See CREATE TABLE.

CREATE SYNONYM
Purpose
To create a synonym. A synonym is an alternative name for a table, view, sequence, procedure, stored function, package, snapshot, or
another synonym.

Syntax

CREATE TABLE
Purpose
To create a table, the basic structure to hold user data, specifying the following information:
• column definitions
• table organization definition
• column definitions using objects
• integrity constraints
• the table’s tablespace
• storage characteristics
• an optional cluster
• data from an arbitrary query
• degree of parallelism used to create the table and the default degree of parallelism for queries on the table
• partitioning definitions
• index-organized or heap-organized

Syntax

60
Relational table definition ::=

Object table definition ::=

column_ref_clause::=

61
table_ref_clause::=

segment_attributes_clause::=

physical_attributes_clause::=

storage_clause: See the STORAGE clause

62
disable_clause: See the DISABLE clause.

enable_clause: See the ENABLE clause.

parallel_clause: See the PARALLEL clause

storage_clause: see STORAGE clause

subquery: See "Subqueries"

CREATE TABLESPACE
Purpose
To create a tablespace. A tablespace is an allocation of space in the database that can contain schema objects.

Syntax

filespec: See "Filespec".

63
autoextend_clause::=

storage_clause: See STORAGE clause.

CREATE TRIGGER
Purpose
To create and enable a database trigger. A database trigger is a stored PL/SQL block associated with a table. Oracle automatically
executes a trigger when a specified SQL statement is issued against the table.

Syntax

CREATE TYPE
Purpose
To create an object type, named varying array (VARRAY), nested table type, or an incomplete object type.

Syntax

create_incomplete_type::=

create_varray_type::=

create_nested_table_type::=

64
create_object_type::=

pragma_clause::=

datatype::=

65
CREATE TYPE BODY
Purpose
To define or implement the member methods defined in the object type specification.

Syntax

CREATE USER
Purpose
To create a database user, or an account through which you can log in to the database and establish the means by which Oracle
permits access by the user. You can assign the following optional properties to the user:
• default tablespace
• temporary tablespace
• quotas for allocating space in tablespaces
• profile containing resource limits
For a detailed description and explanation of how to use password management and protection, see Oracle8 Administrator’s Guide.

Syntax

66
CREATE VIEW
Purpose
To define a view, a logical table based on one or more tables or views.

Syntax

DEALLOCATE UNUSED clause


Purpose
To specify the amount of unused space to deallocate from extents.

Syntax

DELETE
Purpose
To remove rows from a table, a partitioned table, a view’s base table, or a view’s partitioned base table.

67
Syntax

subquery: See "Subqueries".

DISABLE clause
Purpose
To disable an integrity constraint or all triggers associated with a table. If you disable an integrity constraint, Oracle does not enforce
it. However, disabled integrity constraints appear in the data dictionary along with enabled integrity constraints. If you disable a
trigger, Oracle does not fire it if its triggering condition is satisfied.

Syntax

DROP clause
Purpose
To remove an integrity constraint from the database.

Syntax

68
DROP CLUSTER
Purpose
To remove a cluster from the database.

Syntax

DROP DATABASE LINK


Purpose
To remove a database link from the database.

Syntax

DROP DIRECTORY
Purpose
Use DROP DIRECTORY to remove a directory object from the database.

Syntax

DROP FUNCTION
Purpose
To remove a standalone stored function from the database.

Syntax

DROP INDEX
Purpose
To remove an index from the database.

Syntax

DROP LIBRARY
Purpose
To remove an external procedure library from the database.

Syntax

69
DROP PACKAGE
Purpose
To remove a stored package from the database.

Syntax

DROP PROCEDURE
Purpose
To remove a standalone stored procedure from the database.

Syntax

DROP PROFILE
Purpose
To remove a profile from the database.

Syntax

DROP ROLE
Purpose
To remove a role from the database.

Syntax

DROP ROLLBACK SEGMENT


Purpose
To remove a rollback segment from the database.

Syntax

DROP SEQUENCE
Purpose
To remove a sequence from the database.

Syntax

DROP SNAPSHOT
Purpose
To remove a snapshot from the database.

Syntax

70
DROP SNAPSHOT LOG
Purpose
To remove a snapshot log from the database.

Syntax

DROP SYNONYM
Purpose
To remove a synonym from the database.

Syntax

DROP TABLE
Purpose
To remove a table or an object table and all its data from the database.

Syntax

DROP TABLESPACE
Purpose
To remove a tablespace from the database.

Syntax

DROP TRIGGER
Purpose
To remove a database trigger from the database.

Syntax

DROP TYPE
Purpose
To drop the specification and body of an object, a VARRAY, or nested table type. To drop just the body of an object, use the
DROP TYPE BODY.

Syntax

71
DROP TYPE BODY
Purpose
To drop the body of an object, a VARRAY, or nested table type.
To drop the specification of an object, see DROP TYPE

Syntax

DROP USER
Purpose
To remove a database user and optionally remove the user’s objects.

Syntax

DROP VIEW
Purpose
To remove a view or an object view from the database.

Syntax

ENABLE clause
Purpose
To enable an integrity constraint or all triggers associated with a table. If you enable a constraint, Oracle enforces it by applying it to
all data in the table. All table data must satisfy an enabled constraint.
If you enable a trigger, Oracle fires the trigger whenever its triggering condition is satisfied. To enable a single trigger, use the
ENABLE option of ALTER TRIGGER.

Syntax

using_index_clause::=

exceptions_clause::=

72
storage_clause: See the STORAGE clause.

EXPLAIN PLAN
Purpose
To determine the execution plan Oracle follows to execute a specified SQL statement. This command inserts a row describing each
step of the execution plan into a specified table. If you are using cost-based optimization, this command also determines the cost of
executing the statement.

Syntax

FILESPEC
Purpose
To specify a file as a datafile. To specify a group of one or more files as a redo log file group.

Syntax

GRANT (System Privileges and Roles)


Purpose
To grant system privileges and roles to users and roles. To grant object privileges, use the GRANT command (Object Privileges)
described in the next section of this chapter.

Syntax

System Privileges
System Privilege Allows grantee to . . .
ALTER ANY CLUSTER alter any cluster in any schema
ALTER ANY INDEX alter any index in any schema
ALTER ANY PROCEDURE alter any stored procedure, function, or package in any schema
ALTER ANY ROLE alter any role in the database
ALTER ANY SEQUENCE alter any sequence in the database
ALTER ANY SNAPSHOT alter any snapshot in the database
ALTER ANY TABLE alter any table or view in the schema
ALTER ANY TYPE alter any type in any schema

73
ALTER ANY TRIGGER enable, disable, or compile any database trigger in any schema
ALTER DATABASE alter the database
ALTER PROFILE alter profiles
ALTER RESOURCE COST set costs for session resources
ALTER ROLLBACK SEGMENT alter rollback segments
ALTER SESSION issue ALTER SESSION statements
ALTER SYSTEM issue ALTER SYSTEM statements
ALTER TABLESPACE alter tablespaces
ALTER USER alter any user. This privilege authorizes the grantee to
change another user’s password or authentication method,
assign quotas on any tablespace,
set default and temporary tablespaces, and
assign a profile and default roles
ANALYZE ANY analyze any table, cluster, or index in any schema
AUDIT ANY audit any object in any schema using AUDIT (Schema Objects) statements
AUDIT SYSTEM issue AUDIT (SQL Statements) statements
BACKUP ANY TABLE use the Export utility to incrementally export objects from the schema of other users
BECOME USER become another user. (Required by any user performing a full database import.)
COMMENT ANY TABLE Comment on any table, view, or column in any schema
CREATE ANY CLUSTER create a cluster in any schema. Behaves similarly to CREATE ANY TABLE.
CREATE ANY DIRECTORY create a directory database object in any schema
CREATE ANY INDEX create an index in any schema on any table in any schema
CREATE ANY LIBRARY create external procedure/function libraries in any schema
CREATE ANY PROCEDURE create stored procedures, functions, and packages in any schema
CREATE ANY SEQUENCE create a sequence in any schema
CREATE ANY SNAPSHOT create snapshots in any schema
CREATE ANY SYNONYM create private synonyms in any schema
CREATE ANY TABLE create tables in any schema. The owner of the schema containing the table must have space
quota on the tablespace to contain the table.
CREATE ANY TRIGGER create a database trigger in any schema associated with a table in any schema
CREATE ANY TYPE create types and type bodies in any schema
CREATE ANY VIEW create views in any schema
CREATE CLUSTER create clusters in grantee’s schema
CREATE DATABASE LINK create private database links in grantee’s schema
CREATE ANY LIBRARY create external procedure/function libraries in grantee’s schema
CREATE PROCEDURE create stored procedures, functions, and packages in grantee’s schema
CREATE PROFILE create profiles
CREATE PUBLIC DATABASE create public database links
LINK
CREATE PUBLIC SYNONYM create public synonyms
CREATE ROLE create roles
CREATE ROLLBACK SEGMENT create rollback segments
CREATE SEQUENCE create sequences in grantee’s schema
CREATE SESSION connect to the database
CREATE SNAPSHOT create snapshots in grantee’s schema
CREATE SYNONYM create synonyms in grantee’s schema
CREATE TABLE create tables in grantee’s schema. To create a table, the grantee must also have space quota on
the tablespace to contain the table.
CREATE TABLESPACE create tablespaces
CREATE TRIGGER create a database trigger in grantee’s schema
CREATE TYPE create types and type bodies in grantee’s schema
CREATE USER create users. This privilege also allows the creator to
assign quotas on any tablespace,
set default and temporary tablespaces, and
assign a profile as part of a CREATE USER statement.
CREATE VIEW create views in grantee’s schema
DELETE ANY TABLE delete rows from tables or views in any schema, truncate tables in any schema
DROP ANY CLUSTER drop clusters in any schema
DROP ANY DIRECTORY drop directory database objects
DROP ANY INDEX drop indexes in any schema
DROP ANY LIBRARY drop external procedure/function libraries in any schema
DROP ANY PROCEDURE drop stored procedures, functions, or packages in any schema
DROP ANY ROLE drop roles

74
DROP ANY SEQUENCE drop sequences in any schema
DROP ANY SNAPSHOT drop snapshots in any schema
DROP ANY SYNONYM drop private synonyms in any schema
DROP ANY TABLE drop tables in any schema
DROP ANY TRIGGER drop database triggers in any schema
DROP ANY TYPE drop object types and object type bodies in any schema
DROP ANY VIEW drop views in any schema
DROP LIBRARY drop external procedure/function libraries
DROP PROFILE drop profiles
DROP PUBLIC DATABASE LINK drop public database links
DROP PUBLIC SYNONYM drop public synonyms
DROP ROLLBACK SEGMENT drop rollback segments
DROP TABLESPACE drop tablespaces
DROP USER drop users
EXECUTE ANY PROCEDURE execute procedures or functions (standalone or packaged)
reference public package variables in any schema
EXECUTE ANY TYPE use and reference object types, and invoke methods of any type in any schema. You must
grant EXECUTE ANY TYPE to a specific user. You cannot grant EXECUTE ANY TYPE to
a role.
FORCE ANY TRANSACTION force the commit or rollback of any in-doubt distributed transaction in the local database.
induce the failure of a distributed transaction.
FORCE TRANSACTION force the commit or rollback of grantee’s in-doubt distributed transactions in the local
database
GRANT ANY PRIVILEGE grant any system privilege.
GRANT ANY ROLE grant any role in the database
INSERT ANY TABLE insert rows into tables and views in any schema
LOCK ANY TABLE lock tables and views in any schema
MANAGE TABLESPACE take tablespaces offline and online and begin and end tablespace backups
RESTRICTED SESSION logon after the instance is started using the Server Manager STARTUP RESTRICT command

SELECT ANY SEQUENCE reference sequences in any schema


SELECT ANY TABLE query tables, views, or snapshots in any schema
SYSDBA perform Server Manager STARTUP and SHUTDOWN commands,
ALTER DATABASE OPEN/MOUNT/BACKUP,
CREATE DATABASE,
ARCHIVELOG and RECOVERY and
includes the RESTRICTED SESSION privilege.
SYSOPER perform Server Manager STARTUP and SHUTDOWN commands,
ALTER DATABASE OPEN/MOUNT/BACKUP,
ARCHIVELOG and RECOVERY
includes the RESTRICTED SESSION privilege.
UNLIMITED TABLESPACE use an unlimited amount of any tablespace. This privilege overrides any specific quotas
assigned. If you revoke this privilege from a user, the grantee’s schema objects remain but
further tablespace allocation is denied unless authorized by specific tablespace quotas. You
cannot grant this system privilege to roles.
UPDATE ANY TABLE update rows in tables and views in any schema

GRANT (Object Privileges)


Purpose
To grant privileges for a particular object to users and roles. To grant system privileges and roles, use the GRANT command (System
Privileges and Roles) described in the previous section of this chapter.

75
Syntax

Object Privileges
Object Table View Sequence Proc/Func/Pkg Snapshot Directory Library
Privilege
ALTER X X
DELETE X X Xa
EXECUTE X X
INDEX X
INSERT X X Xa
READ X
REFERENCES X
SELECT X X X X
UPDATE X X Xa
a
The DELETE, INSERT, and UPDATE privileges can be granted only to updatable snapshots.

Object Privileges and the Operations They Authorize


Object Privilege Allows Grantee to . . .
Table privileges authorize operations on a table. Any one of following object privileges allows the grantee to lock the table in any
lock mode with the LOCK TABLE command.
ALTER allows the grantee to change the table definition with the ALTER TABLE command.
DELETE remove rows from the table with the DELETE command.
Note: You must grant the SELECT privilege on the table along with the DELETE privilege.
INDEX create an index on the table with the CREATE INDEX command.
INSERT add new rows to the table with the INSERT command.
REFERENCES create a constraint that refers to the table. You cannot grant this privilege to a role.
SELECT query the table with the SELECT command.
UPDATE change data in the table with the UPDATE command.
Note: You must grant the SELECT privilege on the table along with the UPDATE privilege.
View privileges authorizes operations on a view. Any one of the above object privileges allows the grantee to lock the view in any
lock mode with the LOCK TABLE command.
To grant a privilege on a view, you must have that privilege with the GRANT OPTION on all of the view’s base tables.
DELETE remove rows from the view with the DELETE command.
INSERT add new rows to the view with the INSERT command.
SELECT query the view with the SELECT command.
UPDATE change data in the view with the UPDATE command.
Sequence privileges authorize operations on a sequence.
ALTER change the sequence definition with the ALTER SEQUENCE command.
SELECT examine and increment values of the sequence with the CURRVAL and NEXTVAL pseudocolumns.
Procedure, function, and package privileges authorize operations on procedures, functions, or packages.
EXECUTE execute the procedure or function or to access any program object declared in the specification of a package.
Snapshot privileges authorize operations on a snapshot.
SELECT query the snapshot with the SELECT command.
Synonym privileges are the same as the privileges for the base object. See "Synonym Privileges" below.
Directory privileges provide secured access to the files stored in the operating system directory. See "Directory Privileges" below.

READ read files in the directory.

76
INSERT
Purpose
To add rows to:
• a table
• a view’s base table
• a partition of a partitioned table
• an object table
• an object view’s base table

Syntax

LOCK TABLE
Purpose
To lock one or more tables in a specified mode. This lock manually overrides automatic locking and permits or denies access to a
table or view by other users for the duration of your operation.

Syntax

NOAUDIT (SQL Statements)


Purpose
To stop auditing previously enabled by the AUDIT command (SQL Statements). To stop auditing enabled by the AUDIT command
(Schema Objects), refer to NOAUDIT (Schema Objects).

77
Syntax

NOAUDIT (Schema Objects)


Purpose
To stop auditing previously enabled by the AUDIT command (Schema Objects). To stop auditing enabled by the AUDIT command
(SQL Statements), refer to NOAUDIT (SQL Statements).

Syntax

PARALLEL clause
Purpose
To specify whether Oracle should execute an operation serially or in parallel.

Syntax

RECOVER clause
Purpose
To perform media recovery. Use the ALTER DATABASE command with the RECOVER clause if you want to write your own
specialized media recovery application using SQL. For other situations, Oracle recommends that you use the Server Manager
RECOVER command rather than the ALTER DATABASE command with the RECOVER clause to perform media recovery. For
more information on media recovery, see the Oracle8 Backup and Recovery Guide and Oracle8 Administrator’s Guide.

Syntax

78
parallel_clause: See the PARALLEL clause.

RENAME
Purpose
To rename a table, view, sequence, or private synonym for a table, view, or sequence.

Syntax

REVOKE (System Privileges and Roles)


Purpose
To revoke system privileges and roles from users and roles. To revoke object privileges from users and roles, refer to
REVOKE (Schema Object Privileges).

Syntax

REVOKE (Schema Object Privileges)


Purpose
To revoke object privileges for a particular object from users and roles. To revoke system privileges or roles, refer to .
REVOKE (System Privileges and Roles). See also "Revoking Object Privileges". Each object privilege authorizes some operation on
an object. By revoking an object privilege, you prevent the revokee from performing that operation. For a summary of the object
privileges for each type of object, see Grant.

79
Syntax

ROLLBACK
Purpose
To undo work done in the current transaction, or to manually undo the work done by an in-doubt distributed transaction.

Syntax

SAVEPOINT
Purpose
To identify a point in a transaction to which you can later roll back.

Syntax

SELECT
Purpose
To retrieve data from one or more tables, object tables, views, object views, or snapshots.

Syntax

80
WITH_clause::=

SET ROLE
Purpose
To enable and disable roles for your current session.

Syntax

81
SET TRANSACTION
Purpose
For the current transaction, to establish it as a read-only or read-write transaction, establish the isolation level, or to assign it to a
specified rollback segment

Syntax

STORAGE clause
Purpose
To specify storage characteristics for tables, indexes, clusters, and rollback segments, and the default storage characteristics for
tablespaces.

Syntax

SUBQUERIES
Purpose
A subquery is a form of the SELECT command that appears inside another SQL statement. A subquery is sometimes called a nested
query. The statement containing a subquery is called the parent statement. The rows returned by the subquery are used by the parent
statement.

82
Syntax

WITH_clause::=

TRUNCATE
Purpose
To remove all rows from a table or cluster and reset the STORAGE parameters to the values when the table or cluster was created.

Syntax

83
UPDATE
Purpose
To change existing values in a table or in a view’s base table.

Syntax

84
SQL*Plus Quick Reference

This Quick Reference shows the syntax for SQL*Plus commands. For detailed information on each command, refer to the SQL*Plus
User’s Guide and Reference.

Conventions for Command Syntax

The following two tables describe the notation and conventions for command syntax used in this Quick Reference.

Commands, Terms, and Clauses

Feature Example Explanation


uppercase BTITLE Enter text exactly as spelled; it need not be in uppercase.
lowercase italics column A clause value; substitute an appropriate value.
words with specific meanings c A single character.
char A CHAR value--a literal in single quotes--or an expression with a CHAR
value.
d or e A date or an expression with a DATE value.
expr An unspecified expression.
m or n A number of an expression with a NUMBER value.
text A CHAR constant with or without single quotes.
variable A user variable (unless the text specifies another variable type).

Other words are explained where used if their meaning is not explained by context.

Punctuation

Feature Example Explanation


vertical bar | Separates alternative syntax elements that may be optional or mandatory.
brackets [OFF|ON] One or more optional items. If two items appear separated by |, enter one of the items separated
by |. Do not enter the brackets or |.
braces {OFF|ON} A choice of mandatory items; enter one of the items separated by |. Do not enter the braces or |.
underlining {OFF|ON} A default value; if you enter nothing, SQL*Plus assumes the underlined value.
ellipsis n ... Preceding item(s) may be repeated any number of times.

Enter other punctuation marks (such as parentheses) where shown in the command syntax.

Starting and Leaving SQL*Plus


Use the following commands to log in to and out of SQL*Plus.

SQLPLUS [[-S[ILENT]] [logon] [start]]|-|-?


Starts SQL*Plus from the operating system prompt.
logon Requires the following syntax:
username[/password][@database_spec]|/|/NOLOG
start Requires the following syntax:
@file_name[.ext] [arg ...]

{EXIT|QUIT} [SUCCESS|FAILURE|WARNING|n|variable|:BindVariable] [COMMIT|ROLLBACK]


Commits all pending changes, terminates SQL*Plus, and returns control to the operating system.

Entering and Executing Commands


Use the following commands to execute and collect timing statistics on SQL commands and PL/SQL blocks.

/ (slash)
Executes the SQL command or PL/SQL block currently stored in the SQL buffer. Does not list the command.

EXEC[UTE] statement
Executes a single PL/SQL statement.

R[UN]
Lists and executes the SQL command or PL/SQL block currently stored in the SQL buffer.

TIMI[NG] [START text|SHOW|STOP]


Records timing data for an elapsed period of time, lists the current timer’s name and timing data, or lists the number of active timers.

85
Use the following command to access the help system.

HELP [topic]
Accesses help on SQL*Plus commands and PL/SQL and SQL statements.

Use the following command to execute host operating system commands.

HO[ST] [command]
Executes a host operating system command without leaving SQL*Plus.

Note: With some operating systems, you can use a "$" (VMS), "!" (UNIX) or another character instead of HOST. See the Oracle
installation and user’s manual(s) provided for your operating system for details.

Manipulating SQL, SQL*Plus, and PL/SQL Commands


Use the following commands to edit SQL commands and PL/SQL blocks.

A[PPEND] text
Adds specified text to the end of the current line in the SQL buffer. To separate text from the preceding characters with a space, enter
two spaces between APPEND and text. To append text that ends with a semicolon, end the command with two semicolons (SQL*Plus
interprets a single semicolon as a command terminator).

C[HANGE] sepchar old [sepchar [new [sepchar]]]


Changes text on the current line in the SQL buffer. You can use any non-alphanumeric character such as "/" or "!" as a sepchar. You
can omit the space between CHANGE and the first sepchar.

DEL [n|n m|n *|n LAST|*|* n|* LAST|LAST]


Deletes one or more lines of the buffer ("*" indicates the current line). You can omit the space between DEL and n or *, but not
between DEL and LAST. Enter DEL with no clauses to delete the current line of buffer.

I[NPUT] [text]
Adds one or more new lines of text after the current line in the buffer.

L[IST] [n|n m|n *|n LAST|*|* n|* LAST|LAST]


Lists one or more lines of the buffer ("*" indicates the current line). You can omit the space between LIST and n or *, but not between
LIST and LAST. Enter LIST with no clauses to list all lines.

Use the following commands to create and modify command files.

@ file_name[.ext] [arg ...]


Runs the specified command file. Specified arguments are substituted for &1, &2, and so on.

@@ file_name[.ext]
Runs the specified nested command file.

ED[IT] [file_name[.ext]]
Invokes a host operating system text editor on the contents of the specified file or on the contents of the SQL buffer. To edit the buffer
contents, omit the file name.

GET file_name[.ext] [LIS[T]|NOL[IST]]


Loads a host operating system file into the SQL buffer.

REM[ARK]
Begins a comment in a command file. The REMARK command must appear at the beginning of a line, and the comment ends at the
end of the line (a line cannot contain both a comment and a command). SQL*Plus does not interpret the comment as a command.

SAV[E] file_name[.ext] [CRE[ATE]|REP[LACE]|APP[END]]


Saves contents of the buffer into a host operating system file (a command file).

STORE {SET} file_name[.ext] [CRE[ATE]|REP[LACE]|APP[END]]


Saves the attributes of the current SQL*Plus environment in a host operating system file (a command file).

STA[RT] file_name[.ext] [arg ...]


Executes the contents of the specified command file. Specified arguments are substituted for &1, &2, and so on.

WHENEVER OSERROR {EXIT [SUCCESS|FAILURE|n|variable|:BindVariable]


[COMMIT|ROLLBACK]|CONTINUE [COMMIT|ROLLBACK|NONE]}
Exits SQL*Plus if an operating system error occurs (such as a file I/O error).

86
WHENEVER SQLERROR {EXIT [SUCCESS|FAILURE|WARNING|n|variable| :BindVariable]
[COMMIT|ROLLBACK]|CONTINUE [COMMIT|ROLLBACK|NONE]}
Exits SQL*Plus if a SQL command or PL/SQL block generates an error.

Use the following commands to write interactive commands.

ACC[EPT] variable [NUM[BER]|CHAR|DATE] [FOR[MAT] format] [DEF[AULT]


default] [PROMPT text|NOPR[OMPT]] [HIDE]
Reads a line of input and stores it in a given user variable.

DEF[INE] [variable]|[variable = text]


Specifies a user variable and assigns it a CHAR value. Alternatively, lists the value and variable type of a single variable or all
variables.

PAU[SE] [text]
Displays an empty line followed by a line containing text, then waits for the user to press [Return]. Alternatively, displays two empty
lines and waits for the user’s response.

PROMPT [text]
Sends the specified message or a blank line to the user’s screen.

UNDEF[INE] variable ...


Deletes given user variables that you defined either explicitly (with the DEFINE command) or implicitly (with an argument to the
START command).

Use the following commands to create and display bind variables.

PRI[NT] [variable ...]


Displays the current values of bind variables.

VAR[IABLE] [variable {NUMBER|CHAR|CHAR (n)|NCHAR|NCHAR (n)|VARCHAR2 (n)|


NVARCHAR2 (n)|CLOB|NCLOB|REFCURSOR}]
Declares a bind variable which can then be referenced in PL/SQL. If no arguments are supplied, VARIABLE lists all declared bind
variables.

Use the following symbols to create substitution variables and parameters for use in command files.

&n Specifies a parameter in a command file you run using the START
command. START substitutes values you list after the command file
name as follows: the first for &1, the second for &2, etc.
&user_variable, &&user_variable Indicates a substitution variable in a SQL or SQL*Plus command.
SQL*Plus substitutes the value of the specified user variable for each
substitution variable it encounters. If the user variable is undefined,
SQL*Plus prompts you for a value each time an "&" variable is found,
and the first time an "&&" variable is found.
. (period) Terminates a substitution variable followed by a character that would
otherwise be part of the variable name.

Formatting Query Results


Use the following commands to format, store and print your query results.

ATTRIBUTE [type_name.attribute_name [option...]]


Specifies display attributes for a given column, or lists the current display attributes for a single column or for all columns;

option represents one of the following clauses:


ALI[AS] alias
CLE[AR]
FOR[MAT] format
LIKE {type_name.attribute_name|alias}
ON|OFF

BRE[AK] [ON report_element [action [action]]] ...


Specifies where and how formatting will change in a report (for example, skipping a line each time a given column value changes).
Enter BREAK with no clauses to list the current BREAK definition.
report_ element Requires the following syntax:
{column|expr|ROW|REPORT}
action Requires the following syntax:
[SKI[P] n|[SKI[P]] PAGE] [NODUP[LICATES]| DUP[LICATES]]

87
BTI[TLE] [printspec [text|variable] ...]|[OFF|ON]
Places and formats the specified title at the bottom of each report page, or lists the current BTITLE definition. See TTITLE for
additional information on valid printspec clauses.

CL[EAR] option ...


Resets or erases the current value or setting for the specified option;
option represents one of the following clauses:
BRE[AKS]
BUFF[ER]
COL[UMNS]
COMP[UTES]
SCR[EEN]
SQL
TIMI[NG]

COL[UMN] [{column|expr} [option ...]]


Specifies the display attributes for a given column, such as text for the column heading, or formats for CHAR, NCHAR,
VARCHAR2 (VARCHAR), NVARCHAR2 (NCHAR VARYING), LONG, CLOB, NCLOB and NUMBER data;
option represents one of the following clauses:
ALI[AS] alias
CLE[AR]
FOLD_A[FTER]
FOLD_B[EFORE]
FOR[MAT] format
HEA[DING] text
JUS[TIFY] {L[EFT]|C[ENTER]|C[ENTRE]|R[IGHT]}
LIKE {expr|alias} NEWL[INE] NEW_V[ALUE] variable NOPRI[NT]|PRI[NT] NUL[L] text OLD_V[ALUE]
variable ON|OFF
WRA[PPED]|WOR[D_WRAPPED]|TRU[NCATED]

Enter COLUMN followed by column or expr and no other clauses to list the current display attributes for only the specified column or
expression. Enter COLUMN with no clauses to list all current column display attributes.

Enter FORMAT followed by the appropriate format element to specify the display format for the column. To change the width of a
datatype or Trusted Oracle column to n, use FORMAT An. (A stands for alphanumeric.)

To change the display format of a NUMBER column, use FORMAT followed by one of the elements in the following table:
Element Example(s) Description
9 9999 Number of "9"s specifies number of significant digits returned. Blanks are displayed
for leading zeroes. A zero (0) is displayed for a value of zero.
0 0999 Displays a leading zero or a value of zero in this position as a 0.
9990
$ $9999 Prefixes value with dollar sign.
B B9999 Displays a zero value as blank, regardless of "0"s in the format model.
MI 9999MI Displays "-" after a negative value. For a positive value, a trailing space is displayed.
S S9999 Returns "+" for positive values and "-" for negative values in this position.
PR 9999PR Displays a negative value in <angle brackets>. For a positive value, a leading and
trailing space is displayed.
D 99D99 Displays the decimal character in this position, separating the integral and fractional
parts of a number.
G 9G999 Displays the group separator in this position.
C C999 Displays the ISO currency symbol in this position.
L L999 Displays the local currency symbol in this position.
, (comma) 9,999 Displays a comma in this position.
. (period) 99.99 Displays a period (decimal point) in this position, separating the integral and
fractional parts of a number.
V 999V99 Multiplies value by 10n, where n is the number of "9’s" after the "V."
EEEE 9.999EEEE Displays value in scientific notation (format must contain exactly four "E’s").
RN or rn RN Displays upper- or lowercase Roman numerals. Value can be an integer between 1
and 3999.
DATE DATE Displays value as a date in MM/DD/YY format; used to format NUMBER columns
that represent Julian dates.

COMP[UTE] [function [LAB[EL] text] ...


OF {expr|column|alias} ...
ON {expr|column|alias|REPORT|ROW} ...]

88
Calculates and prints summary lines, using various standard computations, on subsets of selected rows. Or, lists all COMPUTE
definitions. The following table lists valid functions. All functions except NUMBER apply to non-null values only.
Function Computes Applies to Datatypes
AVG Average of non-null values NUMBER
COU[NT] Count of non-null values All types
MAX[IMUM] Maximum value NUMBER, CHAR, NCHAR, VARCHAR2 (VARCHAR),
NVARCHAR2 (NCHAR VARYING)
MIN[IMUM] Minimum value NUMBER, CHAR, NCHAR, VARCHAR2 (VARCHAR),
NVARCHAR2 (NCHAR VARYING)
NUM[BER] Count of rows All types
STD Standard deviation of non-null values NUMBER
SUM Sum of non-null values NUMBER
VAR[IANCE] Variance of non-null values NUMBER

REPF[OOTER] [PAGE] [printspec [text|variable] ...] | [OFF|ON]


Places and formats a specified report footer at the bottom of each report, or lists the current REPFOOTER definition. See
REPHEADER for additional information on valid printspec clauses.

REPH[EADER] [PAGE] [printspec [text|variable] ...] | [OFF|ON]


Places and formats a specified report header at the top of each report, or lists the current REPHEADER definition. Use one of the
following clauses in place of printspec:
COL n
S[KIP] [n]
TAB n
LE[FT]
CE[NTER]
R[IGHT]
BOLD
FORMAT text

SPO[OL] [filename[.ext]|OFF|OUT]
Stores query results in an operating system file and, optionally, sends the file to a printer. OFF stops spooling. OUT stops spooling
and sends the file to your host computer’s standard (default) printer. Enter SPOOL with no clauses to list the current spooling status.

TTI[TLE] [printspec [text|variable] ...]|[OFF|ON]


Places and formats a specified title at the top of each report page, or lists the current TTITLE definition. Use one of the following
clauses in place of printspec:
COL n
S[KIP] [n]
TAB n
LE[FT]
CE[NTER]
R[IGHT]
BOLD
FORMAT text

Accessing Databases
Use the following commands to access and copy data between tables on different databases.

CONN[ECT] [username[/password][@database_spec]|/]
Connects a given username to Oracle. If you omit database_spec, connects you to the default database. If you omit username and/or
password, SQL*Plus prompts for them. CONNECT followed by a slash (/) connects you using a default (ops$) logon.

DISC[ONNECT]
Commits pending changes to the database and logs the current username off Oracle, but does not exit SQL*Plus.

COPY {FROM username[/password]@database_spec|


TO username[/password]@database_spec|
FROM username[/password]@database_spec
TO username[/password]@database_spec}
{APPEND|CREATE|INSERT|REPLACE} destination_table [(column,
column ...)]
USING query
Copies data from one Oracle database to a table in another. APPEND, CREATE, INSERT, or REPLACE specifies how COPY treats
the existing copy of the destination table (if it exists). USING query identifies the source table and determines which rows and
columns COPY copies from it.

89
PASSW[ORD] [username]
Allows you to change password without echoing the password on an input device.

Miscellaneous

DESC[RIBE] [schema.]object[@database_link_name]
Lists the column definitions for the specified table, view, or synonym or the specifications for the specified function or procedure.

SET system_variable value


Sets a system variable to alter the SQL*Plus environment for your current session, such as setting the display width for NUMBER
data or the number of lines per page. Enter a system variable followed by a value as shown below:
APPI[NFO]{ON|OFF|text}
ARRAY[SIZE] {20|n}
AUTO[COMMIT] {OFF|ON|IMM[EDIATE]|n}
AUTOP[RINT] {OFF|ON}
AUTOT[RACE] {OFF|ON|TRACE[ONLY]} [EXP[LAIN]] [STAT[ISTICS]]
BLO[CKTERMINATOR] {.|c}
CMDS[EP] {;|c|OFF|ON}
COLSEP {_|text)
COM[PATIBILITY] {V7|V8|NATIVE]
CON[CAT] {.|c|OFF|ON}
COPYC[OMMIT] {0|n}
COPYTYPECHECK {OFF|ON}
DEF[INE] {’&’|c|OFF|ON}
ECHO {OFF|ON}
EDITF[ILE] file_name[.ext]
EMB[EDDED] {OFF|ON}
ESC[APE] {\|c|OFF|ON}
FEED[BACK] {6|n|OFF|ON}
FLAGGER {OFF|ENTRY|INTERMED[IATE]|FULL}
FLU[SH] {OFF|ON}
HEA[DING] {OFF|ON}
HEADS[EP] {||c|OFF|ON}
LIN[ESIZE] [80|n]
LOBOF[FSET] {n|1}
LONG {80|n}
LONGC[HUNKSIZE] [80|n]
NEWP[AGE] {1|n|NONE}
NULL text
NUMF[ORMAT] format
NUM[WIDTH] {10|n}
PAGES[IZE] {24|n}
PAU[SE] {OFF|ON|text}
RECSEP {WR[APPED]|EA[CH]|OFF}
RECSEPCHAR { |c}
SERVEROUT[PUT] {OFF|ON} [SIZE n] [FOR[MAT] {WRA[PPED]|WOR[D_WRAPPED]|TRU[NCATED]}]
SHOW[MODE] {OFF|ON}
SHIFT[INOUT] {VIS[IBLE]|INV[ISIBLE]}
SQLC[ASE] {MIX[ED]|LO[WER]|UP[PER]}
SQLCO[NTINUE] {> |text}
SQLN[UMBER] {OFF|ON}
SQLPRE[FIX] {#|c}
SQLP[ROMPT] {SQL>|text}
SQLT[ERMINATOR] {;|c|OFF|ON}
SUF[FIX] {SQL|text}
TAB {OFF|ON}
TERM[OUT] {OFF|ON}
TI[ME] {OFF|ON}
TIMI[NG] {OFF|ON}
TRIM[OUT] {OFF|ON}
TRIMS[POOL] {ON|OFF}
UND[ERLINE] {-|c|ON|OFF}
VER[IFY] {OFF|ON}
WRA[P] {OFF|ON}

SHO[W] [option]
Lists the value of a SQL*Plus system variable. Use one of the following terms or clauses in place of option:
system_variable
ALL
APPI[NFO]
BTI[TLE]
ERR[ORS] [{FUNCTION|PROCEDURE|PACKAGE|PACKAGE BODY|TRIGGER|VIEW|TYPE|TYPE BODY}

90
[schema.]name]
LABEL
LNO
PNO
REL[EASE]
REPF[OOTER]
REPH[EADER]
SPOO[L]
SQLCODE
TTI[TLE]
USER
Enter any system variable set by the SET command in place of system_variable.

Database Initialization Parameters

Initialization Parameters Alterable with ALTER SESSION


ALLOW_PARTIAL_SN_RESULTS B_TREE_BITMAP_PLANS
CLOSE_CACHED_OPEN_CURSORS COMPLEX_VIEW_MERGING
DB_FILE_MULTIBLOCK_READ_COUNT GLOBAL_NAMES
HASH_AREA_SIZE HASH_JOIN_ENABLED
HASH_MULTIBLOCK_IO_COUNT JOB_QUEUE_PROCESSES
MAX_DUMP_FILE_SIZE NLS_CURRENCY
NLS_CALENDAR NLS_DATE_FORMAT
NLS_DATE_LANGUAGE NLS_ISO_CURRENCY
NLS_LANGUAGE NLS_NUMERIC_CHARACTERS
NLS_SORT NLS_TERRITORY
OBJECT_CACHE_MAX_SIZE_PERCENT OBJECT_CACHE_OPTIMAL_SIZE
OPS_ADMIN_GROUP OPTIMIZER_MODE
OPTIMIZER_PERCENT_PARALLEL OPTIMIZER_SEARCH_LIMIT
PARALLEL_INSTANCE_GROUP PARALLEL_MIN_PERCENT
PARTITION_VIEW_ENABLED PLSQLV2_COMPATIBILITY
REMOTE_DEPENDENCIES_MODE PUSH_JOIN_PREDICATE
PARALLEL_ADAPTIVE_MULTI_USER SESSION_CACHED_CURSORS
SORT_AREA_RETAINED_SIZE SORT_AREA_SIZE
SORT_DIRECT_WRITES SORT_READ_FAC
SORT_WRITE_BUFFER_SIZE SORT_WRITE_BUFFERS
SPIN_COUNT STAR_TRANSFORMATION_ENABLED
TEXT_ENABLE TIMED_STATISTICS

Initialization Parameters Alterable with ALTER SYSTEM


AQ_TM_PROCESSES BACKGROUND_DUMP_DEST
CONTROL_FILE_RECOR_KEEP_TIME CORE_DUMP_DEST
DB_BLOCK_CHECKPOINT_BATCH DB_BLOCK_CHECKSUM
DB_BLOCK_MAX_DIRT_TARGET DB_FILE_MULTIBLOCK_READ_COUNT
FIXED_DATE FREEZE_DB_FOR_FAST_INSTANC_RECOVERY
GC_DEFER_TIME GLOBAL_NAMES
HASH_MULTIBLOCK_I_COUNT JOB_QUEUE_PROCESSES
LICENSE_MAX_SESSIONS LICENSE_MAX_USERS
LICENSE_SESSION_WARNING LOG_ARCHIVE_DUPLEX_DEST
LOG_ARCHIVE_MI_SUCCEED_DEST LOG_CHECKPOINT_INTERVAL
LOG_CHECKPOINT_TIMEOUT LOG_SMALL_ENTRY_MAX_SIZE
MAX_DUMP_FILE_SIZE MTS_DISPATCHERS
MTS_SERVERS OPS_ADMIN_GROUP
PARALLEL_INSTANC_GROUP PARALLEL_TRANSACTIO_RESOURCE_TIMEOUT
PLSQL_V2_COMPATIBILITY REMOTE_DEPENDENCIES_MODE
RESOURCE_LIMIT SPIN_COUNT
TEXT_ENABLE TIMED_OS_STATISTICS
TIMED_STATISTICS USER_DUMP_DEST

Initialization Parameters Alterable with ALTER SYSTEM DEFERRED

ALLOW_PARTIAL_SN_RESULTS BACKUP_DISK_IO_SLAVES
BACKUP_TAPE_IO_SLAVES DB_FILE_DIRECT_IO_COUNT

91
OBJECT_CACHE_MAX_SIZ_PERCENT OBJECT_CACHE_OPTIMAL_SIZE
SORT_AREA_RETAINED_SIZE SORT_AREA_SIZE
SORT_DIRECT_WRITES SORT_READ_FAC
SORT_WRITE_BUFFER_SIZE SORT_WRITE_BUFFERS
TRANSACTION_AUDITING

Initialization Parameters
O7_DICTIONARY_ACCESSIBILITY TRUE, FALSE
ALLOW_PARTIAL_SN_RESULTS TRUE, FALSE
ALWAYS_ANTI_JOIN NESTED_LOOPS/MERGE/HASH
ALWAYS_SEMI_JOIN NESTED_LOOPS/MERGE/HASH_SJ
AQ_TM_PROCESSES 0-10
ARCH_IO_SLAVES 0 - 15
AUDIT_FILE_DEST $ORACLE_HOME/RDBMS/AUDIT (default)
AUDIT_TRAIL NONE (FALSE), DB (TRUE), OS
B_TREE_BITMAP_PLANS TRUE/FALSE
BACKGROUND_CORE_DUMP FULL/PARTIAL
BACKGROUND_DUMP_DEST valid local pathname, directory, or disk
BACKUP_DISK_IO_SLAVES 0 - 15 although a value under 7 is recommended
BACKUP_TAPE_IO_SLAVES TRUE/FALSE
BITMAP_MERGE_AREA_SIZE system-dependent value
BLANK_TRIMMING TRUE/FALSE
BUFFER_POOL_KEEP none (default)
BUFFER_POOL_RECYCLE none (default)
CACHE_SIZE_THRESHOLD 0.1*DB_BLOCK_BUFFERS (default)
CLEANUP_ROLLBACK_ENTRIES 20 (default)
CLOSE_CACHED_OPEN_CURSORS TRUE/FALSE
COMMIT_POINT_STRENGTH 0 - 255
COMPATIBLE default release to current release
COMPATIBLE_NO_RECOVERY default version to current version
COMPLEX_VIEW_MERGING TRUE/FALSE
CONTROL_FILE_RECORD_KEEP_TIME 0 - 365 (days)
CONTROL_FILES 1 - 8 filenames
CORE_DUMP_DEST $ORACLE_HOME/DBS/ (default)
CPU_COUNT 0 - unlimited
CREATE_BITMAP_AREA_SIZE operating system-dependent
CURSOR_SPACE_FOR_TIME TRUE/FALSE
DB_BLOCK_BUFFERS 4 - operating system-specific
DB_BLOCK_CHECKPOINT_BATCH 0 - derived
DB_BLOCK_CHECKSUM TRUE/FALSE
DB_BLOCK_LRU_EXTENDED_STATISTICS 0 - dependent on system memory capacity
DB_BLOCK_LRU_LATCHES 1 - the number of CPUs
DB_BLOCK_LRU_STATISTICS TRUE/FALSE
DB_BLOCK_MAX_DIRTY_TARGET 100 to all buffers in the cache, setting to 0 disables incremental
checkpoint buffer writes
DB_BLOCK_SIZE operating system-dependent (2048 - 32768)
DB_DOMAIN any legal string of name components, separated by periods and
up to 128 characters long, including periods (see valid characters
below) -this value cannot be NULL
DB_FILES minimum value: either the value that was specified in the
MAXDATAFILES clause the last time CREATE DATABASE
or CREATE CONTROLFILE was executed, or the current actual
number of datafiles in the data.
maximum value: operating system-dependent
DB_FILE_DIRECT_IO_COUNT operating system-dependent
DB_FILE_MULTIBLOCK_READ_COUNT operating system-dependent
DB_FILE_NAME_CONVERT character string
DB_FILE_SIMULTANEOUS_WRITES minimum: 1
maximum: when striping used: 4 times the number of disks in
the file that is striped the most.
when striping not used: 4
DB_NAME any valid database name
DB_WRITER_PROCESSES 1-10
DBLINK_ENCRYPT_LOGIN TRUE/FALSE

92
DBWR_IO_SLAVES 0 to system-dependent value
DELAYED_LOGGING_BLOCK_CLEANOUTS TRUE/FALSE
DISCRETE_TRANSACTIONS_ENABLED TRUE/FALSE
DISK_ASYNCH_IO TRUE, FALSE
DISTRIBUTED_LOCK_TIMEOUT 1 - unlimited
DISTRIBUTED_RECOVERY_CONNECTION_HOLD_TIME 0 - 1800 seconds
DISTRIBUTED_TRANSACTIONS 0 - TRANSACTIONS
DML_LOCKS 20 - unlimited, 0
ENQUEUE_RESOURCES 10 - unlimited
EVENT NULL (default)
FAST_FULL_SCAN_ENABLED TRUE, FALSE
FIXED_DATE NULL (default)
FREEZE_DB_FOR_FAST_INSTANCE_RECOVERY TRUE, FALSE
GC_DEFER_TIME any positive integer
GC_FILES_TO_LOCK NULL (default)
GC_LATCHES derived (default)
GC_LCK_PROCS 1 - 10, or 0 for a single instance running in exclusive mode
GC_RELEASABLE_LOCKS 0 - DB_BLOCK_BUFFERS or higher
GC_ROLLBACK_LOCKS 20 (default)
GLOBAL_NAMES TRUE/FALSE
HASH_AREA_SIZE 0 - system-dependent value
HASH_JOIN_ENABLED TRUE, FALSE
HASH_MULTIBLOCK_IO_COUNT operating system dependent
HI_SHARED_MEMORY_ADDRESS 0 (default)
IFILE valid parameter filenames
INSTANCE_GROUPS a string of group names, separated by commas.
INSTANCE_NUMBER 1 - maximum number of instances specified in CREATE
DATABASE statement.
JOB_QUEUE_INTERVAL 1 - 3600 (seconds)
JOB_QUEUE_PROCESSES 0 - 36
LARGE_POOL_MIN_ALLOC minimum: 16
maximum: ~64M
LARGE_POOL_SIZE minimum: 300K or LARGE_POOL_MIN_ALLOC, whichever is
larger
maximum: at least 2GB (maximum is operating system-specific)
LGWR_IO_SLAVES 0 - system-dependent value
LICENSE_MAX_SESSIONS 0 - number of session licenses
LICENSE_MAX_USERS 0 - number of user licenses
LICENSE_SESSIONS_WARNING 0 - LICENSE_MAX_SESSIONS
LM_LOCKS minimum: 512
maximum: limited by the shared memory available in the
operating system the maximum size of contiguous shared
memory segment; otherwise, it is limited only by the address
space
LM_PROCS minimum: 36
maximum: the result of the following equation:
PROCESSES + maximum number of instances + safety factor
Note: This assumes that the PROCESSES parameter has already
included the Oracle background processes, including LMON and
LMD0. The safety factor should be added to account for
temporary overhead or unavailability of some procedure during
the clean-up of dead processes.
LM_RESS minimum: 25
maximum: limited by the shared memory available in the
operating system the maximum size of contiguous shared
memory segment; otherwise, it is limited only by the address
space
LOCAL_LISTENER (ADDRESS_LIST = (Address = (Protocol = TCP)
(Host=localhost) (Port=1521)) (Address=(Protocol = IPC) (Key=
DBname)))
LOCK_NAME_SPACE eight characters maximum, no special characters allowed
LOCK_SGA TRUE/FALSE
LOCK_SGA_AREAS 0 (default)
LOG_ARCHIVE_BUFFER_SIZE 1 - operating system-dependent (in operating system blocks)

93
LOG_ARCHIVE_BUFFERS operating system-dependent
LOG_ARCHIVE_DEST any valid path or device name, except raw partitions
LOG_ARCHIVE_DUPLEX_DEST Either a NULL string or any valid path or device name, except
raw partitions
LOG_ARCHIVE_FORMAT any valid filename
LOG_ARCHIVE_MIN_SUCCEED_DEST 1-2
LOG_ARCHIVE_START TRUE/FALSE
LOG_BLOCK_CHECKSUM TRUE/FALSE
LOG_BUFFER operating system-dependent
LOG_CHECKPOINT_INTERVAL unlimited (operating-system blocks, not database blocks)
LOG_CHECKPOINT_TIMEOUT 0 - unlimited
LOG_CHECKPOINTS_TO_ALERT TRUE/FALSE
LOG_FILE_NAME_CONVERT character strings
LOG_FILES 2 - 255 (must be a minimum of
MAXLOGFILES*MAXLOGMEMBERS)
LOG_SIMULTANEOUS_COPIES 0 - unlimited
LOG_SMALL_ENTRY_MAX_SIZE operating system-dependent
MAX_COMMIT_PROPAGATION_DELAY 0 - 90000
MAX_DUMP_FILE_SIZE 0 - UNLIMITED
MAX_ENABLED_ROLES 0 - 148
MAX_ROLLBACK_SEGMENTS 2 - 65535
MAX_TRANSACTION_BRANCHES 1 - 32
MTS_DISPATCHERS NULL (default)
MTS_LISTENER_ADDRESS NULL (default)
MTS_MAX_DISPATCHERS operating system-dependent
MTS_MAX_SERVERS operating system-dependent
MTS_MULTIPLE_LISTENERS TRUE/FALSE
MTS_RATE_LOG_SIZE DEFAULTS / EVENT_LOOPS / MESSAGES /
SERVER_BUFFERS / CLIENT_BUFFERS /
TOTAL_BUFFERS / IONNECTS / OUT_CONNECTS /
RECONNECTS
MTS_RATE_SCALE DEFAULTS / EVENT_LOOPS / MESSAGES /
SERVER_BUFFERS / CLIENT_BUFFERS /
TOTAL_BUFFERS / IONNECTS / OUT_CONNECTS /
RECONNECTS
MTS_SERVERS operating system-dependent
MTS_SERVICE NULL (default)
NLS_CALENDAR any valid calendar format name
NLS_CURRENCY any valid character string, with a maximum of 10 bytes (not
including null)
NLS_DATE_FORMAT any valid date format mask but not exceeding a fixed length
NLS_DATE_LANGUAGE any valid NLS_LANGUAGE value
NLS_ISO_CURRENCY any valid NLS_TERRITORY value
NLS_LANGUAGE any valid language name
NLS_NUMERIC_CHARACTERS derived (default)
NLS_SORT BINARY or valid linguistic definition name
NLS_TERRITORY any valid territory name
OBJECT_CACHE_MAX_SIZE_PERCENT 0% to operating system-dependent maximum
OBJECT_CACHE_OPTIMAL_SIZE 10 Kbytes to operating system-dependent maximum
OGMS_HOME valid local pathname or directory
OPEN_CURSORS 1 - operating system limit
OPEN_LINKS 0 - 255
OPEN_LINKS_PER_INSTANCE 0 - UB4MAXVAL
OPS_ADMIN_GROUP a string representing a group name.
OPTIMIZER_FEATURES_ENABLE 8.0.0; 8.0.3; 8.0.4
OPTIMIZER_MODE RULE/CHOOSE/FIRST_ROWS/ALL_ROWS
OPTIMIZER_PERCENT_PARALLEL 0 - 100
OPTIMIZER_SEARCH_LIMIT 5 (default)
ORACLE_TRACE_COLLECTION_NAME valid collection name up to 16 characters long
ORACLE_TRACE_COLLECTION_PATH full directory pathname
ORACLE_TRACE_COLLECTION_SIZE 0 - 4294967295
ORACLE_TRACE_ENABLE TRUE, FALSE
ORACLE_TRACE_FACILITY_NAME valid product definition filename up to 16 characters long
ORACLE_TRACE_FACILITY_PATH full directory pathname

94
OS_AUTHENT_PREFIX operating system-specific (typically "OPS$")
OS_ROLES TRUE/FALSE
PARALLEL_ADAPTIVE_MULTI_USER TRUE, FALSE
PARALLEL_BROADCAST_ENABLED TRUE-FALSE
PARALLEL_DEFAULT_MAX_INSTANCES 0 - number of instances
PARALLEL_EXECUTION_MESSAGE_SIZE larger than 2148 bytes
PARALLEL_INSTANCE_GROUP a string representing a group name
PARALLEL_MAX_SERVERS 0 - 256
PARALLEL_MIN_MESSAGE_POOL 0 -(SHARED_POOLSIZE*.90)
PARALLEL_MIN_PERCENT 0 - 100
PARALLEL_MIN_SERVERS 0 - PARALLEL_MAX_SERVERS
PARALLEL_SERVER TRUE/FALSE
PARALLEL_SERVER_IDLE_TIME 0 to the OS-dependent maximum
PARALLEL_TRANSACTION_RESOURCE_TIMEOUT 0 to the OS-dependent maximum
PARTITION_VIEW_ENABLED TRUE/FALSE
PLSQL_V2_COMPATIBILITY TRUE/FALSE
PRE_PAGE_SGA FALSE/TRUE
PROCESSES 6 to operating system-dependent
PUSH_JOIN_PREDICATE TRUE, FALSE
READ_ONLY_OPEN_DELAYED TRUE-FALSE
RECOVERY_PARALLELISM operating system-dependent, but cannot exceed
PARALLEL_MAX_SERVERS
REDUCE_ALARM TRUE/FALSE
REMOTE_DEPENDENCIES_MODE TIMESTAMP/SIGNATURE
REMOTE_LOGIN_PASSWORDFILE NONE/SHARED/EXCLUSIVE
REMOTE_OS_AUTHENT TRUE/FALSE
REMOTE_OS_ROLES TRUE/FALSE
REPLICATION_DEPENDENCY_TRACKING TRUE/FALSE
RESOURCE_LIMIT TRUE/FALSE
ROLLBACK_SEGMENTS any rollback segment names listed in DBA_ROLLBACK_SEGS
except SYSTEM
ROW_CACHE_CURSORS 10 - 3300
ROW_LOCKING ALWAYS/DEFAULT/INTENT
SEQUENCE_CACHE_ENTRIES 10 - 32000
SEQUENCE_CACHE_HASH_BUCKETS 7 (default)
SERIAL _REUSE DISABLE/SELECT/DML/PLSQL/ALL/NULL
SESSION_CACHED_CURSORS 0 to operating system dependent
SESSION_MAX_OPEN_FILES 1 - the least of (50, MAX_OPEN_FILES defined at the OS level)
SESSIONS derived (1.1 * PROCESSES + 5) (default)
SHADOW_CORE_DUMP FULL/PARTIAL
SHARED_MEMORY_ADDRESS 0 (default)
SHARED_POOL_RESERVED_MIN_ALLOC 5000 - SHARED_POOL_RESERVED_SIZE (in bytes)
SHARED_POOL_RESERVED_SIZE from SHARED_POOL_RESERVED_MIN_ALLOC to one half
of SHARED_POOL_SIZE (in bytes)
SHARED_POOL_SIZE 300 Kbytes - operating system-dependent
SORT_AREA_RETAINED_SIZE from the value equivalent of one database block to the value of
SORT_AREA_SIZE
SORT_AREA_SIZE 0 - system-dependent value
SORT_DIRECT_WRITES AUTO/TRUE/FALSE
SORT_READ_FAC operating system-dependent (default)
SORT_SPACEMAP_SIZE operating system-dependent (default)
SORT_WRITE_BUFFER_SIZE 32Kb, 64Kb
SORT_WRITE_BUFFERS 2-8
SPIN_COUNT 1-1,000,000
SQL_TRACE TRUE/FALSE
SQL92_SECURITY TRUE/FALSE
STAR_TRANSFORMATION_ENABLED TRUE/FALSE
TAPE_ASYNCH_IO TRUE, FALSE
TEXT_ENABLE TRUE/FALSE
TEMPORARY_TABLE_LOCKS 0 - operating system-dependent
THREAD 0 - maximum number of enabled threads
TIMED_OS_STATISTICS time in seconds
TIMED_STATISTICS TRUE/FALSE

95
TRANSACTION_AUDITING TRUE/FALSE
TRANSACTIONS derived (1.1 * SESSIONS) (default)
TRANSACTIONS_PER_ROLLBACK_SEGMENT 1 - operating system-dependent
USE_INDIRECT_DATA_BUFFERS TRUE/FALSE
USE_ISM TRUE/FALSE
USER_DUMP_DEST valid local pathname, directory, or disk
UTL_FILE_DIR any valid directory path

96
Data Dictionary Views
ALL_ALL_TABLES This view describes all of the tables (object tables and relational tables) accessible to the
user.
ALL_ARGUMENTS This view lists all of the arguments in the object which are accessible to the user.
ALL_CATALOG This view lists all tables, views, synonyms, and sequences accessible to the user.
ALL_CLUSTERS This view list all clusters accessible to the user.
ALL_COL_COMMENTS This view lists comments on columns of accessible tables and views.
ALL_COL_PRIVS This view lists grants on columns for which the user or PUBLIC is the grantee.
ALL_COL_PRIVS_MADE This view lists grants on columns for which the user is owner or grantor.
ALL_COL_PRIVS_RECD This view lists grants on columns for which the user or PUBLIC is the grantee.
ALL_COLL_TYPES This view displays the named collection types accessible to the user.
ALL_CONS_COLUMNS This view contains information about accessible columns in constraint definitions.
ALL_CONSTRAINTS This view lists constraint definitions on accessible tables.
ALL_DB_LINKS This view lists database links accessible to the user.
ALL_DEF_AUDIT_OPTS This view contains default object-auditing options that will be applied when objects are
created.
ALL_DEPENDENCIES This view lists dependencies between objects accessible to the user.
ALL_DIRECTORIES This view contains the description of all directories accessible to the user.
ALL_ERRORS This view lists current errors on all objects accessible to the user.
ALL_IND_COLUMNS This view lists columns of the indexes on accessible tables.
ALL_IND_PARTITIONS This view describes, for each index partition, the partition level partitioning information,
the storage parameters for the partition, and various partition statistics determined by
ANALYZE that the current user can access.
ALL_INDEXES This view contains descriptions of indexes on tables accessible to the user. To gather
statistics for this view, use the SQL command ANALYZE. This view supports parallel
partitioned index scans.
ALL_LABELS This is a Trusted Oracle Server view that lists system labels.
ALL_LOBS This view displays the LOBs contained in tables accessible to the user.
ALL_METHOD_PARAMS This view is a description view of method parameters of types accessible to the user.
ALL_METHOD_RESULTS This view is a description view of method results of types accessible to the user.
ALL_NESTED_TABLES This view describes the nested tables in tables accessible to the user.
ALL_OBJECT_TABLES This view contains descriptions of the object tables accessible to the user.
ALL_OBJECTS This view lists objects accessible to the user.
ALL_PART_COL_STATISTICS This view contains column statistics and histogram information for table partitions that
the current user can access.
ALL_PART_HISTOGRAMS This view contains the histogram data (end-points per histogram) for histograms on table
partitions that the current user can access.
ALL_PART_INDEXES This view lists the object level partitioning information for all partitioned indexes that the
current user can access.
ALL_PART_KEY_COLUMNS This view describes the partitioning key columns for partitioned objects that the current
user access.
ALL_PART_TABLES This view lists the object level partitioning information for partitioned tables the current
user access.
ALL_REFRESH This view lists all the refresh groups that the user can access.
ALL_REFRESH_CHILDREN This view lists all the objects in refresh groups, where the user can access the group.
ALL_REFS This view describes the REF columns and REF attributes in object type columns
accessible to the user.
ALL_REGISTERED_SNAPSHOTS This view lists all registered snapshots.
ALL_REPCATLOG This view is used with Advanced Replication..
ALL_REPCOLUMN This view is used with Advanced Replication.
ALL_REPCOLUMN_GROUP This view is used with Advanced Replication..
ALL_REPCONFLICT This view is used with Advanced Replication..
ALL_REPDDL This view is used with Advanced Replication..
ALL_REPGENERATED This view is used with Advanced Replication..
ALL_REPGROUP This view is used with Advanced Replication..
ALL_REPGROUPED_COLUMN This view is used with Advanced Replication..
ALL_REPKEY_COLUMNS This view is used with Advanced Replication..
ALL_REPOBJECT This view is used with Advanced Replication..
ALL_REPPARAMETER_COLUMN This view is used with Advanced Replication..
ALL_REPPRIORITY This view is used with Advanced Replication..
ALL_REPPRIORITY_GROUP This view is used with Advanced Replication..
ALL_REPPROP This view is used with Advanced Replication..
ALL_REPRESOLUTION This view is used with Advanced Replication..

97
ALL_REPRESOL_STATS_CONTROL This view is used with Advanced Replication..
ALL_REPRESOLUTION_METHOD This view is used with Advanced Replication..
ALL_REPRESOLUTION_STATISTICS This view is used with Advanced Replication..
ALL_REPSITES This view is used with Advanced Replication..
ALL_SEQUENCES This view lists descriptions of sequences accessible to the user.
ALL_SNAPSHOT_LOGS This view lists all snapshot logs.
ALL_SNAPSHOT_REFRESH_TIMES This view lists snapshot refresh times.
ALL_SNAPSHOTS This view lists all snapshots accessible to the user.
ALL_SOURCE This view lists the text source of all stored objects accessible to the user.
ALL_SYNONYMS This view lists all synonyms accessible to the user.
ALL_TAB_COL_STATISTICS This view contains column statistics and histogram information which is in the
USER_TAB_COLUMNS view.
ALL_TAB_COLUMNS This view lists the columns of all tables, views, and clusters accessible to the user. To
gather statistics for this view, use the SQL command ANALYZE.
ALL_TAB_COMMENTS This view lists comments on tables and views accessible to the user.
ALL_TAB_HISTOGRAMS This view lists histograms on tables and views accessible to the user.
ALL_TAB_PARTITIONS This view describes, for each table partition, the partition level partitioning information,
the storage parameters for the partition, and various partition statistics determined by
ANALYZE that the current user can access.
ALL_TAB_PRIVS This view lists the grants on objects for which the user or PUBLIC is the grantee.
ALL_TAB_PRIVS_MADE This view lists the user’s grants and grants on the user’s objects.
ALL_TAB_PRIVS_RECD This view lists grants on objects for which the user or PUBLIC is the grantee.
ALL_TABLES This view contains descriptions of relational tables accessible to the user. To gather
statistics for this view, use the SQL command ANALYZE.
ALL_TRIGGERS This view lists trigger information for triggers owned by the user, triggers on tables owned
by the user, or all triggers if the user has the CREATE ANY TRIGGER privilege.
ALL_TRIGGER_COLS This view displays the usage of columns in triggers owned by user, on tables owned by
user, or on all triggers if the user has the CREATE ANY TRIGGER privilege.
ALL_TYPE_ATTRS This view displays the attributes of types accessible to the user.
ALL_TYPE_METHODS This view is a description of methods of types accessible to the user.
ALL_TYPES This view displays the types accessible to the user.
ALL_UPDATABLE_COLUMNS This view contains a description of all columns that are updatable in a join view.
ALL_USERS This view contains information about all users of the database.
ALL_VIEWS This view lists the text of views accessible to the user.
AUDIT_ACTIONS This view contains descriptions for audit trail action type codes.
CAT This is a synonym for USER_CATALOG. For more information, see
"USER_CATALOG" on page 2-130.
CHAINED_ROWS This view is the default table for the ANALYZE LIST CHAINED ROWS command.
CLU This is a synonym for USER_CLUSTERS..
CODE_PIECES This view is accessed to create the DBA_OBJECT_SIZE and USER_OBJECT_SIZE
views.
CODE_SIZE This view is accessed to create the DBA_OBJECT_SIZE and USER_OBJECT_SIZE
views.
COLS This is a synonym for USER_TAB_COLUMNS.
DBA_2PC_NEIGHBORS This view contains information about incoming and outgoing connections for pending
transactions.
DBA_2PC_PENDING This view contains information about distributed transactions awaiting recovery.
DBA_ALL_TABLES This view displays descriptions of all tables (object tables and relational tables) in the
database.
DBA_AUDIT_EXISTS This view lists audit trail entries produced by AUDIT NOT EXISTS and AUDIT EXISTS.
DBA_AUDIT_OBJECT This view contains audit trail records for all objects in the system.
DBA_AUDIT_SESSION This view lists all audit trail records concerning CONNECT and DISCONNECT.
DBA_AUDIT_STATEMENT This view lists audit trail records concerning GRANT, REVOKE, AUDIT, NOAUDIT,
and ALTER SYSTEM statements.
DBA_AUDIT_TRAIL This view lists all audit trail entries.
DBA_BLOCKERS This view lists all sessions that have someone waiting on a lock they hold that are not
themselves waiting on a lock.
DBA_CATALOG This view lists all database tables, views, synonyms, and sequences.
DBA_CLU_COLUMNS This view lists mappings of table columns to cluster columns.
DBA_CLUSTERS This view contains description of all clusters in the database.
DBA_COL_COMMENTS This view lists comments on columns of all tables and views.
DBA_COL_PRIVS This view lists all grants on columns in the database.
DBA_COLL_TYPES This view displays all named collection types in the database such as VARRAYs, nested
tables, object tables, and so on.

98
DBA_CONSTRAINTS This view contains constraint definitions on all tables.
DBA_CONS_COLUMNS This view contains information about accessible columns in constraint definitions.
DBA_DATA_FILES This view contains information about database files.
DBA_DB_LINKS This view lists all database links in the database.
DBA_DDL_LOCKS This view lists all DDL locks held in the database and all outstanding requests for a DDL
lock.
DBA_DEPENDENCIES This view lists dependencies to and from objects.
DBA_DIRECTORIES This view provides information on all directory objects in the database.
DBA_DML_LOCKS This view lists all DML locks held in the database and all outstanding requests for a DML
lock.
DBA_ERRORS This view lists current errors on all stored objects in the database.
DBA_EXP_FILES This view contains a description of export files.
DBA_EXP_OBJECTS This view lists objects that have been incrementally exported.
DBA_EXP_VERSION This view contains the version number of the last export session.
DBA_EXTENTS This view lists the extents comprising all segments in the database.
DBA_FREE_SPACE This view lists the free extents in all tablespaces.
DBA_FREE_SPACE_COALESCED This view contains statistics on coalesced space in tablespaces.
DBA_INDEXES This view contains descriptions for all indexes in the database. To gather statistics for this
view, use the SQL command ANALYZE. This view supports parallel partitioned index
scans.
DBA_IND_COLUMNS This view contains descriptions of the columns comprising the indexes on all tables and
clusters.
DBA_IND_PARTITIONS This view describes, for each index partition, the partition level partitioning information,
the storage parameters for the partition, and various partition statistics determined by
ANALYZE.
DBA_JOBS This view lists all jobs in the database.
DBA_JOBS_RUNNING This view lists all jobs in the database that are currently running.
DBA_LIBRARIES This view lists all the libraries in the database.
DBA_LOBS This view displays the LOBs contained in all tables.
DBA_LOCKS This view lists all locks or latches held in the database, and all outstanding requests for a
lock or latch.
DBA_METHOD_PARAMS This view is a description of method parameters of types in the database.
DBA_METHOD_RESULTS This view is a description of method results of all types in the database.
DBA_NESTED_TABLES This view displays descriptions of the nested tables contained in all tables.
DBA_OBJECT_SIZE This view lists the sizes, in bytes, of various PL/SQL objects.
DBA_OBJECT_TABLES This view displays descriptions of all object tables in the database.
DBA_OBJECTS This view lists all objects in the database.
DBA_OBJ_AUDIT_OPTS This view lists auditing options for all tables and views.
DBA_PART_COL_STATISTICS This view contains column statistics and histogram information for all table partitions.
DBA_PART_HISTOGRAMS This view contains the histogram data (end-points per histogram) for histograms on all
table partitions.
DBA_PART_INDEXES This view lists the object level partitioning information for all partitioned indexes.
DBA_PART_KEY_COLUMNS This view describes the partitioning key columns for all partitioned objects.
DBA_PART_TABLES This view lists the object level partitioning information for all the partitioned tables.
DBA_PRIV_AUDIT_OPTS This view describes current system privileges being audited across the system and by
user.
DBA_PROFILES This view displays all profiles and their limits.
DBA_QUEUE_SCHEDULES This view describes the current schedules for propagating messages.
DBA_ QUEUE_TABLES This view describes the names and types of the queues in all of the queue tables created in
the database.
DBA_ QUEUES This view describes the operational characteristics for every queue in a database.
DBA_RCHILD This view lists all the children in any refresh group.
DBA_REFRESH This view lists all the refresh groups.
DBA_REFRESH_CHILDREN This view lists all of the objects in refresh groups.
DBA_REFS This view describes the REF columns and REF attributes in object type columns of all the
tables in the database.
DBA_REGISTERED_SNAPSHOT_GROUPS This view lists all the snapshot repgroups at this site.
DBA_REGISTERED_SNAPSHOTS This view is used to get information about remote snapshots of local tables.
DBA_REPCATLOG This view is used with Advanced Replication.
DBA_REPCOLUMN This view is used with Advanced Replication.
DBA_REPCOLUMN_GROUP This view is used with Advanced Replication.
DBA_REPCONFLICT This view is used with Advanced Replication.
DBA_REPDDL This view is used with Advanced Replication.
DBA_REPGENERATED This view is used with Advanced Replication.

99
DBA_REPGROUP This view is used with Advanced Replication.
DBA_REPGROUPED_COLUMN This view is used with Advanced Replication.
DBA_REPKEY_COLUMNS This view is used with Advanced Replication.
DBA_REPOBJECT This view is used with Advanced Replication.
DBA_REPPARAMETER_COLUMN This view is used with Advanced Replication.
DBA_REPPRIORITY This view is used with Advanced Replication.
DBA_REPPRIORITY_GROUP This view is used with Advanced Replication.
DBA_REPPROP This view is used with Advanced Replication.
DBA_REPRESOLUTION This view is used with Advanced Replication.
DBA_REPRESOLUTION_METHOD This view is used with Advanced Replication.
DBA_REPRESOL_STATS_CONTROL This view is used with Advanced Replication.
DBA_REPSITES This view is used with Advanced Replication.
DBA_RGROUP This view lists all refresh groups.
DBA_ROLES This view lists all roles that exist in the database.
DBA_ROLE_PRIVS This view lists roles granted to users and roles.
DBA_ROLLBACK_SEGS This view contains descriptions of rollback segments.
DBA_SEGMENTS This view contains information about storage allocated for all database segments.
DBA_SEQUENCES This view contains descriptions of all sequences in the database.
DBA_SNAPSHOT_LOGS This view lists all snapshot logs in the database.
DBA_SNAPSHOT_REFRESH_TIMES This view lists snapshot refresh times.
DBA_SNAPSHOTS This view lists all snapshots in the database.
DBA_SOURCE This view contains source of all stored objects in the database.
DBA_STMT_AUDIT_OPTS This view contains information which describes current system auditing options across
the system and by user.
DBA_SYNONYMS This view lists all synonyms in the database.
DBA_SYS_PRIVS This view lists system privileges granted to users and roles.
DBA_TAB_COL_STATISTICS This view contains column statistics and histogram information which is in the
DBA_TAB_COLUMNS view. For more information, see
"DBA_TAB_COLUMNS" on page 2-89.
DBA_TAB_COLUMNS This view contains information which describes columns of all tables, views, and clusters.
To gather statistics for this view, use the SQL command ANALYZE.
DBA_TAB_COMMENTS This view contains comments on all tables and views in the database.
DBA_TAB_HISTOGRAMS This view lists histograms on columns of all tables.
DBA_TAB_PARTITIONS This view describes, for each table partition, the partition level partitioning information,
the storage parameters for the partition, and various partition statistics determined by
ANALYZE.
DBA_TAB_PRIVS This view lists all grants on objects in the database.
DBA_TABLES This view contains descriptions of all relational tables in the database. To gather statistics
for this view, use the SQL command ANALYZE.
DBA_TABLESPACES This view contains descriptions of all tablespaces.
DBA_TRIGGERS This view lists all triggers in the database.
DBA_TRIGGER_COLS This view lists column usage in all triggers.
DBA_TS_QUOTAS This view lists tablespace quotas for all users.
DBA_TYPE_ATTRS This view displays the attributes of types in the database.
DBA_TYPE_METHODS This view is a description of methods of all types in the database.
DBA_TYPES This view displays all abstract datatypes in the database.
DBA_UPDATABLE_COLUMNS This view contains a description of columns that are updatable by the database
administrator in a join view. See Oracle8 Concepts for information on updatable join
views.
DBA_USERS This view lists information about all users of the database.
DBA_VIEWS This view contains the text of all views in the database.
DBMS_ALERT_INFO This view lists registered alerts.
DBMS_LOCK_ALLOCATED This view lists user-allocated locks.
DEFCALL This view is used with Advanced Replication.
DEFCALLDEST This view is used with Advanced Replication.
DEFDEFAULTDEST This view is used with Advanced Replication.
DEFERRCOUNT This view is used with Advanced Replication.
DEFERROR This view is used with Advanced Replication.
DEFLOB This view is used with Advanced Replication.
DEFPROPAGATOR This view is used with Advanced Replication.
DEFSCHEDULE This view is used with Advanced Replication.
DEFTRAN This view is used with Advanced Replication.
DEFTRANDEST This view is used with Advanced Replication.

100
DEPTREE This view, created by UTLDTREE.SQL, contains information on the object dependency
tree. For user SYS, this view displays shared cursors (and only shared cursors) that
depend on the object. For all other users, it displays objects other than shared cursors.
Other users can access SYS.DEPTREE for information on shared cursors.
DICT This is a synonym for DICTIONARY. For more information, see
"DICTIONARY" on page 2-101.
DICTIONARY This view contains descriptions of data dictionary tables and views.
DICT_COLUMNS This view contains descriptions of columns in data dictionary tables and views.
ERROR_SIZE This view is accessed to create the DBA_OBJECT_SIZE and USER_OBJECT_SIZE
views. For more information, see "DBA_OBJECT_SIZE" on page 2-68 and
"USER_OBJECT_SIZE" on page 2-146.
EXCEPTIONS This view contains information on violations of integrity constraints. This view is created
by the UTLEXCPT.SQL script.
FILE_LOCK This is a Parallel Server view. This view displays the mapping of PCM locks to datafiles
as specified in initialization parameter GC_FILES_TO_LOCKS. For more information on
this parameter, see "GC_FILES_TO_LOCK" on page 1-44.
FILE_PING This is a Parallel Server view. This view displays the number of blocks pinged per
datafile. You can use this information to determine access usage of existing datafiles for
better settings of GC_FILES_TO_LOCKS. For more information on this parameter, see
"GC_FILES_TO_LOCK" on page 1-44. For more information, see
Oracle8 Parallel Server Concepts and Administration.
FILEXT$ This view is the equivalent of DBA_DATA_FILES. Oracle recommends you use
DBA_DATA_FILES instead of FILEXT$. For more information, see
"DBA_DATA_FILES" on page 2-55.
GLOBAL_NAME This view contains one row that displays the global name of the current database.
HS_ALL_CAPS This view contains information about all of the capabilities (that is, features) associated
with non-Oracle (FDS) data stores.
HS_ALL_DD This view contains data dictionary information about non-Oracle (FDS) data stores.
HS_ALL_INITS This view contains initialization parameter information about non-Oracle (FDS) data
stores.
HS_BASE_CAPS This view contains information about base capability (that is, base features) of the non-
Oracle (FDS) data store.
HS_BASE_DD This view displays information from the base data dictionary translation table.
HS_CLASS_CAPS This view contains information about the class-specific (driver) capabilities belonging to
the non-Oracle (FDS) data store.
HS_CLASS_DD This view displays information from the non-Oracle data store (FDS) class-specific data
dictionary translations.
HS_CLASS_INIT This view displays information about the non-Oracle (FDS) class-specific initialization
parameters.
HS_EXTERNAL_OBJECT_PRIVILEGES This view contains information about the privileges on objects that are granted to users.
HS_EXTERNAL_OBJECTS This view contains information about all of the distributed external objects accessible
from the Oracle Server.
HS_EXTERNAL_USER_PRIVILEGES This view contains information about all of the granted privileges that are not tied to any
particular object.
HS_FDS_CLASS This view contains information about legal non-Oracle (FDS) classes.
HS_FDS_INST This view contains information about non-Oracle (FDS) instances.
HS_INST_CAPS This view contains information about instance-specific capabilities (that is, features).
HS_INST_DD This view displays information from the non-Oracle (FDS) instance-specific data
dictionary translations.
HS_INST_INIT This view contains information about the non-Oracle (FDS) instance-specific
initialization parameters.
IDEPTREE This view, created by UTLDTREE.SQL, lists the indented dependency tree. It is a pre-
sorted, pretty-print version of DEPTREE.
IND This is a synonym for USER_INDEXES. For more information, see
"USER_ INDEXES" on page 2-137.
INDEX_HISTOGRAM This view contains information from the ANALYZE INDEX ... VALIDATE
STRUCTURE command.
INDEX_STATS This view stores information from the last ANALYZE INDEX ... VALIDATE
STRUCTURE command.
LOADER_CONSTRAINT_INFO This is a SQL*LOADER view used for direct loads..
LOADER_FILE_TS This is a SQL*LOADER view used for direct loads..
LOADER_PART_INFO This is a SQL*LOADER view used for direct loads.
LOADER_PARAM_INFO This is a SQL*LOADER view used for direct loads..
LOADER_TAB_INFO This is a SQL*LOADER view used for direct loads..
LOADER_TRIGGER_INFO This is a SQL*LOADER view used for direct loads..

101
NLS_DATABASE_PARAMETERS This view lists permanent NLS parameters of the database.
NLS_INSTANCE_PARAMETERS This view lists NLS parameters of the instance.
NLS_SESSION_PARAMETERS This view lists NLS parameters of the user session.
OBJ This is a synonym for USER_OBJECTS. For more information, see
"USER_OBJECTS" on page 2-145.
PARSED_PIECES This view is accessed to create the DBA_OBJECT_SIZE and USER_OBJECT_SIZE
views. For more information, see "DBA_OBJECT_SIZE" on page 2-68 and
"USER_OBJECT_SIZE" on page 2-146.
PARSED_SIZE This view is accessed to create the DBA_OBJECT_SIZE and USER_OBJECT_SIZE
views. For more information, see "DBA_OBJECT_SIZE" on page 2-68 and
"USER_OBJECT_SIZE" on page 2-146.
PLAN_TABLE This view is the default table for results of the EXPLAIN PLAN statement. It is created by
UTLXPLAN.SQL, and it contains one row for each step in the execution plan.
PRODUCT_COMPONENT_VERSION This view contains version and status information for component products.
PSTUBTBL This table contains information on stubs generated by the PSTUB utility so that an Oracle
Forms 3.0 client can call stored procedures in an Oracle database. Note: The contents of
this table are intended only for use by the PSTUB utility.
PUBLICSYN This view contains information on public synonyms.
PUBLIC_DEPENDENCY This view lists dependencies to and from objects, by object number.
RESOURCE_COST This view lists the cost for each resource.
RESOURCE_MAP This view contains descriptions for resources. It maps the resource name to the resource
number.
ROLE_ROLE_PRIVS This view contains information about roles granted to other roles. (Information is only
provided about roles to which the user has access.)
ROLE_SYS_PRIVS This view contains information about system privileges granted to roles. Information is
provided only about roles to which the user has access.
ROLE_TAB_PRIVS This view contains information about table privileges granted to roles. Information is
provided only about roles to which the user has access.
SEQ This is a synonym for USER_SEQUENCES. For more information see
"USER_SEQUENCES" on page 2-157.
SESSION_PRIVS This view lists the privileges that are currently available to the user.
SESSION_ROLES This view lists the roles that are currently enabled to the user.
SOURCE_SIZE This view is accessed to create the DBA_OBJECT_SIZE and USER_OBJECT_SIZE
views. For more information, see "DBA_OBJECT_SIZE" on page 2-68, and
"USER_OBJECT_SIZE" on page 2-146.
STMT_AUDIT_OPTION_MAP This view contains information about auditing option type codes.
SYN This is a synonym for USER_SYNONYMS. For more information, see
"USER_SYNONYMS" on page 2-159.
SYNONYMS This view is included for compatibility with Oracle version 5. Use of this view is not
recommended.
SYSCATALOG This view is included for compatibility with Oracle version 5. Use of this view is not
recommended.
SYSFILES This view is included for compatibility with Oracle version 5. Use of this view is not
recommended.
SYSSEGOBJ This view is included for compatibility with Oracle version 5. Use of this view is not
recommended.
SYSTEM_PRIVILEGE_MAP This view contains information about system privilege codes.
SYS_OBJECTS This view maps object IDs to object types and segment data block addresses.
TAB This view is included for compatibility with Oracle version 5. Use of this view is not
recommended.
TABLE_PRIVILEGES This view contains information on grants on objects for which the user is the grantor,
grantee, or owner, or PUBLIC is the grantee. This view is included for compatibility with
Oracle version 6. Use of this view is not recommended.
TABLE_PRIVILEGE_MAP This view contains information about access privilege codes.
TABS This is a synonym for USER_TABLES. For more information, see
"USER_TABLES" on page 2-164.
TABQUOTAS This view is included for compatibility with Oracle version 5. Use of this view is not
recommended.
TRUSTED_SERVERS This view displays whether a server is trusted or untrusted.
TS_PITR_CHECK This view, created by CATPITR.SQL provides information on any dependencies or
restrictions which might prevent tablespace point-in-time recovery from proceeding. This
view applies only to the tablespace point-in-time recovery feature. For more information,
see Oracle8 Backup and Recovery Guide.
TS_PITR_OBJECTS_TO_BE_DROPPED This view lists all objects lost as a result of performing tablespace point-in-time recovery.
This view applies only to the tablespace point-in-time recovery feature.

102
USER_ALL_TABLES This table contains descriptions of the tables (object tables and relational tables) available
to the user.
USER_ARGUMENTS This view lists the arguments in the object which are accessible to the user.
USER_AUDIT_OBJECT This view, created by CATAUDIT.SQL, lists audit trail records for statements concerning
objects.
USER_AUDIT_SESSION This view, created by CATAUDIT.SQL, lists all audit trail records concerning
connections and disconnections for the user.
USER_AUDIT_STATEMENT This view, created by CATAUDIT.SQL, lists audit trail entries for the following
statements issued by the user: GRANT, REVOKE, AUDIT, NOAUDIT, and ALTER
SYSTEM.
USER_AUDIT_TRAIL This view, created by CATAUDIT.SQL, lists audit trail entries relevant to the user.
USER_CATALOG This view lists tables, views, synonyms, and sequences owned by the user.
USER_CLUSTERS This view contains descriptions of user’s own clusters.
USER_CLU_COLUMNS This view contains a mapping of columns in user’s tables to cluster columns.
USER_COL_COMMENTS This view lists comments on columns of user’s tables and views.
USER_COL_PRIVS This view lists grants on columns for which the user is the owner, grantor, or grantee.
USER_COL_PRIVS_MADE This view lists all grants on columns of objects owned by the user.
USER_COL_PRIVS_RECD This view lists grants on columns for which the user is the grantee.
USER_COLL_TYPES This new data dictionary view displays the user’s named collection types.
USER_CONSTRAINTS This view lists constraint definitions on user’s tables.
USER_CONS_COLUMNS This view contains information about columns in constraint definitions owned by the
user.
USER_DB_LINKS This view contains information on database links owned by the user.
USER_DEPENDENCIES This view lists dependencies to and from a user’s objects.
USER_ERRORS This view lists current errors on all a user’s stored objects.
USER_EXTENTS This view lists extents of the segments belonging to a user’s objects.
USER_FREE_SPACE This view lists the free extents in tablespaces accessible to the user.
USER_ INDEXES This view contains descriptions of the user’s own indexes. To gather statistics for this
view, use the SQL command ANALYZE. This view supports parallel partitioned index
scans.
USER_IND_COLUMNS This view lists columns of the user’s indexes or on user’s tables.
USER_IND_PARTITIONS This view describes, for each index partition that the current user owns, the partition level
partitioning information, the storage parameters for the partition, and various partition
statistics determined by ANALYZE.
USER_JOBS This view lists all jobs owned by the user. For more information, see the
Oracle8 Administrator’s Guide.
USER_LIBRARIES This view lists all the libraries that a user owns.
USER_LOBS This view displays the user’s LOBs contained in the user’s tables. It is only for internal
LOBs, so BLOBs, CLOBs, and NCLOBs are OK. External LOBs (i.e.,BFILES) are not.
USER_METHOD_PARAMS This view is a description of method parameters of the user’s types.
USER_METHOD_RESULTS This view is a description of method results of the user’s types.
USER_NESTED_TABLES This view describes the nested tables contained in the user’s own tables.
USER_OBJECT_TABLES This view contains descriptions of the object tables available to the user.
USER_OBJECTS This view lists objects owned by the user.
USER_OBJECT_SIZE This view lists the PL/SQL objects owned by the user.
USER_OBJ_AUDIT_OPTS This view, created by CATAUDIT.SQL, lists auditing options for the user’s tables and
views.
USER_PART_COL_STATISTICS This view contains column statistics and histogram information for table partitions that
the current user owns.
USER_PART_HISTOGRAMS This view contains the histogram data (end-points per histogram) for histograms on table
partitions that the current user can access.
USER_PART_KEY_COLUMNS This view describes the partitioning key columns for partitioned objects that the current
user owns.
USER_PART_INDEXES This view lists the object level partitioning information for all partitioned indexes that the
user owns.
USER_PART_TABLES This view describes the object level partitioning information for partitioned tables that the
current user owns.
USER_PASSWORD_LIMITS This view describes the password profile parameters that are assigned to theuser.
USER_QUEUE_TABLES This view describes only the queues in the queue tables created in the user ‘s schema. For
more information about this view and Advanced Queuing, see the
Oracle8 Application Developer’s Guide.
USER_QUEUES This view describes the operational characteristics for every queue in the user’s schema.
For more information about this view and Advanced Queuing, see the
Oracle8 Application Developer’s Guide.
USER_REFRESH This view lists all the refresh groups.

103
USER_REFRESH_CHILDREN This view lists all the objects in refresh groups, where the user owns the refresh group.
USER_REFS This view describes the REF columns and REF attributes in the object type columns of
the user’s tables.
USER_REPCATLOG This view is used with Advanced Replication.
USER_REPCOLUMN This view is used with Advanced Replication.
USER_REPCOLUMN_GROUP This view is used with Advanced Replication.
USER_REPCONFLICT This view is used with Advanced Replication.
USER_REPDDL This view is used with Advanced Replication.
USER_REPGENERATED This view is used with Advanced Replication.
USER_REPGROUP This view is used with Advanced Replication.
USER_REPGROUPED_COLUMN This view is used with Advanced Replication.
USER_REPKEY_COLUMNS This view is used with Advanced Replication.
USER_REPOBJECT This view is used with Advanced Replication.
USER_REPPARAMETER_COLUMN This view is used with Advanced Replication.
USER_REPPRIORITY This view is used with Advanced Replication.
USER_REPPRIORITY_GROUP This view is used with Advanced Replication.
USER_REPPROP This view is used with Advanced Replication.
USER_REPRESOLUTION This view is used with Advanced Replication.
USER_REPRESOL_STATS_CONTROL This view is used with Advanced Replication.
USER_REPRESOLUTION_METHOD This view is used with Advanced Replication.
USER_REPRESOLUTION_STATISTICS This view is used with Advanced Replication.
USER_REPSITES This view is used with Advanced Replication.
USER_RESOURCE_LIMITS This view displays the resource limits for the current user.
USER_ROLE_PRIVS This view lists roles granted to the user.
USER_SEGMENTS This view lists information about storage allocation for database segments belonging to a
user’s objects.
USER_SEQUENCES This view lists descriptions of the user’s sequences.
USER_SNAPSHOTS This view lists snapshots that the user can view.
USER_SNAPSHOT_LOGS This view lists all snapshot logs owned by the user.
USER_SOURCE This view contains text source of all stored objects belonging to the user.
USER_SNAPSHOT_REFRESH_TIMES This view lists snapshot refresh times.
USER_SYNONYMS This view lists the user’s private synonyms.
USER_SYS_PRIVS This view lists system privileges granted to the user.
USER_TAB_COL_STATISTICS This view contains column statistics and histogram information which is in the
USER_TAB_COLUMNS view. For more information, see
"USER_TAB_COLUMNS" on page 2-161.
USER_TAB_COLUMNS This view contains information about columns of user’s tables, views, and clusters. To
gather statistics for this view, use the SQL command ANALYZE.
USER_TAB_COMMENTS This view contains comments on the tables and views owned by the user.
USER_TAB_HISTOGRAMS This view lists histograms on columns of user’s tables.
USER_TAB_PARTITIONS This view describes, for each table partition, the partition level partitioning information,
the storage parameters for the partition, and various partition statistics determined by
ANALYZE that the current user owns.
USER_TAB_PRIVS This view contains information on grants on objects for which the user is the owner,
grantor, or grantee.
USER_TAB_PRIVS_MADE This view contains information about all grants on objects owned by the user.
USER_TAB_PRIVS_RECD This view contains information about grants on objects for which the user is the grantee.
USER_TABLES This view contains a description of the user’s own relational tables. To gather statistics for
this view, use the SQL command ANALYZE.
USER_TABLESPACES This view contains descriptions of accessible tablespaces.
USER_TRIGGERS This view contains descriptions of the user’s triggers.
USER_TRIGGER_COLS This view displays the usage of columns in triggers owned by the user or on one of the
user’s tables.
USER_TS_QUOTAS This view contains information about tablespace quotas for the user.
USER_TYPES This view displays the user’s types in a table.
USER_TYPE_ATTRS This view displays the attributes of the user’s types.
USER_TYPE_METHODS This view is a description of the user’s methods types.
USER_UPDATABLE_COLUMNS This view contains a description of columns that are updatable to the user in a join view.
USER_USERS This view contains information about the current user.
USER_VIEWS This view contains the text of views owned by the user.

104
Dynamic Performance Tables

FILEXT$ FILEXT$ is created the first time you turn on the AUTOEXTEND characteristic for
a datafile.
V$ACCESS This view displays objects in the database that are currently locked and the sessions
that are accessing them.
V$ACTIVE_INSTANCES This view maps instance names to instance numbers for all instances that have the
database currently mounted.
V$AQ This view describes statistics for the queues in the database.
V$ARCHIVE This view contains information on redo log files in need of archiving. Each row
provides information for one thread. This information is also available in V$LOG.
Oracle recommends that you use V$LOG. For more information, see
"V$LOG" on page 3-57.
V$ARCHIVE_DEST This view describes, for the current instance, all the archive log destinations, their
current value, mode, and status.
V$ARCHIVED_LOG This view displays archived log information from the controlfile including archive
log names. An archive log record is inserted after the online redo log is successfully
archived or cleared (name column is NULL if the log was cleared). If the log is
archived twice, there will be two archived log records with the same THREAD#,
SEQUENCE#, and FIRST_CHANGE#, but with a different name. An archive log
record is also inserted when an archive log is restored from a backup set or a copy.
V$BACKUP This view displays the backup status of all online datafiles.
V$BACKUP_CORRUPTION This view displays information about corruptions in datafile backups from the
controlfile. Note that corruptions are not tolerated in the controlfile and archived log
backups.
V$BACKUP_DATAFILE This view displays backup datafile and backup controlfile information from the
controlfile.
V$BACKUP_DEVICE This view displays information about supported backup devices. If a device type
does not support named devices, then one row with the device type and a null device
name is returned for that device type. If a device type supports named devices then
one row is returned for each available device of that type. The special device type
DISK is not returned by this view because it is always available.
V$BACKUP_PIECE This view displays information about backup pieces from the controlfile. Each
backup set consist of one or more backup pieces.
V$BACKUP_REDOLOG This view displays information about archived logs in backup sets from the
controlfile. Note that online redo logs cannot be backed up directly; they must be
archived first to disk and then backed up. An archive log backup set can contain one
or more archived logs.
V$BACKUP_SET This view displays backup set information from the controlfile. A backup set record
is inserted after the backup set is successfully completed.
V$BGPROCESS This view describes the background processes.
V$BH This is a Parallel Server view. This view gives the status and number of pings for
every buffer in the SGA.
V$BUFFER_POOL This view displays information about all buffer pools available for the instance. The
"sets" pertain to the number of LRU latch sets. For more information, see
"DB_BLOCK_LRU_LATCHES" on page 1-28.
V$CACHE This is a Parallel Server view. This view contains information from the block header
of each block in the SGA of the current instance as related to particular database
objects.
V$CACHE_LOCK This is a Parallel Server view.
V$CIRCUIT This view contains information about virtual circuits, which are user connections to
the database through dispatchers and servers.
V$CLASS_PING Displays the number of blocks pinged per block class. Use this view to compare
contentions for blocks in different classes.
V$COMPATIBILITY This view displays features in use by the database instance that may prevent
downgrading to a previous release. This is the dynamic (SGA) version of this
information, and may not reflect features that other instances have used, and may
include temporary incompatibilities (like UNDO segments) that will not exist after
the database is shut down cleanly.
V$COMPATSEG This view lists the permanent features in use by the database that will prevent
moving back to an earlier release.
V$CONTROLFILE This view lists the names of the control files.
V$CONTROLFILE_RECORD_SECTION This view displays information about the controlfile record sections.
V$COPY_CORRUPTION This view displays information about datafile copy corruptions from the controlfile.

105
V$CURRENT_BUCKET This view displays information useful for predicting the number of additional cache
misses that would occur if the number of buffers in the cache were reduced.
V$DATABASE This view contains database information from the control file.
V$DATAFILE This view contains datafile information from the control file. See also the
"V$DATAFILE_HEADER" on page 3-26 view which displays information from
datafile headers.
V$DATAFILE_COPY This view displays datafile copy information from the controlfile.
V$DATAFILE_HEADER This view displays datafile information from the datafile headers.
V$DBFILE This view lists all datafiles making up the database. This view is retained for
historical compatibility. Use of V$DATAFILE is recommended instead. For more
information, see "V$DATAFILE" on page 3-22.
V$DBLINK This view describes all database links (links with IN_TRANSACTION = YES)
opened by the session issuing the query on V$DBLINK. These database links must
be committed or rolled back before being closed.
V$DB_OBJECT_CACHE This view displays database objects that are cached in the library cache. Objects
include tables, indexes, clusters, synonym definitions, PL/SQL procedures and
packages, and triggers.
V$DB_PIPES This view displays the pipes that are currently in this database.
V$DELETED_OBJECT This view displays information about deleted archived logs, datafile copies and
backup pieces from the controlfile. The only purpose of this view is to optimize the
recovery catalog resync operation. When an archived log, datafile copy, or backup
piece is deleted, the corresponding record is marked deleted.
V$DISPATCHER This view provides information on the dispatcher processes.
V$DISPATCHER_RATE This view provides rate statistics for the dispatcher processes.
V$DLM_CONVERT_LOCAL V$DLM_CONVERT_LOCAL displays the elapsed time for the local lock
conversion operation.
V$DLM_CONVERT_REMOTE V$DLM_CONVERT_REMOTE displays the elapsed time for the remote lock
conversion operation.
V$DLM_LATCH V$DLM_LATCH displays statistics about DLM latch performance. The view
includes totals for each type of latch rather than statistics for each individual latch.
Ideally, the value IMM_GETS/TTL_GETS should be as close to 1 as possible.
V$DLM_LOCKS This is a Parallel Server view. V$DLM_LOCKS lists information of all locks
currently known to lock manager that are being blocked or blocking others.
V$DLM_MISC V$DLM_MISC displays miscellaneous DLM statistics.
V$ENABLEDPRIVS This view displays which privileges are enabled. These privileges can be found in
the table SYS.SYSTEM_PRIVILEGES_MAP.
V$ENQUEUE_LOCK This view displays all locks owned by enqueue state objects. The columns in this
view are identical to the columns in V$LOCK. For more information, see
"V$LOCK" on page 3-51.
V$EVENT_NAME This view contains information about wait events.
V$EXECUTION This view displays information on parallel query execution.
V$EXECUTION_LOCATION This view displays detailed information on the parallel query execution tree location.
V$FALSE_PING V$FALSE_PING is a Parallel Server view. This view displays buffers that may be
getting false pings. That is, buffers pinged more than 10 times that are protected by
the same lock as another buffer that pinged more than 10 times. Buffers identified as
getting false pings can be remapped in "GC_FILES_TO_LOCK" on page 1-44 to
reduce lock collisions.
V$FILE_PING The view V$FILE_PING displays the number of blocks pinged per datafile. This
information in turn can be used to determine access patterns to existing datafiles and
deciding new mappings from datafile blocks to PCM locks.
V$FILESTAT This view contains information about file read/write statistics.
V$FIXED_TABLE This view displays all dynamic performance tables, views, and derived tables in the
database. Some V$ tables refer to real tables and are therefore not listed.
V$FIXED_VIEW_DEFINITION This view contains the definitions of all the fixed views (views beginning with V$).
Use this table with caution. Oracle tries to keep the behavior of fixed views the same
from release to release, but the definitions of the fixed views can change without
notice. Use these definitions to optimize your queries by using indexed columns of
the dynamic performance tables.
V$GLOBAL_TRANSACTION This view displays information on the currently active global transactions.
V$INDEXED_FIXED_COLUMN This view displays the columns in dynamic performance tables that are indexed (X$
tables). The X$ tables can change without notice. Use this view only to write queries
against fixed views (V$ views) more efficiently.
V$INSTANCE This view displays the state of the current instance. This version of V$INSTANCE is
not compatible with earlier versions of V$INSTANCE.

106
V$LATCH This view lists statistics for non-parent latches and summary statistics for parent
latches. That is, the statistics for a parent latch include counts from each of its
children. Note: Columns SLEEP5, SLEEP6,... SLEEP11 are present for
compatibility with previous versions of Oracle. No data are accumulated for these
columns.
V$LATCHHOLDER This view contains information about the current latch holders.
V$LATCHNAME This view contains information about decoded latch names for the latches shown in
V$LATCH. The rows of V$LATCHNAME have a one-to-one correspondence to the
rows of V$LATCH. For more information, see "V$LATCH" on page 3-46.
V$LATCH_CHILDREN This view contains statistics about child latches. This view includes all columns of
V$LATCH plus the CHILD# column. Note that child latches have the same parent if
their LATCH# columns match each other. For more information, see
"V$LATCH" on page 3-46.
V$LATCH_MISSES This view contains statistics about missed attempts to acquire a latch.
V$LATCH_PARENT This view contains statistics about the parent latch. The columns of
V$LATCH_PARENT are identical to those in V$LATCH. For more information,
see "V$LATCH" on page 3-46.
V$LIBRARYCACHE This view contains statistics about library cache performance and activity.
V$LICENSE This view contains information about license limits.
V$LOADCSTAT This view contains SQL*Loader statistics compiled during the execution of a direct
load. These statistics apply to the whole load. Any SELECT against this table results
in "no rows returned" since you cannot load data and do a query at the same time.
V$LOADTSTAT SQL*Loader statistics compiled during the execution of a direct load. These
statistics apply to the current table. Any SELECT against this table results in "no
rows returned" since you cannot load data and do a query at the same time.
V$LOCK This view lists the locks currently held by the Oracle Server and outstanding
requests for a lock or latch.
V$LOCK_ACTIVITY This is a Parallel Server view. V$LOCK_ACTIVITY displays the DLM lock
operation activity of the current instance. Each row corresponds to a type of lock
operation.
V$LOCK_ELEMENT This is a Parallel Server view. There is one entry in v$LOCK_ELEMENT for each
PCM lock that is used by the buffer cache. The name of the PCM lock that
corresponds to a lock element is {‘BL’, indx, class}.
V$LOCKED_OBJECT This view lists all locks acquired by every transaction on the system.
V$LOCKS_WITH_COLLISIONS This is a Parallel Server view. Use this view to find the locks that protect multiple
buffers, each of which has been either force-written or force-read at least 10 times. It
is very likely that those buffers are experiencing false pings due to being mapped to
the same lock.
V$LOG This view contains log file information from the control files.
V$LOGFILE This view contains information about redo log files.
V$LOGHIST This view contains log history information from the control file. This view is
retained for historical compatibility. Use of V$LOG_HISTORY is recommended
instead. For more information, see "V$LOG_HISTORY" on page 3-58.
V$LOG_HISTORY This view contains log history information from the control file.
V$MTS This view contains information for tuning the multi-threaded server.
V$MYSTAT This view contains statistics on the current session.
V$NLS_PARAMETERS This view contains current values of NLS parameters.
V$NLS_VALID_VALUES This view lists all valid values for NLS parameters.
V$OBJECT_DEPENDENCY This view can be used to determine what objects are depended on by a package,
procedure, or cursor that is currently loaded in the shared pool. For example,
together with V$SESSION and V$SQL, it can be used to determine which tables are
used in the SQL statement that a user is currently executing. For more information,
see "V$SESSION" on page 3-77 and "V$SQL" on page 3-95.
V$OFFLINE_RANGE This view displays datafile offline information from the controlfile. Note that the last
offline range of each datafile is kept in the DATAFILE record. For more
information, see "V$DATAFILE" on page 3-22. An offline range is created for a
datafile when its tablespace is first ALTERed to be OFFLINE NORMAL or READ
ONLY, and then subsequently ALTERed to be ONLINE or read-write. Note that no
offline range is created if the datafile itself is ALTERed to be OFFLINE or if the
tablespace is ALTERed to be OFFLINE IMMEDIATE.
V$OPEN_CURSOR This view lists cursors that each user session currently has opened and parsed.
V$OPTION This view lists options that are installed with the Oracle Server.
V$PARAMETER This view lists information about initialization parameters.

107
V$PING This is a Parallel Server view. The V$PING view is identical to the V$CACHE view
but only displays blocks that have been pinged at least once. This view contains
information from the block header of each block in the SGA of the current instance
as related to particular database objects. For more information, see
"V$CACHE" on page 3-14.
V$PQ_SESSTAT This view lists session statistics for parallel queries.
V$PQ_SLAVE This view lists statistics for each of the active parallel query servers on an instance.
V$PQ_SYSSTAT This view lists system statistics for parallel queries.
V$PQ_TQSTAT This view contains statistics on parallel query operations. The statistics are compiled
after the query completes and only remain for the duration of the session. It displays
the number of rows processed through each parallel query server at each stage of the
execution tree. This view can help determine skew problems in a query’s execution.
V$PROCESS This view contains information about the currently active processes. While the
LATCHWAIT column indicates what latch a process is waiting for, the
LATCHSPIN column indicates what latch a process is spinning on. On multi-
processor machines, Oracle processes will spin on a latch before waiting on it.
V$PWFILE_USERS This view lists users who have been granted SYSDBA and SYSOPER privileges as
derived from the password file.
V$QUEUE This view contains information on the multi-thread message queues.
V$RECENT_BUCKET This view displays information useful for estimating the performance of a large
cache.
V$RECOVER_FILE This view displays the status of files needing media recovery.
V$RECOVERY_FILE_STATUS V$RECOVERY_FILE_STATUS contains one row for each datafile for each
RECOVER command. This view contains useful information only for the Oracle
process doing the recovery. When Recovery Manager directs a server process to
perform recovery, only Recovery Manager is able to view the relevant information in
this view. V$RECOVERY_FILE_STATUS will be empty to all other Oracle users.
V$RECOVERY_LOG This view lists information about archived logs that are needed to complete media
recovery. This information is derived from the log history view, V$LOG_HISTORY.
For more information, see "V$LOG_HISTORY" on page 3-58.
V$RECOVERY_LOG contains useful information only for the Oracle process doing
the recovery. When Recovery Manager directs a server process to perform recovery,
only Recovery Manager is able to view the relevant information in this view.
V$RECOVERY_LOG will be empty to all other Oracle users.
V$RECOVERY_PROGRESS V$RECOVERY_PROGRESS can be used to track database recovery operations to
ensure that they are not stalled, and also to estimate the time required to complete
the operation in progress. V$RECOVERY_PROGRESS is a subview of
V$SESSION_LONGOPS.
V$RECOVERY_STATUS V$RECOVERY_STATUS contains statistics of the current recovery process. This
view contains useful information only for the Oracle process doing the recovery.
When Recovery Manager directs a server process to perform recovery, only
Recovery Manager is able to view the relevant information in this view.
V$RECOVERY_STATUS will be empty to all other Oracle users.
V$REQDIST This view lists statistics for the histogram of MTS dispatcher request times, divided
into 12 buckets, or ranges of time. The time ranges grow exponentially as a function
of the bucket number.
V$RESOURCE This view contains resource name and address information.
V$RESOURCE_LIMIT This view displays information about global resource use for some of the system
resources. Use this view to monitor the consumption of resources so that you can
take corrective action, if necessary. Many of the resources correspond to
initialization parameters listed in Table 3-10. Some resources, those used by DLM
for example, have an initial allocation (soft limit), and the hard limit, which is
theoretically infinite (although in practice it is limited by SGA size). During SGA
reservation/initialization, a place is reserved in SGA for the
INITIAL_ALLOCATION of resources, but if this allocation is exceeded, additional
resources are allocated up to the value indicated by LIMIT_VALUE. The
CURRENT_UTILIZATION column indicates whether the initial allocation has been
exceeded. When the initial allocation value is exceeded, the additional required
resources are allocated from the shared pool, where they must compete for space
with other resources. A good choice for the value of INITIAL_ALLOCATION will
avoid the contention for space. For most resources, the value for
INITIAL_ALLOCATION is the same as the LIMIT_VALUE. Exceeding
LIMIT_VALUE results in an error.
V$ROLLNAME This view lists the names of all online rollback segments. It can only be accessed
when the database is open.
V$ROLLSTAT This view contains rollback segment statistics.

108
V$ROWCACHE This view displays statistics for data dictionary activity. Each row contains statistics
for one data dictionary cache.
V$SESSION This view lists session information for each current session.
V$SESSION_CONNECT_INFO This view displays information about network connections for the current session.
V$SESSION_CURSOR_CACHE This view displays information on cursor usage for the current session. Note: the
V$SESSION_CURSOR_CACHE view is not a measure of the effectiveness of the
SESSION_CACHED_CURSORS initialization parameter.
V$SESSION_EVENT This view lists information on waits for an event by a session. Note that the
TIME_WAITED and AVERAGE_WAIT columns will contain a value of zero on
those platforms that do not support a fast timing mechanism. If you are running on
one of these platforms and you want this column to reflect true wait times, you must
set TIMED_STATISTICS to TRUE in the parameter file. Please remember that
doing this will have a small negative effect on system performance. For more
information, see "TIMED_STATISTICS" on page 1-122.
V$SESSION_LONGOPS This view displays the status of certain long-running operations. It provides
progression reports on operations using the columns SOFAR and TOTALWORK.
For example, the operational status for the following components can be monitored:
hash cluster creations, backup operations, recovery operations.
V$SESSION_OBJECT_CACHE This view displays object cache statistics for the current user session on the local
server (instance).
V$SESSION_WAIT This view lists the resources or events for which active sessions are waiting.
V$SESSTAT This view lists user session statistics. To find the name of the statistic associated
with each statistic number (STATISTIC#), see "V$STATNAME" on page 3-103.
V$SESS_IO This view lists I/O statistics for each user session.
V$SGA This view contains summary information on the System Global Area.
V$SGASTAT This view contains detailed information on the System Global Area.
V$SHARED_POOL_RESERVED This fixed view lists statistics that help you tune the reserved pool and space within
the shared pool. The following columns of V$SHARED_POOL_RESERVED are
valid only if the initialization parameter shared_pool_reserved_size is set to a valid
value. For more information, see
"SHARED_POOL_RESERVED_SIZE" on page 1-112.
V$SHARED_SERVER This view contains information on the shared server processes.
V$SORT_SEGMENT This view contains information about every sort segment in a given instance. The
view is only updated when the tablespace is of the TEMPORARY type.
V$SORT_USAGE This view describes sort usage.
V$SQL This view lists statistics on shared SQL area without the GROUP BY clause and
contains one row for each child of the original SQL text entered.
V$SQL_BIND_DATA This view displays the actual bind data sent by the client for each distinct bind
variable in each cursor owned by the session querying this view if the data is
available in the server.
V$SQL_BIND_METADATA This view displays bind metadata provided by the client for each distinct bind
variable in each cursor owned by the session querying this view.
V$SQL_CURSOR This view displays debugging information for each cursor associated with the
session querying this view.
V$SQL_SHARED_MEMORY This view displays information about the cursor shared memory snapshot. Each SQL
statement stored in the shared pool has one or more child objects associated with it.
Each child object has a number of parts, one of which is the context heap, which
holds, among other things, the query plan.
V$SQLAREA This view lists statistics on shared SQL area and contains one row per SQL string. It
provides statistics on SQL statements that are in memory, parsed, and ready for
execution.
V$SQLTEXT This view contains the text of SQL statements belonging to shared SQL cursors in
the SGA.
V$SQLTEXT_WITH_NEWLINES This view is identical to the V$SQLTEXT view except that, to improve legibility,
V$SQLTEXT_WITH_NEWLINES does not replace newlines and tabs in the SQL
statement with spaces. For more information, see "V$SQLTEXT" on page 3-102.
V$STATNAME This view displays decoded statistic names for the statistics shown in the
V$SESSTAT and V$SYSSTAT tables. For more information, see
"V$SESSTAT" on page 3-89 and "V$SYSSTAT" on page 3-107.
V$SUBCACHE This view displays information about the subordinate caches currently loaded into
library cache memory. The view walks through the library cache, printing out a row
for each loaded subordinate cache per library cache object.
V$SYSSTAT This view lists system statistics. To find the name of the statistic associated with
each statistic number (STATISTIC#), see "V$STATNAME" on page 3-103.

109
V$SYSTEM_CURSOR_CACHE This view displays similar information to the V$SESSION_CURSOR_CACHE view
except that this information is system wide. For more information, see
"V$SESSION_CURSOR_CACHE" on page 3-84.
V$SYSTEM_EVENT This view contains information on total waits for an event. Note that the
TIME_WAITED and AVERAGE_WAIT columns will contain a value of zero on
those platforms that do not support a fast timing mechanism. If you are running on
one of these platforms and you want this column to reflect true wait times, you must
set TIMED_STATISTICS to TRUE in the parameter file. Please remember that
doing this will have a small negative effect on system performance. For more
information, see"TIMED_STATISTICS" on page 1-122.
V$SYSTEM_PARAMETER This view contains information on system parameters.
V$TABLESPACE This view displays tablespace information from the controlfile.
V$THREAD This view contains thread information from the control file.
V$TIMER This view lists the elapsed time in hundredths of seconds. Time is measured since
the beginning of the epoch, which is operating system specific, and wraps around to
0 again whenever the value overflows four bytes (roughly 497 days).
V$TRANSACTION This view lists the active transactions in the system.
V$TRANSACTION_ENQUEUE V$TRANSACTION_ENQUEUE displays locks owned by transaction state objects.
V$TYPE_SIZE This view lists the sizes of various database components for use in estimating data
block capacity.
V$VERSION Version numbers of core library components in the Oracle Server. There is one row
for each component.
V$WAITSTAT This view lists block contention statistics. This table is only updated when timed
statistics are enabled.

110
Database SQL Scripts

Creating the Data Dictionary

Script Name Needed For Description


CATALOG.SQL All databases Creates the data dictionary and public synonyms for many of its views, and grants PUBLIC
access to the synonyms

CATPROC.SQL All databases Runs all scripts required for or used with PL/SQL. It is required for all Oracle8 databases.

Creating Additional Data Dictionary Structures

Script Name Needed For Run By Description


CATBLOCK.SQL Performance SYS Creates views that can dynamically display lock dependency
Management graphs

CATEXP7.SQL Exporting data to Oracle7 SYS Creates the dictionary views needed for the Oracle7 Export
utility to export data from Oracle8 in Oracle7 Export file format

CATHS.SQL Heterogeneous Services SYS Installs packages for administering heterogeneous services.

CATIO.SQL Performance SYS Allows I/O to be traced on a table-by-table basis


Management

CATOCTK.SQL Security SYS Creates the Oracle Cryptographic Toolkit package

CATPARR.SQL Parallel Server SYS or SYSDBA Creates parallel server data dictionary views.

CATREP.SQL Advanced Replication SYS Runs all SQL scripts for enabling database replication.

CATRMAN.SQL Recovery Manager RMAN Creates recovery manager tables and views (schema) to establish
an external recovery catalog for the backup, restore and recovery
functionality provided by the Recovery Manager (RMAN) utility

DBMSIOTC.SQL Storage Management any user Analyzes chained rows in index-organized tables

DBMSOTRC.SQL Performance SYS or SYSDBA Used to enable and disable Oracle Trace trace generation
Management

DBMSPOOL.SQL Performance SYS or SYSDBA Enables DBA to lock PL/SQL packages, SQL statements, and
Management triggers into the shared pool

USERLOCK.SQL Concurrency Control SYS or SYSDBA Provides a facility for user-named locks that can be used in a
local or clustered environment to aid in sequencing application
actions.

UTLBSTAT.SQL and Performance SYS Respectively start and stop collecting performance tuning
UTLESTAT.SQL Management statistics

UTLCHAIN.SQL Storage Management any user Creates tables for storing the output of the ANALYZE command
with CHAINED ROWS option

UTLCONST.SQL Year 2000 Compliance any user Provides functions to validate CHECK constraints on date
columns are year 2000 compliant

UTLDTREE.SQL Metadata Management any user Creates tables and views that show dependencies between
objects

UTLEXCPT.SQL Constraints any user Creates the default table (EXCEPTIONS) for storing exceptions
from enabling constraints

UTLHTTP.SQL Web Access SYS or SYSDBA PL/SQL package retrieve data from Internet or intranet web
servers via HTTP protocol

UTLLOCKT.SQL Performance Monitoring SYS or SYSDBA Displays a lock wait-for graph, in tree structure format

UTLPG.SQL Data Conversion SYS or SYSDBA Provides a package that converts IBM/370 VS COBOL II

111
UTLPWDMG.SQL Security SYS or SYSDBA Creates PL/SQL function for default password complexity
verification. Sets the default password profile parameters and
enables password management features

UTLSAMPL.SQL Examples SYS or any user Creates sample tables, such as EMP and DEPT, and users, such
with DBA role as SCOTT

UTLSCLN.SQL Advanced Replication any user Copies a snapshot schema from another snapshot site

UTLTKPROF.SQL Performance SYS Creates the TKPROFER role to allow the TKPROF profiling
Management utility to be runs by non-DBA users

UTLVALID.SQL Partitioned Tables any user Creates table required for storing output of ANALYZE TABLE
...VALIDATE STRUCTURE of a partitioned table.

UTLXPLAN.SQL Performance any user Creates the table PLAN_TABLE, which holds output from the
Management EXPLAIN PLAN command

The "NO" Scripts

Script Name Needed For Run By Description


CATNOADT.SQL Objects SYS Drops views and synonyms on dictionary metadata that relate to
Object types

CATNOAUD.SQL Security SYS Drops views and synonyms on auditing metadata

CATNOHS.SQL Heterogeneous SYS Removes Heterogeneous Services dictionary metadata


Services

CATNOPRT.SQL Partitioning SYS Drops views and synonyms on dictionary metadata that relate to
partitioned tables and indexes

CATNOQUE.SQL Advanced Queuing SYS Removes Advanced Queuing dictionary metadata

CATNORMN.SQL Recovery Manager Owner of recovery Removes recovery catalog schema


catalog

CATNOSVM.SQL Server Manager SYS Removes Oracle7 Server Manager views and synonyms

CATNOSNMP.SQL Distributed SYS Drops the DBSNMP user and SNMPAGENT role
Management

Migration Scripts

Script Name Needed For Run By Description


CAT8000.SQL Migration from SYS or Creates new Oracle8 dictionary metadata
Oracle7 SYSDBA

CATREP8M.SQL Advanced SYS Loads replication packages/views and adjusts 7.3


Replication replication-specific packages/views

DROPCAT6.SQL Removing legacy SYS Drops the Oracle6 data dictionary catalog views
metadata

DROPCAT5.SQL Removing legacy SYS Drops the Oracle5 data dictionary catalog views
metadata

112
X$ Tables

X$BH Use to show the cache utilization rate.


X$K2GTE Kernel 2 Phase Commit Global Transaction Entry
X$K2GTE2 Kernel 2 Phase Commit Global Transaction Entry
X$KCBCBH Use to show the cache utilization rate. (Current Bucket).
X$KCBFWAIT Use to show the cache utilization rate.
X$KCBRBH Use to show the cache utilization rate. (Recent Bucket)
X$KCBWAIT Use to show the cache utilization rate.
X$KCBWDS Set [D]escriptors
X$KCCCF Control File Names & status
X$KCCDI Database Information
X$KCCFE Database File Entry. (from control file)
X$KCCFN File Names.
X$KCCLE Log File Information.
X$KCCLH Archive Entry Information.
X$KCCRT Redo Thread Information.
X$KCFIO Statistics for file I/O.
X$KCKCE Returns One row for each entry in the compatibility segment.
X$KCKFM Returns One row for each entry in the compatibility formats.
X$KCKTY Returns One row for each entry in the compatibility types
X$KCLFH File [H]ash Table
X$KCLFI File Bucket Table
X$KCLFX Lock Element [F]ree list statistics - 7.3 or higher
X$KCLLS Per LCK free list statistics - 7.3 or higher
X$KCLQN [N]ame (hash) table statistics - 7.3 or higher
X$KCRFX File Read Conte[X]t - 7.3 or higher
X$KCRMF [F]ile context
X$KCRMT [T]hread context
X$KCRMX Recovery Conte[X]t
X$KCVFH All file headers
X$KCVFHMRR Files with [M]edia [R]ecovery [R]equired
X$KCVFHONL [ONL]ine File headers
X$KDNCE Sequence [C]ache [E]ntries - 7.2 or lower
X$KDNSSC [C]ache Enqueue Objects - 7.2 or lower
X$KDNSSF [F]lush Enqueue Objects - 7.2 or lower
X$KDNST Cache [ST]atistics - 7.2 or lower
X$KDXHS Histogram Index Statistics.
X$KDXST Index statistics.
X$KGHLU State (summary) of [L]R[U] heap(s) - defined in ksmh.h
X$KGICC Session statistics - defined in kqlf.h
X$KGICS System wide statistics - defined in kqlf.h
X$KGLAU Object Authorization table
X$KGLBODY Filter for [BODY] ( packages )
X$KGLCC Library Cache Latch Clean-Up.
X$KGLCLUSTER Filter for [CLUSTER]s
X$KGLCURSOR Filter for [CURSOR]s
X$KGLDP Object [D]e[P]endency table
X$KGLINDEX Filter for [INDEX]es
X$KGLLC [L]atch [C]leanup for Cache/Pin Latches
X$KGLLK Object [L]oc[K]s
X$KGLNA Object [NA]mes (sql text)
X$KGLNA1 Object [NA]mes (sql text) with newlines - 7.2.0 or higher
X$KGLOB All [OB]jects
X$KGLPN Object [P]i[N]s
X$KGLRD [R]ead only [D]ependency table - 7.3 or higher
X$KGLST Library cache [ST]atistics
X$KGLTABLE Filter for [TABLE]s
X$KGLTR Address [TR]anslation
X$KGLTRIGGER Filter for [TRIGGER]s
X$KGLXS Object Access Table
X$KKMMD Information about which databases are mounted and their status.

113
X$KKSAI Cursor [A]llocation [I]nformation - 7.3.2 or higher
X$KKSBV Library Object [B]ind [V]ariables
X$KLLCNT [C]o[NT]rol Statistics (Loader)
X$KLLTAB [TAB]le Statistics (Loader)
X$KMCQS Current [Q]ueue [S]tate (MTS)
X$KMCVC [V]irtual [C]ircuit state (MTS)
X$KMMDI [D]ispatcher [I]nfo (status) (MTS)
X$KMMDP [D]ispatcher Config ( [P]rotocol info ) (MTS)
X$KMMRD [R]equest timing [D]istributions (MTS)
X$KMMSG [SG]a info ( global statistics) (MTS)
X$KMMSI [S]erver [I]nfo ( status ) (MTS)
X$KQDAU Table Authorization Cache.
X$KQDCA Column Authorization Cache.
X$KQDCO Column Cache.
X$KQDIN Index Cache.
X$KQDOB Object Caches ?
X$KQDPG [PG]a row cache cursor statistics
X$KQDSY Synonym Cache.
X$KQDTV Table / View / Cluster Cache.
X$KQDUN User Name Cache.
X$KQFCO Table [CO]lumn definitions
X$KQFDT [D]erived [T]ables
X$KQFSZ Kernel Data structure type [S]i[Z]es
X$KQFTA Fixed [TA]bles
X$KQFVI Fixed [VI]ews
X$KQFVT [V]iew [T]ext definition - 7.2.0 or higher
X$KQRPD [P]arent Cache [D]efinition - 7.1.5 or higher
X$KQRSD [S]ubordinate Cache [D]efinition - 7.1.5 or higher
X$KQRST Cache [ST]atistics
X$KSBDD Detached Process [D]efinition (info)
X$KSBDP Detached [P]rocess Descriptor (name)
X$KSIMAT Instance [AT]tributes
X$KSIMAV [A]ttribute [V]alues for all instances
X$KSIMSI [S]erial and [I]nstance numbers
X$KSLED Event [D]escriptors
X$KSLEI [I]nstance wide statistics since startup
X$KSLES Current [S]ession statistics
X$KSLLD Latch [D]escriptor (name)
X$KSLLT Latch statistics [ + Child latches @ 7.3 or higher ]
X$KSLLW Latch context ( [W]here ) descriptors - 7.3 or higher
X$KSLPO Latch [PO]st statistics - 7.3 or higher
X$KSLWS No[W]ait and [S]leep [C]ount stats by Context -7.3 or higher
X$KSMCX E[X]tended statistics on usage - 7.3.1 or lower
X$KSMFSV Addresses of [F]ixed [S]GA [V]ariables - 7.2.1 or higher
X$KSMHP Any [H]ea[P] - 7.3.2 and above
X$KSMLRU LR[U] flushes from the shared pool
X$KSMMEM map of the entire SGA - 7.2.0 or higher
X$KSMPP [P]GA Hea[P] - 7.3.2 and above
X$KSMSD Size [D]efinition for Fixed/Variable summary )
X$KSMSP Size (and fragmentation) of the variable component of the SGA.
X$KSMSS Statistics on the objects currently in the cache.
X$KSMUP [U]GA Hea[P] - 7.3.2 and above
X$KSPPCV [C]urrent Session [V]alues - 7.3.2 or above
X$KSPPI [P]arameter [I]nfo ( Names )
X$KSPPSV [S]ystem [V]alues - 7.3.2 or above
X$KSQDN Global [D]atabase [N]ame
X$KSQEQ [E]n[Q]ueue State Object
X$KSQRS Enqueue [R]e[S]ource
X$KSQST Enqueue [S]tatistics by [T]ype
X$KSTEX Code [EX]ecution - 7.2.1 or higher
X$KSUCF Cost [F]unction (resource limit)
X$KSULL Licence [L]imits
X$KSULV NLS [V]alid Values - 7.1.2 or higher

114
X$KSUMYSTA [MY] [ST]atisics (current session)
X$KSUPL Process (resource) [L]imits
X$KSUPR Process object
X$KSUPRLAT [LAT]ch Holder
X$KSURU Resource [U]sage
X$KSUSD [D]escriptors (statistic names)
X$KSUSE [SE]ssion Info
X$KSUSECON [CON]nection Authentication - 7.2.1 or higher
X$KSUSECST Session status for events
X$KSUSESTA Session [STA]tistics
X$KSUSGSTA [G]lobal [ST]atistics
X$KSUSIO [S]ystem [IO] statistics per session
X$KSUTM Ti[M]e in 1/100th seconds
X$KSUXSINST [INST]ance state
X$KSXAFA Current File/Node Affinity
X$KTADM D[M]L lock
X$KTCXB Transaction O[B]ject
X$KTSTSSD [S]ort [S]egment [D]escriptor - per tablespace statistics
X$KTTVS Used to indicate that the tablespace has valid undo segments.
X$KTURD Inuse [D]escriptors
X$KTUXE Transaction [E]ntry (table) - 7.3.2 or above
X$KVII [I]nitialisation Instance parameters
X$KVIS [S]izes of structure elements
X$KVIT [T]ransitory Instance parameters
X$KXFPCDS Parallel Query Client Dequeue Statistics.
X$KXFPCMS Parallel Query Client Message Statistics.
X$KXFPCST Parallel Query Co-ordinator Statistics.
X$KXFPSDS Parallel Query Server Dequeue Statistics.
X$KXFPSMS Parallel Query Server Message Statistics.
X$KXFPSST Parallel Query Server Statistics.
X$KXFPYS S[YS]tem Statistics
X$KXFQSROW Table [Q]ueue Statistics - 7.3.2 or higher
X$KXSBD [B]ind [D]ata - 7.3.2 and above
X$KXSCC SQL [C]ursor [C]ache Data - 7.3.2 and above
X$KZDOS [OS] roles
X$KZLLAB Trusted Oracle Label Table ?
X$KZSPR Enabled [PR]ivileges
X$KZSRO Enabled [RO]les
X$KZSRT Definitions held in the password file.
X$LE Lock [E]lements
X$LE_STAT Lock Conversion [STAT]istics
X$MESSAGES Background Message table
X$NLS_PARAMETERS NLS parameters
X$OPTION Server Options
X$TRACE Current traced events
X$TRACE_IO Current trace I/O statistics
X$TRACES All possible traces
X$UGANCO Current [N]etwork [CO]nnections
X$VERSION Library versions

115

You might also like