Professional Documents
Culture Documents
ORACLE - Dictionary View Ref
ORACLE - Dictionary View Ref
ORACLE - Dictionary View Ref
ORACLE7 DBA
Table of Contents
Oracle7 Server Architecture ............................................................3
Storage Architecture Pyramid .........................................................6
Storage Architecture Pyramid Related Views & Tables..............6
Data Dictionary Views Descriptions..............................................7
Dynamic Performance Tables Descriptions................................13
INIT.ORA Parameters & Description...........................................16
Oracle SQL Reserved Words ........................................................20
Oracle SQL Keywords....................................................................21
PL/SQL Engine Architecture .........................................................23
PL/SQL Definitions.........................................................................23
PL/SQL Reserved Words...............................................................24
DBMS Packages, Procedures & Arguments ..............................26
Page 1
ORACLE7 DBA
Quick Reference Guide
Dave Hunt
Steve Jackson
Sue Jang
Monty Orme
Sandra Schrick
Gareth Sullivan
Mark Sullivan
Victoria Whitlock
Notice: This quick reference guide is meant to assist you, the DBA, in your every
day duties. There is no implied or written warranty on the use of this information.
The author/publisher does not guarantee the accuracy, adequacy, or
completeness of any information contained herein. With your use of this
information, you agree not to hold the author/publisher responsible for the use
of any information provided, errors, omissions or the results obtained from use of
such information.
The information in this document is subject to change without notice. If you find
any problems in the documentation, please report them to the author/publisher.
Page 2
ORACLE7 DBA
Quick Reference Guide
PMON
Shared Pool
Library
Cache
Data
Dictionary
Cache
Pnnnn
RECO
Snnnn
SNPnn
Shared SQL Area
Dnnnn
LCKn
INSTANCE
DBWR
CKPT
LGWR
ARCH
DATABASE
SERVER
DATA
PGA
USER
INDEX
TEMP
USER
Parameter Password
File
File
INIT.ORA orapwSID
Datafiles
ROLLBACK
SYSTEM
Control
Files
Redo
Logs
Redo
Logs
Group 1
Group 2
Archived
Logs
Alert
File
Trace
Files
Item(s)
Alert File
Description
Error messages that occur while the Oracle instance is running
will be written to an alert file. DDL operations are also written
to the alert file, such as STARTUP, SHUTDOWN, ARCHIVE
LOG and RECOVER. Also non-default initialization parameters
are written at the time of instance startup into the alert file.
ARCH
Archives REDO log files at a log file switch. Can archive log
files to tape or to disk.
Archived Logs Created when database is in ARCHIVELOG mode. The ARCH
process archives the redo log file, once LGWR has finished
writing to the redo log file.
CKPT
Optionally started to update the System Change Number in the
data files and the control files.
Control Files
Records the physical structure and status of the database and
is needed to mount and open the database.
Datafiles
Contain all the database data. Logical structures, such as
tables and indexes are physically stored in datafiles.
Data Dictionary The data dictionary consists of a set of base tables and a
associated set of views that are used as a read-only reference
to provide information about the associated database.
Page 3
ORACLE7 DBA
Quick Reference Guide
Dnnn
Page 4
ORACLE7 DBA
Quick Reference Guide
SGA
Shared Pool
SMON
SNPn
Snnn
Trace Files
USER
Page 5
ORACLE7 DBA
Quick Reference Guide
DATA
BASE
TABLE SPACES
DATA FILES
SEGMENTS
EXTENTS
DB BLOCKS
Storage Architecture Pyramid Related Views & Tables
Data Base:
Table Spaces:
Data Files:
Segments:
Extents:
DB Blocks:
The above is a partial list of the available views & tables that relate to the
various areas of the architecture pyramid.
Page 6
ORACLE7 DBA
Quick Reference Guide
ORACLE7 DBA
Quick Reference Guide
ALL_TAB_GRANTS_RECD
ALL_TAB_PRIVS
ALL_TAB_PRIVS_MADE
ALL_TAB_PRIVS_RECD
ALL_TRIGGERS
ALL_TRIGGER_COLS
ALL_UPDATABLE_COLUMNS
ALL_USERS
ALL_VIEWS
ALL_TAB_GRANTS
AUDIT_ACTIONS
CAT
CLU
COLS
COLUMN_PRIVILEGES
DBA_2PC_NEIGHBORS
DBA_2PC_PENDING
DBA_ANALYZE_OBJECTS
DBA_AUDIT_CONNECT
DBA_AUDIT_DBA
DBA_AUDIT_EXISTS
ORACLE7 DBA
Quick Reference Guide
DBA_CONS_COLUMNS
DBA_CROSS_REFS
DBA_DATA_FILES
DBA_DB_LINKS
DBA_DEPENDENCIES
DBA_ERRORS
DBA_EXP_FILES
DBA_EXP_OBJECTS
DBA_EXP_VERSION
DBA_EXTENTS
DBA_FREE_SPACE
DBA_FREE_SPACE_COALESCED
ORACLE7 DBA
Quick Reference Guide
DBA_TAB_COLUMNS
DBA_TAB_COMMENTS
DBA_TAB_GRANTS
DBA_TAB_PRIVS
DBA_TRIGGERS
DBA_TRIGGER_COLS
DBA_TS_QUOTAS
DBA_UPDATABLE_COLUMNS
DBA_USERS
DBA_VIEWS
DICT
DICTIONARY
DICT_COLUMNS
ORACLE7 DBA
Quick Reference Guide
USER_CLUSTERS
Descriptions of user's own clusters
USER_CLUSTER_HASH_EXPRESSIONS
Hash functions for the user's hash clusters
USER_CLU_COLUMNS
Mapping of table columns to cluster columns
USER_COL_COMMENTS
Comments on columns of user's tables and views
USER_COL_GRANTS
Grants on columns for which the user is the owner,
grantor or grantee
USER_COL_GRANTS_MADE
All grants on columns of objects owned by the user
USER_COL_GRANTS_RECD
Grants on columns for which the user is the grantee
USER_COL_PRIVS
Grants on columns for which the user is the owner,
grantor or grantee
USER_COL_PRIVS_MADE
All grants on columns of objects owned by the user
USER_COL_PRIVS_RECD
Grants on columns for which the user is the grantee
USER_CONSTRAINTS
Constraint definitions on user's own tables
USER_CONS_COLUMNS
Information about accessible columns in constraint
definitions
USER_CROSS_REFS
Cross references for user's views and synonyms
USER_DB_LINKS
Database links owned by the user
USER_DEPENDENCIES
Dependencies to and from a users objects
USER_ERRORS
Current errors on stored objects owned by the user
USER_EXTENTS
Extents comprising segments owned by the user
USER_FREE_SPACE
Free extents in tablespaces accessible to the user
USER_HISTOGRAMS
Histograms on columns of user's tables
USER_INDEXES
Description of the user's own indexes
USER_IND_COLUMNS
COLUMNs comprising user's INDEXes or on user's
TABLES
USER_JOBS
All jobs owned by this user
USER_OBJECTS
Objects owned by the user
USER_OBJECT_SIZE
Sizes, in bytes, of various pl/sql objects
USER_OBJ_AUDIT_OPTS
Auditing options for user's own tables and views
USER_REFRESH
All the refresh groups
USER_REFRESH_CHILDREN
All the objects in refresh groups, where the user owns the
refresh group
USER_RESOURCE_LIMITS
Display resource limit of the user
USER_ROLE_PRIVS
Roles granted to current user
USER_SEGMENTS
Storage allocated for all database segments
USER_SEQUENCES
Description of the user's own SEQUENCEs
USER_SNAPSHOTS
Snapshots the user can look at
USER_SNAPSHOT_LOGS
All snapshot logs owned by the user
USER_SOURCE
Source of stored objects accessible to the user
USER_SYNONYMS
The user's private synonyms
USER_SYS_PRIVS
System privileges granted to current user
USER_TABLES
Description of the user's own tables
USER_TABLESPACES
Description of accessible tablespaces
USER_TAB_AUDIT_OPTS
Auditing options for user's own tables and views
USER_TAB_COLUMNS
Columns of user's tables, views and clusters
USER_TAB_COMMENTS
Comments on the tables and views owned by the user
USER_TAB_GRANTS
Grants on objects for which the user is the owner,
grantor or grantee
USER_TAB_GRANTS_MADE
All grants on objects owned by the user
USER_TAB_GRANTS_RECD
Grants on objects for which the user is the grantee
Page 11
ORACLE7 DBA
Quick Reference Guide
USER_TAB_PRIVS
Page 12
ORACLE7 DBA
Quick Reference Guide
V$LIBRARYCACHE
V$LICENSE
V$LOADCSTAT
V$LOADTSTAT
V$LOCK
ORACLE7 DBA
Quick Reference Guide
V$LOCKED_OBJECT
V$LOG
V$LOGFILE
V$LOGHIST
V$LOG_HISTORY
V$MLS_PARAMETERS
V$MTS
V$MYSTAT
V$NLS_PARAMETERS
V$NLS_VALID_VALUES
V$OBJECT_DEPENDENCY
V$OPEN_CURSOR
V$OPTION
V$PARAMETER
V$PQ_SESSTAT
V$PQ_SLAVE
V$PQ_SYSSTAT
V$PQ_TQSTAT
V$PROCESS
V$PWFILE_USERS
V$QUEUE
V$RECOVER_FILE
V$RECOVERY_FILE_STATUS
V$RECOVERY_LOG
V$RECOVERY_STATUS
V$REQDIST
V$RESOURCE
V$ROLLNAME
V$ROLLSTAT
V$ROWCACHE
V$SESSION
V$SESSION_CONNECT_INFO
V$SESSION_CURSOR_CACHE
V$SESSION_EVENT
V$SESSION_WAIT
V$SESSTAT
V$SESS_IO
V$SGA
V$SGASTAT
V$SHARED_POOL_RESERVED
V$SHARED_SERVER
V$SORT_SEGMENT
V$SQL
V$SQLAREA
V$SQLTEXT
Page 14
ORACLE7 DBA
Quick Reference Guide
Page 15
ORACLE7 DBA
Quick Reference Guide
Description
always_anti_join
audit_trail
background_dump_dest
bitmap_merge_area_size
blank_trimming
cache_size_threshold
checkpoint_process
cleanup_rollback_entries
close_cached_open_cursors
commit _point_strength
compatible
compatible_no_recovery
control_files
cpu_count
create_bitmap_area_size
cursor_space_for_time
db_block_buffers
db_block_checkpoint_batch
db_block_checksum
db_block_lru_extended_statistics
db_block_lru_latches
db_block_lru_statistics
db_block_size
db_domain
db_file_multiblock_read_count
db_file_simultaneous_writes
db_file_standby_name_convert
db_files
db_name
dblink_encrypt_login
delayed_logging_block_cleanouts
discrete_transactions_enabled
distributed_lock_timeout
distributed_transactions
Page 16
ORACLE7 DBA
Quick Reference Guide
dml_locks
enqueue_resources
event
fixed_date
gc_db_locks
gc_files_to_locks
gc_freelist_groups
gc_lck_procs
gc_releasable_locks
gc_rollback_locks
gc_rollback_segments
gc_save_rollback_locks
gc_segments
gc_tablespaces
global_names
hash_area_size
hash_join_enabled
hash_multiblock_io_count
ifile
instance_number
job_queue_interval
job_queue_keep_connections
job_queue_processes
license_max_sessions
license_max_users
license_sessions_warning
log_archive_buffer_size
log_archive_buffers
log_archive_dest
log_archive_format
log_archive_start
log_block_checksum
log_buffer
log_checkpoint_interval
log_checkpoint_timeout
log_checkpoints_to_alert
log_file_standby_name_convert
log_files
log_simultaneous_copies
log_small_entry_max_size
ORACLE7 DBA
Quick Reference Guide
max_commit_propagation_delay
max_dump_file_size
max_enabled_roles
max_rollback_segments
max_transaction_branches
mts_dispatchers
mts_listener_address
mts_max_dispatchers
mts_max_servers
mts_multiple_listeners
mts_servers
mts_service
nls_currency
nls_date_format
nls_date_language
nls_iso_currency
nls_language
nls_numeric_characters
nls_sort
nls_territory
open_cursors
open_links
optimizer_mode
optimizer_percent_parallel
oracle_trace_collection_name
oracle_trace_collection_path
oracle_trace_collection_size
oracle_trace_enable
oracle_trace_facility_name
oracle_trace_facility_path
os_authent_prefix
os_roles
parallel_default_max_instances
parallel_max_servers
parallel_min_percent
parallel_min_servers
parallel_server_idle_time
partition_view_enabled
pre_page_sga
processes
recovery_parallelism
remote_dependencies_mode
remote_login_passwordfile
remote_os_authent
remote_os_roles
resource_limit
Page 18
ORACLE7 DBA
Quick Reference Guide
rollback_segments
row_cache_cursors
row_locking
sequence_cache_entries
sequence_cache_hash_buckets
serializable
session_cached_cursors
sessions
shared_pool_reserved_min_alloc
shared_pool_reserved_size
shared_pool_size
snapshot_refresh_interval
snapshot_refresh_keep_connections
snapshot_refresh_processes
sort _area_retained_size
sort _area_size
sort _direct_writes
sort _read_fac
sort _spacemap_size
sort _write_buffer_size
sort _write_buffers
sql92_security
sql_trace
temporary_table_locks
text_enable
thread
timed_statistics
transactions
transactions_per_rollback_segment
user_dump_dest
utl_file_dir
Page 19
ORACLE7 DBA
Quick Reference Guide
Page 20
IDENTIFIED
IMMEDIATE
IN*
INCREMENT
INDEX
INITIAL
INSERT*
INTEGER*
INTERSECT
INTO*
IS*
LEVEL
LIKE*
LOCK
LONG
MAXEXTENTS
MINUS
MODE
MODIFY
NOAUDIT
NOCOMPRESS
NOT*
NOWAIT
NULL*
NUMBER
OF*
OFFLINE
ON*
ONLINE
OPTION*
OR*
ORDER*
PCTFREE
PRIOR
PRIVILEGES*
PUBLIC*
RAW
RENAME
RESOURCE
REVOKE
ROW
ROWID
ROWLABEL
ROWNUM
ROWS
SELECT*
SESSION
SET*
SHARE
SIZE
SMALLINT*
START
SUCCESSFUL
SYNONYM
SYSDATE
TABLE*
THEN
TO*
TRIGGER
UID
UNION*
UNIQUE*
UPDATE*
USER*
VALIDATE
VALUES*
VARCHAR
VARCHAR2
VIEW*
WHENEVER
WHERE*
WITH*
ORACLE7 DBA
Quick Reference Guide
DOUBLE*
DUMP
EACH
ENABLE
END*
ESCAPE*
EVENTS
EXCEPT
EXCEPTIONS
EXEC*
EXPLAIN
EXECUTE
EXTENT
EXTERNALLY
FETCH*
FLUSH
FREELIST
FREELISTS
FORCE
FOREIGN*
FORTRAN*
FOUND*
FUNCTION
GO*
GOTO*
GROUPS
INCLUDING
INDICATOR*
INITRANS
INSTANCE
INT*
KEY*
LANGUAGE*
LAYER
LINK
LISTS
LOGFILE
MANAGE
MANUAL
MAX*
MAXDATAFILES
MAXINISTANCES
MAXLOGFILES
MAXLOGHISTORY
MAXLOGMEMBERS
MAXTRANS
MAXVALUE
MIN*
MINEXTENTS
MINVALUE
MODULE*
MOUNT
NEXT
NEW
NOARCHIVELOG
NOCACHE
NOCYCLE
NOMAXVALUE
NOMINVALUE
NONE
NOORDER
NORESETLOGS
NORMAL
NOSORT
NUMERIC*
OFF
OLD
ONLY
OPTIMAL
OPEN*
OWN
PACKAGE
PARALLEL
PASCAL*
PCTINCREASE
PCTUSED
PLAN
PLI*
Page 21
ORACLE7 DBA
Quick Reference Guide
PRECISION*
PRIMARY*
PRIVATE
PROCEDURE*
PROFILE
QUOTA
READ
REAL*
RECOVER
REFERENCES*
REFERENCING
RESETLOGS
RESTRICTED
REUSE
ROLE
ROLES
ROLLBACK*
SAVEPOINT
Page 22
SCHEMA*
SCN
SECTION*
SEGMENT
SEQUENCE
SHARED
SNAPSHOT
SOME*
SORT
SQLCODE*
SQLERROR*
STATEMENT_ID
STATISTICS
STOP
STORAGE
SUM*
SWITCH
SYSTEM
TABLES
TABLESPACE
TEMPORARY
THREAD
TIME
TRACING
TRANSACTION
TRIGGERS
TRUNCATE
UNDER
UNLIMITED
UNTIL
USE
USING
WHEN
WRITE
WORK*
ORACLE7 DBA
Quick Reference Guide
Client Side
Designer/2000
Developer/2000
Discoverer/200
Procedure Builder
Server Side
PL/SQL
Engine
SQL Commands
SQL
Engine
SQL Commands
PL/SQL Engine
PL/SQL Definitions
PL/SQL
Block
Trigger
Function
Package
Procedure
ORACLE7 DBA
Quick Reference Guide
CURRVAL
CURSOR
DATABASE
DATA_BASE
DATE*
DBA
DEBUGOFF
DEBUGON
DECLARE
DECIMAL*
DEFAULT*
DEFINITION
DELAY
DELETE*
DELTA
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*
MODIFY*
NATURAL
NATURALN
NEW
NEXTVAL
NOAUDIT*
NOCOMPRESS*
NOT*
NOWAIT*
NULL*
NUMBER*
NUMBER_BASE
OF*
ORACLE7 DBA
Quick Reference Guide
OFFLINE*
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*
SEPARATE
SESSION*
SET*
SHARE*
SIZE*
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
Page 25
ORACLE7 DBA
Quick Reference Guide
ORACLE7 DBA
Quick Reference Guide
analyze_object
schema
name
type
schema
name
method
estimate_rows
estimate_percent
method_opt
in
in
in
in
in
in
in
in
in
varchar2
varchar2
varchar2
varchar2
varchar2
varchar2
number
number
varchar2
DBMS_DESCRIBE
Created with:
dbmsdesc.sql
Given a stored procedure, returns a description of the arguments required to call that
procedure.
Procedure
Argument(s)
In/Out
Datatype
describe_procedures
object_name
in
varchar2
reserved1
in
varchar2
reserved2
in
varchar2
overload
out
number_table
position
out
number_table
level
out
number_table
argument_name
out
varchar2_table
datatype
out
number_table
default_value
out
number_table
in_out
out
number_table
length
out
number_table
precision
out
number_table
scale
out
number_table
radix
out
number_table
space
out
number_table
DBMS_JOB
Created with:
dbmsjob.sql
Interface for the job queue and scheduling of procedures. The catalog view dba_jobs and
dba_jobs_running are related and created with catjobq.sql. Out of all these routines, only
dbms_job.run and dbms_ijob.run have implicit commits.
Procedure
Argument(s)
In/Out
Datatype
isubmit
job
in
binary_integer
what
in
varchar2
next_date
in
date
interval
in
varchar2
no_parse
in
boolean
submit
job
out
binary_integer
what
in
varchar2
next_date
in
date
interval
in
varchar2
no_parse
in
boolean
remove
job
in
binary_integer
change
job
in
binary_integer
what
in
varchar2
next_date
in
date
Page 27
ORACLE7 DBA
Quick Reference Guide
what
next_date
interval
broken
run
user_export
check_privs
interval
no_parse
job
what
job
next_date
job
interval
job
broken
next_date
job
job
mycall
job
in
in
in
in
in
in
in
in
in
in
in
in
in
in/out
in
varchar2
boolean
binary_integer
varchar2
binary_integer
date
binary_integer
varchar2
binary_integer
boolean
date
binary_integer
binary_integer
varchar2
binary_integer
DBMS_LOCK
Created with:
dbmslock.sql
These routines allow the user to request, convert and release locks. The locks are managed by
the rdbms lock management services. All lock ids are prepended with the 'UL' prefix so that
they cannot conflict with DBMS locks. These locks will show up in the OEM lock monitor
screen and in the appropriate fixed views.
Procedure
Argument(s)
In/Out
Datatype
Return
allocate_unique
lock_name
in
varchar2
lock_handle
out
varchar2
expiration_sec
in
integer
request (function)
id
in
integer
integer
lockmode
in
integer
timeout
in
integer
release_on_commit in
boolean
convert (function)
id
in
integer
integer
lockmode
in
integer
timeout
in
integer
release_on_commit in
boolean
release (function)
id
in
integer
integer
sleep
seconds
in
number
DBMS_MAIL
Created with:
dbmsmail.sql
This package is an interface to the Oracle*Mail product. You can send an Oracle*Mail
message by calling the 'send' procedure. The mail will be sent when the transaction is
committed. This procedure can be called from a trigger. This package will work with
Version 1.1 of Oracle*Mail.
Procedure
Argument(s)
In/Out
Datatype
send
from_str
in
varchar2
to_str
in
varchar2
cc
in
varchar2
bcc
in
varchar2
subject
in
varchar2
reply_to
in
varchar2
body
in
varchar2
Page 28
ORACLE7 DBA
Quick Reference Guide
DBMS_OUTPUT
Created with:
dbmsotpt.sql
These procedures accumulate information in a buffer (via "put" and "put_line") so that it can
be retrieved out later (via "get_line" or "get_lines"). If this package is disabled then all calls
to this package are simply ignored. This way, these routines are only active when the client is
one that is able to deal with the information. This is good for debugging, or SP's that want
to want to display messages or reports to sql*dba or sql*plus (like 'describing procedures',
etc.). The default buffer size is 20000 bytes. The minimum is 2000 and the maximum is
1,000,000.
Procedure
Argument(s)
In/Out
Datatype
enable
buffer_size
in
integer
disable
put
in
number
put
in
varchar2
put
in
date
put_line
in
number
put_line
in
varchar2
put_line
in
date
new_line
get_line
line
out
varchar2
status
out
integer
get_lines
lines
out
varchar2_table
numlines
in/out
integer
DBMS_PIPE
Created with:
dbmspipe.sql
Allow sessions to pass information between them through named SGA memory "pipes".
This package provides a DBMS "pipe" service which allows messages to be sent between
sessions. Pipes operate independently of transactions. They also operate asynchronously.
Procedure
Argument(s)
In/Out
Datatype
Return
pack_message
item
in
varchar2
pack_message
item
in
number
pack_message
item
in
date
pack_message_raw
item
in
raw
pack_message_rowid
item
in
rowid
unpack_message
item
in
varchar2
unpack_message
item
in
number
unpack_message
item
in
date
unpack_message_raw
item
in
raw
unpack_message_rowid item
in
rowid
next_item_type (function)
integer
create_pipe (function)
pipename
in
varchar2
integer
maxpipesize
in
integer
private
in
boolean
remove_pipe (function) pipename
in
varchar2
integer
send_message (function) pipename
in
varchar2
integer
timeout
in
integer
maxpipesize
in
integer
receive_message (function)
pipename
in
varchar2
integer
Page 29
ORACLE7 DBA
Quick Reference Guide
timeout
reset_buffer
purge
pipename
unique_session_name (function)
in
integer
in
varchar2
varchar2
DBMS_SHARED_POOL
Created with:
dbmspool.sql
This package allows you to display the sizes of objects in the shared pool, and mark them for
keeping or unkeeping in order to reduce memory fragmentation. This package provides
access to the shared pool. This is the shared memory area where cursors and PL/SQL objects
are stored.
Procedure
Argument(s)
In/Out
Datatype
sizes
minsize
in
number
keep
name
in
varchar2
flag
in
char
unkeep
name
in
varchar2
flag
in
char
aborted_request_threshold
threshold_size
in
number
DBMS_SPACE
Created with:
dbmsutil.sql
Provides segment space information not available through the standard views.
Procedure
Argument(s)
In/Out
Datatype
unused_space
segment_owner
in
varchar2
segment_name
in
varchar2
segment_type
in
varchar2
total_blocks
out
number
total_bytes
out
number
unused_blocks
out
number
unused_bytes
out
number
last_used_extent_file_id out
number
last_used_extent_block_id out
number
last_used_block
out
number
free_blocks
segment_owner
in
varchar2
segment_name
in
varchar2
segment_type
in
varchar2
freelist_group_id
in
number
free_blks
out
number
scan_limit
in
number
DBMS_SYSTEM
Created with:
dbmsutil.sql
Provides a few system level utilities. It is only accessible to user SYS, by default. You can
control access to these routines only by granting execute to privileged users.
Procedure
Argument(s)
In/Out
Datatype
set_ev
si
in
binary_integer
se
in
binary_integer
ev
in
binary_integer
le
in
binary_integer
Page 30
ORACLE7 DBA
Quick Reference Guide
nm
iev
oev
dist_txn_sync
inst_num
set_sql_trace_in_session sid
serial#
sql_trace
read_ev
in
in
out
in
in
in
in
varchar2
binary_integer
binary_integer
number
number
number
boolean
DBMS_TRANSACTION
Created with:
dbmsutil.sql
Provides access to SQL transaction statements from stored procedures. It also provides
functions for monitoring transaction activities.
Procedure
Argument(s)
In/Out
Datatype
Return
advise_rollback
advise_nothing
advise_commit
commit _comment
cmnt
in
varchar2
commit _force
xid
in
varchar2
scn
in
varchar2
commit
savepoint
savept
in
varchar2
read_only
read_write
rollback
rollback_savepoint
savept
in
varchar2
rollback_force
xid
in
varchar2
begin_discrete_transaction
purge_mixed
xid
in
varchar2
purge_lost_db_entry
xid
in
varchar2
local_transaction_id (function)
create_transaction
in
boolean
varchar2
step_id (function)
number
use_rollback_segment
rb_name
in
varchar2
DBMS_UTILITY
Created with:
dbmsutil.sql
Provides various utility routines,such as analyzing the database or the schema. Please look
into the SQL script used to create this package for more information.
Procedure
Argument(s)
In/Out
Datatype
Return
compile_schema
schema
in
varchar2
analyze_schema
schema
in
varchar2
method
in
varchar2
estimate_rows
in
number
estimate_percent in
number
method_opt
in
varchar2
analyze_database
method
in
varchar2
estimate_rows
in
number
estimate_percent in
number
method_opt
in
varchar2
format _error_stack (function)
varchar2
format _call_stack (function)
varchar2
Page 31
ORACLE7 DBA
Quick Reference Guide
is_parallel_server (function)
get_time (function)
name_resolve
name
context
schema
part1
part2
dblink
part1_type
part2_type
object_number
name_tokenize
name
a
b
c
dblink
nextpos
comma_to_table
list
tablen
tab
table_comma_table
tab
tablen
list
port _string (function)
make_data_block_address (function)
file
block
data_block_address_file (function)
dba
data_block_address_block (function)
dba
get_hash_value (function)
name
base
hash_size
boolean
number
in
in
out
out
out
out
out
out
out
in
out
out
out
out
out
in
out
out
in
out
out
varchar2
number
varchar2
varchar2
varchar2
varchar2
varchar2
varchar2
number
varchar2
varchar2
varchar2
varchar2
varchar2
binary_integer
varchar2
binary_integer
uncl_array
uncl_array
binary_integer
varchar2
varchar2
in
in
number
number
number
in
number
number
in
number
number
in
in
in
varchar2
number
number
number
UTL_HTTP
Created with:
utlhttp.sql
The stored package UTL_HTTP makes HTTP (hyper-text transfer protocol) callouts from
PL/SQL and SQL. You can use it to access data on the internet, or to call Oracle Web Server
Cartridges. The package contains two similar entrypoints, each of which takes a string URL
(universal resource locator), contacts that site, and returns the data (typically HTML - hypertext markup language) obtained from that site..
Procedure
Argument(s)
In/Out
Datatype
Return
purge_mixed
xid
in
varchar2
request (function)
url
in
varchar2
varchar2
request_pieces (function) url
in
varchar2
html_pieces
max_pieces
in
natural
Page 32
ORACLE7 DBA
Quick Reference Guide
Notes
UNIX Quick Reference
The following is a simple reference to several commands available in UNIX. The
following is not a complete list of the command set of UNIX and some command,
if used improperly could render your system unusable.
File Manipulation
Action
append to a file
combine two files
copy files
create a file
create a file
list file contents
list file contents
list file contents
list file contents - last lines
list file contents - last 50 lines
move a file
remove a file - erase
print file - System V
print file - BSD
print file
cat
cat
cp
cat
touch
cat
pg
more
tail
tail
mv
rm
lp
lpr
pr
Command
Example
cat thisfile >> tothisone
cat thisfile1 thisfile2 > tothisone
cp thisfile tothisone
cat > newfile
touch newfile
cat thisfile
pg thisfile
more thisfile
tail thisfile
tail -s 50 thisfile
mv thisfile /usr/home/tohere
rm junkfile
lp thisfile
lpr thisfile
pr thisfile
cd
cd
cd
mkdir
pwd
rmdir
ls
ls
ls
Command
Example
cd /usr/home/merwin
cd ..
cd
mkdir /usr/home/merwin/newdir
pwd
rmdir /usr/home/merwin/junkdir
ls
ls -l
ls -la
passwd
ps
ps
ps
chmod
chown
who
who
Command
passwd
ps
ps -e
ps -fu username
see below
see below
who
who am i
Miscellaneous
Action
change user password
list processes - owner
list processes - everyone
list processes - username
change access privileges
change ownership
who else is logged on
who owns this session
Example
Page 33
ORACLE7 DBA
Quick Reference Guide
Command
Example
chmod 660 filename
chmod chmod 770 filename
chmod 444 filename
chmod 110 filename
Page 34
Command
Example
chown merwin thisfile
chown oracle.dba controlfile3.ctl
chown oracle.dba *
chown oracle.dba /oracle_home
ORACLE7 DBA
Quick Reference Guide
VI Quick Reference
The following is provided to help you with VI, a text editor available for
numerous operating systems. The following is not a complete list of the
command set or the macro language available in VI.
Cursor Movement
h or [BkSpc]
j or +
k or 1 or [SPACE]
$
)
(
}
{
^
w
b
e
nG
Character Left
Line Down
Line UP
One Character Right
Go to End Of Line
Next Sentence
Previous Sentence
Next Paragraph
Previous Paragraph
Start Of Line
Next Word
Previous Word
End of Word
Go to Line n
Changing Text
r
R
cw
cc
C
Line
Change Character
Replace Mode
Change Word
Change Line
Change to End Of
Deleting Text
dw
dd
D
Line
u
x
X
Backspace
Delete Word
Delete Line
Delete to End Of
Undo Last Delete
Delete Character
Destructive
Inserting Text
a
A
i
I
Line
o
Below
O
Above
[ESC]
Screen Control
[CTRL] [d]
[CTRL] [u]
[CTRL] [f]
[CTRL] [b]
[CTRL] [l]
Searching Text
/pattern[CR]
/[CR]
?pattern[CR]
?[CR]
Search Forwards
Repeat Search
Search Backwards
Repeat Search
Saving / Exiting
:wq or ZZ
:q!
:w filename
Page 35
ORACLE7 DBA
Quick Reference Guide
ORACLE7 DBA
Table of Contents
Backup and Recovery Considerations........................................ 38
Backup Checklist - Cold or Offline............................................... 39
Backup Checklist - Hot or Online................................................. 39
Performance Tuning Considerations........................................... 40
Performance Tuning Steps............................................................ 41
Performance Tuning Related Views ............................................. 42
DBA Daily Task List...................................................................... 43
Documentation Recommendations.............................................. 45
Page 36
ORACLE7 DBA
Quick Reference Guide
Dave Hunt
Steve Jackson
Sue Jang
Monty Orme
Sandra Schrick
Gareth Sullivan
Mark Sullivan
Victoria Whitlock
Notice: This quick reference guide is meant to assist you, the DBA, in your every
day duties. There is no implied or written warranty on the use of this information.
The author/publisher does not guarantee the accuracy, adequacy, or
completeness of any information contained herein. With your use of this
information, you agree not to hold the author/publisher responsible for the use
of any information provided, errors, omissions or the results obtained from use of
such information.
The information in this document is subject to change without notice. If you find
any problems in the documentation, please report them to the author/publisher.
Page 37
ORACLE7 DBA
Quick Reference Guide
Page 38
ORACLE7 DBA
Quick Reference Guide
Files or Views
V$DATAFILE
V$LOGFILE
V$CONTROLFILE
$ORACLE_HOME/dbs/init<SID>.ora
$ORACLE_HOME/dbs/orapwd<SID>
Method of Backup
Online Database Backup
Operated in ARCHIVELOG Mode
ALTER DATABASE BACKUP
CONTROLFILE TO /somepath/control.bak
Copy INIT.ORA to a backup area or device
Copy $ORACLE_HOME/dbs/orapw<SID>
to a backup area or device
Page 39
ORACLE7 DBA
Quick Reference Guide
Page 40
ORACLE7 DBA
Quick Reference Guide
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Page 41
ORACLE7 DBA
Quick Reference Guide
Memory
V$DB_OBJECT_CACHE
V$LIBRARYCACHE
V$SGASTAT
V$SYSSTAT
Disk
V$DATAFILE
V$DBFILE
V$FILESTAT
V$LOG
V$LOGFILE
V$LOGHIST
V$LOG_HISTORY
V$SESS_IO
User/Session
V$LOCK
V$OPEN_CURSOR
V$PROCESS
V$SESSION
V$SESSION_EVENT
V$SESSION_WAIT
V$SESSTAT
V$TRANSACTION
Contention
V$LATCH
V$LOCK
V$ROLLNAME
V$ROLLSTAT
V$WAITSTAT
Page 42
ORACLE7 DBA
Quick Reference Guide
System Hardware
Is hardware operating correctly?
If not, have you logged entries and notified appropriate personnel?
Review hardware operations log.
Has hardware been operating correctly?
Are there any relationships or coincidences of failures?
Operating System
Are you noticing any OS paging or swapping?
If so, have you notified appropriate personnel?
Verify your OS version and level?
Are there any new required patches or bug fixes?
Have there been any core dumps?
Can you remove the core dump files?
Oracle Alert File
Do the Startup Date & Times correspond with operations log?
Any deadlocks notices?
Clean out old Alert File entries as necessary.
Database Backup Recovery
Is your backup procedures working correctly?
Can you clean up unneeded archived redo log files?
Is the database in an OPEN state?
Storage Allocation
Are all needed tablespaces and datafiles online?
Log and review tablespace growth.
Are you extending to often?
Are you running out of extents?
Are your handling datafile growth?
Have rollback segments extended or wrapped?
Are you running out of Operating System file system space?
Are default and temporary tablespaces assigned correctly?
Do you have enough physical storage to handle the current needs?
Page 43
ORACLE7 DBA
Quick Reference Guide
Security
Review user list for any new users.
Has any new users been added?
Are default and temporary tablespaces assigned correctly?
Are the new users privileges and roles assigned appropriately?
Any new entries in external password file?
What is the status of Oracle auditing?
Review SYS.AUD$ table entries.
Notice any suspicious activities?
Cleanup SYS.AUD$ unnecessary entries.
Are you doing unnecessary auditing?
Page 44
ORACLE7 DBA
Quick Reference Guide
Documentation Recommendations
The following is a list of documents that you as a DBA should be maintaining,
have available or making available. You will notice a simple description of
each manual or document is included.. The level of depth of your
documentation depends on your environment and necessary business
requirements. Remember that documentation may save your career or provide
justification on an issue.
Any amount of documentation is better than no documentation. In an effort to
get you started, you may find it easier to start out with several labeled three
ring binders. Put the documents you feel that belong in each of the related
binders. Then separate the documentation in each binder into related sections,
separated by numbered tabbed separators. Then build a table of contents
based on the numbered tabbed separators.
Operation Manual
Provides an indexed base of knowledge for those that may need to work on the
system when the DBA or the System Administrator is not available. Think of this
document as the list activities that you or others may have to do, both in normal
day to day operation, and possibly emergency operational procedures.
This document should also include contact names and related information of the
various products installed. This document should also include simple procedures on
how to perform startup, shutdown, emergency shutdown procedures and how to
invoke various modes of operation.
Additionally this manual is an acceptable location for any blank forms for items
such as new user creation or user change requests forms. A list of daily task, and a
signed off log entry when each major task is completed. Possibly even a backup
and recovery log. Which can be as simple as a sign off on a backup tape switch
event. This documentation may possibly incorporate the contents of the
Hardware Documentation and Maintenance Log.
This operation manual might possibly include a sealed envelope containing both
the Super User, of the operating system, and the Oracle SYS and SYSTEM
passwords. That envelope should be clearly marked to be open only by
management in case of an emergency. Simply put, this the day to day operation
documentation in case you, the DBA and/or the System Administrator, gets hit by
a bus.
ORACLE7 DBA
Quick Reference Guide
record of who, what , when and why. You may wish to include the start and finish
time of each event. This will help you with your service level agreements. This
document may be included as part of the Operation Manual.
ORACLE7 DBA
Quick Reference Guide
This log should not included the procedures for testing and verifying the validity of
your backups. This type of information should be in the Oracle Database
Administration Manual and recovery should only be performed by the DBA.
Page 47
ORACLE7 DBA
Quick Reference Guide
Notes
Page 48