Вы находитесь на странице: 1из 105

Revision no.

: PPT/2K403/02
Creating an Oracle Database
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
2
Creation Prerequisites
Install the software.
Creating the File System for the Database
Sizing the File system
Space for the tables
Space for the indexes
Space for the undo tablespace
Space for the temporary tablespace
Choosing the Location for the Files
Either by using OFA or manual.
Size the redo log files
Ensuring enough Memory is allocated.
Getting Necessary Authorizations.
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
3
Operating System Environment
On UNIX set the following environment variables:
ORACLE_HOME
ORACLE_SID
ORACLE_BASE
PATH
LD_LIBRARY_PATH
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
4
Preparing the Parameter File
Create the new init<SID>.ora.
$cp init.ora $ORACLE_HOME/dbs/initU16.ora
Modify the initU16.ora by editing the parameters.
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
5
Starting the Instance
Connect as SYSDBA.
Start the instance in NOMOUNT stage.
SQL> connect sys as sysdba
Enter password:
Connected to an idle instance.
SQL> startup nomount
You can see all the background processes for your database
instance having been started at this point by using ps ef
command.
At this point, go to the location of your bdump directory and
see the alert log file.
The alert log file gives you all the details of your instance
creation process.
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
6
Creating the Database
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
7
Creating the Database ( contd. )
Oracle mounts and opens the database at this stage.
Run Oracle Scripts to create Data Dictionary Objects
Catalog.sql
Populates the database with the data dictionary view, public
synonums, and other objects.
Location $ORACLE_HOME/rdbms/admin/catalog.sql
Catproc.sql
Creates the Oracle-provided packages and other objects to
support the use of PL/SQL code in the database.
Location $ORACLE_HOME/rdbms/admin/catproc.sql
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
8
After Creation of the Database
Create additional tablespaces for user data.
Changing the Passwords for the Default Users
Changing the Archive Logging Mode.
Running the Pupbld.sql file.
Create a Server Parameter File ( spfile )
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
9
The SPFILE Initialization Parameter
The SPFILE initialization parameter contains the name of the
current server parameter file.
When the default server parameter file is used by the server
(that is, you issue a STARTUP command and do not specify a
PFILE), the value of SPFILE is internally set by the server.
The SQL*Plus command SHOW PARAMETERS SPFILE
displays the name of the server parameter file that is currently
in use.
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
10
Using ALTER SYSTEM to Change Initialization
Parameter Values
The ALTER SYSTEM statement allows you to set, change, or
delete (restore to default value) initialization parameter values.
When the ALTER SYSTEM statement is used to alter a
parameter setting in a traditional initialization parameter file,
the change affects only the current instance, since there is no
mechanism for automatically updating initialization parameters
on disk.
They must be manually updated in order to be passed to a
future instance.
Using a server parameter file overcomes this limitation.
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
11
Setting or Changing Initialization Parameter
Values
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
12
What are Oracle-Managed Files?
Using Oracle-managed files simplifies the administration of an
Oracle database.
Oracle-managed files eliminate the need for you, the DBA, to
directly manage the operating system files comprising an
Oracle database.
You specify operations in terms of database objects rather
than filenames.
Oracle internally uses standard file system interfaces to create
and delete files as needed for the following database
structures:
Tablespaces
Online redo log files
Control files
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
13
What are Oracle-Managed Files?( contd. )
Through initialization parameters, you specify the file system
directory to be used for a particular type of file.
Oracle then ensures that a unique file, an Oracle-managed file,
is created and deleted when no longer needed.
This feature does not affect the creation or naming of
administrative files such as trace files, audit files, alert files,
and core files.
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
14
Enabling the Creation and Use of Oracle-
Managed Files
DB_CREATE_FILE_DEST
Defines the location of the default file system directory where
Oracle creates datafiles or tempfiles when no file specification is
given in the creation operation.
Also used as a default file system directory for online redo log file
and control files if DB_CREATE_ONLINE_LOG_DEST_n is not
specified.
DB_CREATE_ONLINE_LOG_DEST_n
Defines the location of the default file system directory for online
redo log files and control files when no file specification is given
in the creation operation.
You can use this initialization parameter multiple times, where n
specifies the multiplexed copy of the online redo log or control
file.
You can specify up to 5 multiplexed copies.
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
15
How Oracle-Managed Files are Named
The filenames of Oracle-managed files comply with the Oracle
Flexible Architecture (OFA) standard for file naming.
The assigned names are intended to meet the following
requirements:
Database files are easily distinguishable from all other files.
Control files, online redo log files, and datafiles are identifiable as
such.
The association of datafile to tablespace is clearly indicated.
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
16
How Oracle-Managed Files are Named (contd.)
No two Oracle-managed files are given the same name. The
name that is used for creation of an Oracle-managed file is
constructed from three sources.
The default file system directory location
A port-specific file name template that is chosen based on the
type of file
A unique string created by the Oracle database server or the
operating system. This ensures that file creation does not damage
an existing file and that the file cannot be mistaken for some other
file.
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
17
Oracle-managed files have the following
format on Solaris:
where:
%t is the tablespace name.
At most, eight characters of the tablespace name are used.
If eight characters causes the name to be too long, then the
tablespace name is truncated.
Placing the tablespace name before the uniqueness string means that
all the datafiles for a tablespace appear next to each other in an
alphabetic file listing.
%u is an eight character string that guarantees uniqueness
%g is the online redo log file group number.
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
18
Startup and Shutdown in Stages of the
Database
OPEN OPEN
MOUNT MOUNT
NOMOUNT NOMOUNT
SHUTDOWN SHUTDOWN
All files opened as All files opened as
described by the control described by the control
file for this file for this
instance. instance.
Control file opened Control file opened
for this instance. for this instance.
Instance Instance
started. started.
S
H
U
T
D
O
W
N
S
H
U
T
D
O
W
N
S
T
A
R
T
U
P
S
T
A
R
T
U
P
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
19
Startup and Shutdown (contd.)
Starting an instance includes:
Reading the parameter file
Allocating the SGA
Starting the background processes
Opening the ALERT and trace files
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
20
STARTUP Command
Start up the instance, and open the database.
STARTUP [FORCE][RESTRICT][PFILE = filename]
[OPEN [RECOVER][database]
| MOUNT
| NOMOUNT]
STARTUP PFILE=/DISK1/initU15.ora
STARTUP PFILE=/DISK1/initU15.ora
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
21
STARTUP Command
OPEN: enables users to access the database
MOUNT: mounts the database for certain activities but does
not allow user access to db
NOMOUNT: creates SGA + background processes; no access
to database
FORCE: aborts the running instance before performing a
normal startup
RESTRICT: restricted access
RECOVER: begins media recovery
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
22
ALTER DATABASE Command
Change state of the database from NOMOUNT to MOUNT
ALTER DATABASE database MOUNT
Open the database as a read-only database
ALTER DATABASE database OPEN READ ONLY
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
23
Opening a Database in Read-Only Mode
Any database can be opened as a read-only database
A read-only database can be used to:
Execute queries
Execute disk sorts
Take datafiles offline and online
Perform recovery of offline data files
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
24
Shutdown Options
T
X
X
I
X
X
X
A
X
X
X
X
Shutdown Mode
Allow new connections
Wait until current sessions end
Wait until current transactions end
Force a checkpoint and close files
N
X
Shutdown mode:
A Abort I Immediate
T Transactional N Normal
YES
NO
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
25
Shutdown Time
Immediate
Transactional
Time Time
Normal
Abort
4
3
1
2
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
26
Quiescing a Database
There are times when there is a need to put a database into a
state where only DBA transactions, queries, fetches, or
PL/SQL statements are allowed.
This is called a quiesced state, in the sense that there are no
ongoing non-DBA transactions, queries, fetches, or PL/SQL
statements in the system.
This quiesced state allows you or other administrators to
perform actions that cannot safely be done otherwise.
To place a database into a quiesced state, issue the following
statement:
ALTER SYSTEM QUIESCE RESTRICTED;
The following statement restores the database to normal
operation:
ALTER SYSTEM UNQUIESCE;
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
27
Quiescing a Database ( contd. )
These actions are categorized as follows:
Actions that can fail if concurrent user transactions access the
same object.
For example, changing the schema of a database table or adding a
column to an existing table where a no-wait lock is required.
Actions whose undesirable intermediate effect can be seen by
concurrent user transactions.
For example, a multistep procedure for reorganizing a table where
the table is first exported, then dropped, and finally imported.
A concurrent user who attempted to access the table after it was
dropped, but before import, would see disturbing results.
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
28
Suspending and Resuming a Database
The ALTER SYSTEM SUSPEND statement suspends a
database by halting all input and output (I/O) to datafiles (file
header and file data) and control files, thus allowing a
database to be backed up without I/O interference.
When the database is suspended all preexisting I/O operations
are allowed to complete and any new database accesses are
placed in a queued state.
The suspend command suspends the database, and is not
specific to an instance.
However, do not start a new instance while you suspend
another instance, since the new instance will not be
suspended.
Use the ALTER SYSTEM RESUME statement to resume normal
database operations.
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
29
Dynamic Performance Views
Maintained by the Oracle Server and continuously updated
Contain data on disk and memory structures
Contain data that is useful for performance tuning
Have public synonyms with the prefix V$
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
30
Accessing Dynamic Performance Views
OPEN OPEN
MOUNT MOUNT
NOMOUNT NOMOUNT
Data dictionary Data dictionary
Dynamic performance Dynamic performance
views reading data from views reading data from
disk disk
Dynamic Dynamic
performance performance
views reading from views reading from
memory memory SHUTDOWN SHUTDOWN
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
31
Example
V$PARAMETER
V$SGA
V$OPTION
V$PROCESS
V$SESSION
V$VERSION
V$INSTANCE
Control file
SGA
V$THREAD
V$CONTROLFILE
V$DATABASE
V$DATAFILE
V$DATAFILE_HEADER
V$LOGFILE
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
32
Displaying Current
Parameter Values
Use the Server Manager command:
Query the dynamic performance view V$PARAMETER:
SHOW PARAMETER control
SHOW PARAMETER control
SELECT name FROM v$parameter
WHERE name LIKE %control%;
SELECT name FROM v$parameter
WHERE name LIKE %control%;
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
33
Dynamic Initialization Parameters
Some initialization parameters can be modified while an
instance is running.
ALTER SESSION SET SQL_TRACE=true;
ALTER SESSION SET SQL_TRACE=true;
ALTER SYSTEM SET TIMED_STATISTICS=true;
ALTER SYSTEM SET TIMED_STATISTICS=true;
ALTER SYSTEM SET SORT_AREA_SIZE=131072
DEFERRED;
ALTER SYSTEM SET SORT_AREA_SIZE=131072
DEFERRED;
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
34
Enable and Disable
Restricted Session
Use the STARTUP command to restrict access to a database:
Use the ALTER SYSTEM command to place an instance in
restricted mode:
STARTUP RESTRICT
STARTUP RESTRICT
ALTER SYSTEM ENABLE RESTRICTED
SESSION;
ALTER SYSTEM ENABLE RESTRICTED
SESSION;
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
35
Terminating Sessions
Identify which session to terminate with the dynamic
performance view V$SESSION:
Execute the ALTER SYSTEM command:
SELECT sid, serial# FROM v$session WHERE
username=SCOTT;
SELECT sid, serial# FROM v$session WHERE
username=SCOTT;
ALTER SYSTEM KILL SESSION 7,15;
ALTER SYSTEM KILL SESSION 7,15;
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
36
Trace Files
Trace files can be written by server and background
processes.
Oracle dumps information about errors in trace files.
The ALERT file consists of a chronological log of messages
and errors.
Server process tracing can be enabled or disabled by:
An ALTER SESSION command
The parameter SQL_TRACE
Check the ALERT file periodically to:
Detect internal errors (ORA-600) and block corruption errors
Monitor database operations View the nondefault initialization
parameter
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
37
Important Oracle9i Initialization Parameters
Audit-Related Parameters
Database Name and Other General Parameters
File-Related Parameters
Oracle Managed Files Parameters
Process and Session Parameters
Memory Configuration Parameters
Archive Log Parameters
Undo Space Parameters
Rollback Segment Parameters
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
38
Important Oracle9i Initialization Parameters(contd )
Oracle Licensing-Related Parameters
Performance and Diagnostics Related Parameters
Recovery-Related Parameters
Data Block Verification Parameters
Security-Related Parameters
Undocumented Initialization Parameters
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
39
Audit-Related Parameters
Audit_File_Dest
specifies the directory where Oracle stores auditing files.
Parameter type : String
Syntax : AUDIT_FILE_DEST = 'directory'
Default value : ORACLE_HOME/rdbms/audit
Parameter class : Static
Audit_Trail
enables or disables the automatic writing of rows to the audit trail.
Parameter type : String
Syntax : AUDIT_TRAIL = {NONE | FALSE | DB | TRUE | OS}
Default value : There is no default value.
Parameter class : Static
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
40
Audit-Related Parameters (contd )
Audit_Sys_Operations
enables or disables the auditing of operations issued by user
SYS, and users connecting with SYSDBA or SYSOPER privileges.
The audit records are written to the operating system's audit trail.
Parameter type : Boolean
Default value : false
Parameter class : Static
Range of values : true | false
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
41
Audit-Related Parameters (contd )
Transaction_Audit
If Transaction_Audit is true, Oracle generates a special redo
record that contains the user logon name, username, the session
ID, some operating system information, and client information.
Parameter type : Boolean
Default value : true
Parameter class : Dynamic: ALTER SYSTEM ... DEFERRED
Range of values : true | false
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
42
Database Name and Other General Parameters
Db_Name
specifies a database identifier of up to 8 characters.
If specified, it must correspond to the name specified in the
CREATE DATABASE statement. Although the use of DB_NAME is
optional, you should generally set it before issuing the CREATE
DATABASE statement, and then reference it in that statement.
The following characters are valid in a database name:
alphanumeric characters, underscore (_), number sign (#), and
dollar sign ($). No other characters are valid.
The database name is case insensitive.
Parameter type : String
Syntax : DB_NAME = database_name
Default value : There is no default value.
Parameter class : Static
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
43
Database Name and Other General Parameters
(contd )
Db_Domain
In a distributed database system, Db_Domain specifies the logical
location of the database within the network structure.
You should set this parameter if this database is or ever will be
part of a distributed system.
The value consists of the extension components of a global
database name, consisting of valid identifiers, separated by
periods.
Oracle Corporation recommends that you specify DB_DOMAIN as
a unique string for all databases in a domain.
Parameter type : String
Syntax : DB_DOMAIN = domain_name
Default value : There is no default value.
Parameter class : Static
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
44
Database Name and Other General Parameters
(contd )
Instance_Name
The instance_name parameter will have the same value as the
db_name parameter.
Parameter type : String
Syntax : INSTANCE_NAME = instance_id
Default value : The instance's SID
Parameter class : Static
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
45
Database Name and Other General Parameters
(contd )
Service_Names
specifies one or more names for the database service to which
this instance connects.
Parameter type : String
Syntax : SERVICE_NAMES = db_service_name [,
db_service_name [,...] ]
Default value : DB_NAME.DB_DOMAIN if defined
Parameter class : Dynamic: ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
46
Database Name and Other General Parameters
(contd )
Compatible
allows you to use a new release, while at the same time
guaranteeing backward compatibility with an earlier release. This
is helpful if it becomes necessary to revert to the earlier release.
Parameter type : String
Syntax : COMPATIBLE = release_number
Default value : 9.2.0.0.0
Parameter class : Static
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
47
Database Name and Other General Parameters
(contd )
Dispatchers
configures dispatcher processes in the shared server
architecture.
The parsing software supports a name-value syntax to enable the
specification of attributes in a position-independent case-
insensitive manner.
Parameter type : String
Syntax : DISPATCHERS = 'dispatch_clause
Default value : There is no default value.
Parameter class : Dynamic: ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
48
Database Name and Other General Parameters
(contd )
Nls_Date_Format
specifies the default date format to use with the TO_CHAR and
TO_DATE functions.
The default value of this parameter is determined by
NLS_TERRITORY.
If the nls_territory format is America, the nls_date_format
parameter is automatically set to the DD-MON-YY format.
The value of this parameter can be any valid date format mask,
and the value must be surrounded by double quotation marks.
For example: NLS_DATE_FORMAT = "MM/DD/YYYY"
Parameter type : String
Syntax : NLS_DATE_FORMAT = "format"
Default value : Derived from NLS_TERRITORY
Parameter class : Dynamic: ALTER SESSION
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
49
File-Related Parameters (contd )
Control_Files
Every database has a control file, which contains entries that
describe the structure of the database.
Control_Files specifies one or more names of control files,
separated by commas.
Oracle Corporation recommends that you multiplex multiple
control files.
Parameter type : String
Syntax : CONTROL_FILES = filename [, filename [...] ]
Default value : Operating system-dependent
Parameter class : Static
Range of values : 1 to 8 filenames
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
50
File-Related Parameters (contd )
Db_Files
specifies the maximum number of database files that can be
opened for this database.
The maximum valid value is the maximum number of files, subject
to operating system constraint, that will ever be specified for the
database, including files to be added by ADD DATAFILE
statements.
If you increase the value of DB_FILES, then you must shut down
and restart all instances accessing the database before the new
value can take effect.
Parameter type : Integer
Default value : 200
Parameter class : Static
Range of values : operating system-dependent
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
51
File-Related Parameters (contd )
Core_Dump_Dest
is primarily a UNIX parameter and may not be supported on your
platform.
It specifies the directory where Oracle dumps core files.
Parameter type : String
Syntax : CORE_DUMP_DEST = directory
Default value : $ORACLE_HOME/DBS
Parameter class : Dynamic: ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
52
File-Related Parameters (contd )
User_Dump_Dest
specifies the pathname for a directory where the server will write
debugging trace files on behalf of a user process.
Parameter type : String
Syntax : USER_DUMP_DEST = {pathname | directory}
Default value : Operating system-dependent
Parameter class : Dynamic: ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
53
File-Related Parameters (contd )
Background_Dump_Dest
specifies the pathname (directory or disc) where debugging trace
files for the background processes (LGWR, DBWn, and so on) and
Oracle alert log files are written during Oracle operations.
Parameter type : String
Syntax : BACKGROUND_DUMP_DEST = {pathname | directory}
Default value : Operating system-dependent
Parameter class : Dynamic: ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
54
File-Related Parameters (contd )
Utl_File_Dir
lets you specify one or more directories that Oracle should use for
PL/SQL file I/O.
Parameter type : String
Syntax : UTL_FILE_DIR = pathname
Default value : There is no default value.
Parameter class : Static
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
55
Oracle Managed Files Parameters
Db_Create_File_Dest
sets the default location for Oracle-managed datafiles.
This location is also used as the default for Oracle-managed
control files and online redo logs if
DB_CREATE_ONLINE_LOG_DEST_n is not specified.
Parameter type : String
Syntax : DB_CREATE_FILE_DEST = directory
Default value : There is no default value.
Parameter class : Dynamic: ALTER SESSION, ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
56
Oracle Managed Files Parameters (contd )
DB_CREATE_ONLINE_LOG_DEST_n
sets the default location for Oracle-managed control files and
online redo logs.
Parameter type : String
Syntax : DB_CREATE_ONLINE_LOG_DEST_[1 | 2 | 3 | 4 | 5] =
directory
Default value : There is no default value.
Parameter class : Dynamic: ALTER SESSION, ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
57
Process and Session Parameters (contd )
Processes
specifies the maximum number of operating system user
processes that can simultaneously connect to Oracle.
Its value should allow for all background processes such as
locks, job queue processes, and parallel execution processes.
The default values of the SESSIONS and TRANSACTIONS
parameters are derived from this parameter.
Therefore, if you change the value of PROCESSES, you should
evaluate whether to adjust the values of those derived
parameters.
Parameter type : Integer
Default value : Derived from PARALLEL_MAX_SERVERS
Parameter class : Static
Range of values : 6 to operating system-dependent
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
58
Process and Session Parameters (contd )
Db_Writer_Processes
is useful for systems that modify data heavily. It specifies the
initial number of database writer processes for an instance.
Parameter type : Integer
Default value : 1
Parameter class : Static
Range of values : 1 to 20
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
59
Process and Session Parameters (contd )
Sessions
specifies the maximum number of sessions that can be created in
the system. Because every login requires a session, this
parameter effectively determines the maximum number of
concurrent users in the system.
Parameter type : Integer
Default value : Derived: (1.1 * PROCESSES) + 5
Parameter class : Static
Range of values : 1 to 231
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
60
Process and Session Parameters (contd )
Open_Cursors
specifies the maximum number of open cursors (handles to
private SQL areas) a session can have at once. You can use this
parameter to prevent a session from opening an excessive
number of cursors
Parameter type : Integer
Default value : 50
Parameter class : Static
Range of values : 1 to 4294967295 (4 GB -1)
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
61
Memory Configuration Parameters
Db_Cache_Size
specifies the size of the DEFAULT buffer pool for buffers with the
primary block size (the block size defined by the DB_BLOCK_SIZE
parameter).
The value must be at least the size of one granule (smaller values
are automatically rounded up to the granule size).
A value of zero is illegal because zero is the size of the DEFAULT
pool for the standard block size, which is the block size for the
SYSTEM tablespace.
Parameter type : Big integer
Syntax : DB_CACHE_SIZE = integer [K | M | G]
Default value : 48 MB, rounded up to the nearest granule size
Parameter class : Dynamic: ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
62
Memory Configuration Parameters (contd )
Db_Keep_Cache_Size
specifies the size of the KEEP buffer pool.
The size of the buffers in the KEEP buffer pool is the primary
block size (the block size defined by the DB_BLOCK_SIZE
parameter).
Parameter type : Big integer
Syntax : DB_KEEP_CACHE_SIZE = integer [K | M | G]
Default value : 0 (KEEP cache is not configured by default)
Parameter class : Dynamic: ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
63
Memory Configuration Parameters (contd )
Db_nK_Cache_Size
(where n = 2, 4, 8, 16, 32) specifies the size of the cache for the nK
buffers.
You can set this parameter only when DB_BLOCK_SIZE has a
value other than nK.
For example, if DB_BLOCK_SIZE=4096, then it is illegal to specify
the parameter DB_4K_CACHE_SIZE (because the size for the 4 KB
block cache is already specified by DB_CACHE_SIZE).
Parameter type : Big integer
Syntax : DB_[2 | 4 | 8 | 16 | 32]K_CACHE_SIZE = integer [K | M | G]
Default value : 0 (additional block size caches are not configured
by default)
Parameter class : Dynamic: ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
64
Memory Configuration Parameters (contd )
Shared_Pool_Size
specifies (in bytes) the size of the shared pool.
The shared pool consists of the data dictionary and the library
cache.
The shared pool contains shared cursors, stored procedures,
control structures, and other structures.
You can monitor utilization of the shared pool by querying the
view V$SGASTAT.
Parameter type : Big integer
Syntax : SHARED_POOL_SIZE = integer [K | M | G]
Default value :
32-bit platforms: 16 MB, rounded up to the nearest granule size
64-bit platforms: 64 MB, rounded up to the nearest granule size
Parameter class : Dynamic: ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
65
Memory Configuration Parameters (contd )
Shared_Pool_Reserved_Size
specifies (in bytes) the shared pool space that is reserved for
large contiguous requests for shared pool memory.
You can use this parameter to avoid performance degradation in
the shared pool in situations where pool fragmentation forces
Oracle to search for and free chunks of unused pool to satisfy the
current request.
Parameter type : Big integer
Syntax : SHARED_POOL_RESERVED_SIZE = integer [K | M | G]
Default value : 5% of the value of SHARED_POOL_SIZE
Parameter class : Static
Range of values :
Minimum: 5000
Maximum: one half of the value of SHARED_POOL_SIZE
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
66
Memory Configuration Parameters (contd )
Pga_Aggregate_Target
specifies the target aggregate PGA memory available to all server
processes attached to the instance.
You must set this parameter to enable the automatic sizing of SQL
working areas used by memory-intensive SQL operators such as
sort, group-by, hash-join, bitmap merge, and bitmap create.
Oracle uses this parameter as a target for PGA memory.
Parameter type : Big integer
Syntax : PGA_AGGREGATE_TARGET = integer [K | M | G]
Default value : 0 (automatic memory management is turned OFF
by default)
Parameter class : Dynamic: ALTER SYSTEM
Range of values :
Minimum: 10 MB
Maximum: 4096 GB - 1
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
67
Memory Configuration Parameters (contd )
Log_Buffer
specifies the amount of memory (in bytes) that Oracle uses when
buffering redo entries to a redo log file.
Redo log entries contain a record of the changes that have been
made to the database block buffers.
The LGWR process writes redo log entries from the log buffer to a
redo log file.
In general, larger values for LOG_BUFFER reduce redo log file I/O,
particularly if transactions are long or numerous. In a busy
system, a value 65536 or higher is reasonable.
Parameter type : Integer
Default value : 512 KB or 128 KB * CPU_COUNT, whichever is
greater
Parameter class : Static
Range of values : Operating system-dependent
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
68
Memory Configuration Parameters (contd )
Large_Pool
lets you specify the size (in bytes) of the large pool allocation heap.
The large pool allocation heap is used in shared server systems for
session memory, by parallel execution for message buffers, and by
backup processes for disk I/O buffers.
(Parallel execution allocates buffers out of the large pool only when
PARALLEL_AUTOMATIC_TUNING is set to true.)
Parameter type : Big integer
Syntax : LARGE_POOL_SIZE = integer [K | M | G]
Default value : 0 if both of the following are true:
The pool is not required by parallel execution
DBWR_IO_SLAVES is not set
Parameter class : Dynamic: ALTER SYSTEM
Range of values : 300 KB to at least 2 GB (actual maximum is operating
system-specific)
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
69
Memory Configuration Parameters (contd )
Java_Pool_Size
specifies the size (in bytes) of the Java pool, from which the Java
memory manager allocates most Java state during runtime
execution.
This memory includes the shared in-memory representation of
Java method and class definitions, as well as the Java objects
that are migrated to the Java session space at end-of-call.
Parameter type : Big integer
Syntax : LARGE_POOL_SIZE = integer [K | M | G]
Default value : 24 MB, rounded up to the nearest granule size
Parameter class : Static
Range of values :
Minimum: the granule size
Maximum: operating system-dependent
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
70
Memory Configuration Parameters (contd )
Sga_Max_Size
specifies the maximum size of SGA for the lifetime of the instance.
Parameter type : Big integer
Syntax : SGA_MAX_SIZE = integer [K | M | G]
Default value : Initial size of SGA at startup, dependent on the
sizes of different pools in the SGA, such as buffer cache, shared
pool, large pool, and so on.
Parameter class : Static
Range of values : 0 to operating system-dependent
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
71
Memory Configuration Parameters (contd )
Lock_Sga
locks the entire SGA into physical memory.
It is usually advisable to lock the SGA into real (physical) memory,
especially if the use of virtual memory would include storing some
of the SGA using disk space.
This parameter is ignored on platforms that do not support it.
Parameter type : Boolean
Default value : false
Parameter class : Static
Range of values : true | false
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
72
Memory Configuration Parameters (contd )
Db_Cache_Advice
enables or disables statistics gathering used for predicting
behavior with different cache sizes through the
V$DB_CACHE_ADVICE performance view.
Parameter type : String
Syntax : DB_CACHE_ADVICE = {ON | READY | OFF}
Default value :
If STATISTICS_LEVEL is set to TYPICAL or ALL, then ON
If STATISTICS_LEVEL is set to BASIC, then OFF
Parameter class : Dynamic: ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
73
Archive Log Parameters
Log_Archive_Dest_n
parameters (where n = 1, 2, 3, ... 10) define up to ten archive log
destinations. The parameter integer suffix is defined as the handle
displayed by the V$ARCHIVE_DEST dynamic performance view.
Parameter type : String
Syntax : LOG_ARCHIVE_DEST_n = { null_string} | {
LOCATION=path_name | SERVICE=service_name } [ {
MANDATORY | OPTIONAL } ]
Default value : There is no default value.
Parameter class : Dynamic: ALTER SESSION, ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
74
Archive Log Parameters (contd )
Log_Archive_Start
is applicable only when you use the redo log in ARCHIVELOG
mode. It indicates whether archiving should be automatic or
manual when the instance starts up.
The SQL*Plus statements ARCHIVE LOG START or ARCHIVE LOG
STOP override this parameter.
Parameter type : Boolean
Default value : false
Parameter class : Static
Range of values : true | false
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
75
Archive Log Parameters (contd )
Log_Archive_Format
is applicable only if you are using the redo log in ARCHIVELOG
mode.
The string generated from this format is appended to the string
specified in the LOG_ARCHIVE_DEST parameter.
The following variables can be used in the format:
%s log sequence number
%S log sequence number, zero filled
%t thread number
%T thread number, zero filled
Parameter type : String
Syntax : LOG_ARCHIVE_FORMAT = filename
Default value : Operating system-dependent
Parameter class : Static
Range of values : Any string that resolves to a valid filename
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
76
Undo Space Parameters
Undo_Tablespace
specifies the undo tablespace to be used when an instance starts up.
If this parameter is specified when the instance is in manual undo
management mode, an error will occur and startup will fail.
If no undo tablespace is available, the instance will start without an
undo tablespace. In such cases, user transactions will be executed
using the SYSTEM rollback segment.
You can replace an undo tablespace with another undo tablespace
while the instance is running.
Parameter type : String
Syntax : UNDO_TABLESPACE = undoname
Default value : The first available undo tablespace in the database.
Parameter class : Dynamic: ALTER SYSTEM
Range of values : Legal name of an existing undo tablespace
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
77
Undo Space Parameters (contd )
Undo_Management
specifies which undo space management mode the system
should use.
When set to AUTO, the instance starts in automatic undo
management mode.
In manual undo management mode, undo space is allocated
externally as rollback segments.
Parameter type : String
Syntax : UNDO_MANAGEMENT = {MANUAL | AUTO}
Default value : MANUAL
Parameter class : Static
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
78
Undo Space Parameters (contd )
Undo_Retention
specifies (in seconds) the amount of committed undo information
to retain in the database.
You can use UNDO_RETENTION to satisfy queries that require old
undo information to rollback changes to produce older images of
data blocks.
The UNDO_RETENTION parameter works best if the current undo
tablespace has enough space for the active transactions.
Parameter type : Integer
Default value : 900
Parameter class : Dynamic: ALTER SYSTEM
Range of values : 0 to 232-1 (max value represented by 32 bits)
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
79
Oracle Licensing-Related Parameters
License_Max_Users
specifies the maximum number of users you can create in the
database.
When you reach this limit, you cannot create more users. You can,
however, increase the limit.
Do not enable both concurrent usage (session) licensing and user
licensing.
Set either LICENSE_MAX_SESSIONS or LICENSE_MAX_USERS
to zero.
Parameter type : Integer
Default value : 0
Parameter class : Dynamic: ALTER SYSTEM
Range of values : 0 to number of user licenses
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
80
Oracle Licensing-Related Parameters (contd )
License_Max_sessions
specifies the maximum number of concurrent user sessions
allowed.
When this limit is reached, only users with the RESTRICTED
SESSION privilege can connect to the database.
Users who are not able to connect receive a warning message
indicating that the system has reached maximum capacity.
Parameter type : Integer
Default value : 0
Parameter class : Dynamic: ALTER SYSTEM
Range of values : 0 to number of session licenses
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
81
Performance and Diagnostics Related
Parameters
Optimizer_Mode
establishes the default behavior for choosing an optimization
approach for the instance.
You can set the optimizer mode to rule-based, first_rows,
first_rows_n, all_rows, or choose.
If you set it to choose, Oracle will use the cost based optimizer if
the statistics exist for the tables involved in the query.
Parameter type : String
Syntax :
OPTIMIZER_MODE = {first_rows_[1 | 10 | 100 | 1000] | first_rows |
all_rows | choose | rule}
Default value : choose
Parameter class : Dynamic: ALTER SESSION
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
82
Performance and Diagnostics Related
Parameters (contd )
Query_Rewrite_Enabled
allows you to enable or disable query rewriting globally for the
database, which is of importance mostly when you use
materialized views.
You can create materialized views only by setting this parameter
to true.
Parameter type : String
Syntax : QUERY_REWRITE_ENABLED = {force | true | false}
Default value : false
Parameter class : Dynamic: ALTER SESSION, ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
83
Performance and Diagnostics Related
Parameters (contd )
Query_Rewrite_Integrity
determines the degree to which Oracle must enforce query
rewriting.
At the safest level, Oracle does not use query rewrite
transformations that rely on unenforced relationships.
Parameter type : String
Syntax :
QUERY_REWRITE_INTEGRITY = {stale_tolerated | trusted | enforced}
Default value : enforced
Parameter class : Dynamic: ALTER SESSION, ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
84
Performance and Diagnostics Related
Parameters (contd )
Star_Transformation_Enabled
determines whether a cost-based query transformation will be
applied to star queries ( data warehouse).
Parameter type : String
Syntax :
STAR_TRANSFORMATION_ENABLED = {TEMP_DISABLE | TRUE |
FALSE}
Default value : FALSE
Parameter class : Dynamic: ALTER SESSION
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
85
Performance and Diagnostics Related
Parameters (contd )
Cursor_Sharing
determines what kind of SQL statements can share the same
cursors.
The three possible values are forced, exact and similar.
Parameter type : String
Syntax : CURSOR_SHARING = {SIMILAR | EXACT | FORCE}
Default value : EXACT
Parameter class : Dynamic: ALTER SESSION, ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
86
Performance and Diagnostics Related
Parameters (contd )
Cursor_Space_For_Time
lets you use more space for cursors in order to save time. It
affects both the shared SQL area and the client's private SQL
area.
Parameter type : Boolean
Default value : false
Parameter class : Static
Range of values : true | false
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
87
Performance and Diagnostics Related
Parameters (contd )
Db_Block_Size
specifies the size (in bytes) of Oracle database blocks.
Typical values are 2048 and 4096.
The value for DB_BLOCK_SIZE in effect at the time you create the
database determines the size of the blocks.
The value must remain set to its initial value.
Parameter type : Integer
Default value : 2048
Parameter class : Static
Range of values : 2048 to 32768, but your operating system may
have a narrower range
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
88
Performance and Diagnostics Related
Parameters (contd )
Db_File_Multiblock_Read_Count
is one of the parameters you can use to minimize I/O during table
scans.
It specifies the maximum number of blocks read in one I/O
operation during a sequential scan.
The total number of I/Os needed to perform a full table scan
depends on such factors as the size of the table, the multiblock
read count, and whether parallel execution is being utilized for the
operation.
Parameter type : Integer
Default value : 8
Parameter class : Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values : Operating system-dependent
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
89
Performance and Diagnostics Related
Parameters (contd )
Oracle_Trace_Enable
To enable Oracle Trace collections for the server, set
Oracle_Trace_Enable to true.
This setting alone does not start an Oracle Trace collection, but it
allows Oracle Trace to be used for the server.
Parameter type : Boolean
Default value : false
Parameter class : Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values : true | false
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
90
Performance and Diagnostics Related
Parameters (contd )
Sql_Trace
The value of Sql_Trace disables or enables the SQL trace facility.
Setting this parameter to true provides information on tuning that
you can use to improve performance.
Parameter type : Boolean
Default value : false
Parameter class : Static
Range of values : true | false
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
91
Performance and Diagnostics Related
Parameters (contd )
Parallel_Automatic_Tuning
When Parallel_Automatic_Tuning is set to true, Oracle determines
the default values for parameters that control parallel execution.
In addition to setting this parameter, you must specify the
PARALLEL clause for the target tables in the system.
Oracle then tunes all subsequent parallel operations
automatically.
Parameter type : Boolean
Default value : false
Parameter class : Static
Range of values : true | false
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
92
Performance and Diagnostics Related
Parameters (contd )
Parallel_Max_Servers
specifies the maximum number of parallel execution processes and
parallel recovery processes for an instance.
As demand increases, Oracle increases the number of processes from the
number created at instance startup up to this value.
If you set this parameter too low, some queries may not have a parallel
execution process available to them during query processing.
If you set it too high, memory resource shortages may occur during peak
periods, which can degrade performance.
Parameter type : Integer
Default value : Derived from the values of CPU_COUNT,
PARALLEL_AUTOMATIC_TUNING, and
PARALLEL_ADAPTIVE_MULTI_USER
Parameter class : Static
Range of values : 0 to 3599
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
93
Performance and Diagnostics Related
Parameters (contd )
Timed_Statistics
specifies whether or not statistics related to time are collected.
On some systems with very fast timer access, Oracle might
enable timing even if this parameter is set to false.
On these systems, setting the parameter to true can sometimes
produce more accurate statistics for long-running operations
Parameter type : Boolean
Default value :
If STATISTICS_LEVEL is set to TYPICAL or ALL, then true
If STATISTICS_LEVEL is set to BASIC, then false
Parameter class : Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values : true | false
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
94
Performance and Diagnostics Related
Parameters (contd )
Resource_Limits
determines whether resource limits are enforced in database
profiles
Parameter type : Boolean
Default value : false
Parameter class : Dynamic: ALTER SYSTEM
Range of values : true | false
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
95
Performance and Diagnostics Related
Parameters (contd )
Workarea_Size_Policy
specifies the policy for sizing work areas. This parameter controls
the mode in which working areas are tuned.
Parameter type : String
Syntax : WORKAREA_SIZE_POLICY = {AUTO | MANUAL}
Default value :
If PGA_AGGREGATE_TARGET is set, then AUTO
If PGA_AGGREGATE_TARGET is not set, then MANUAL
Parameter class : Dynamic: ALTER SESSION, ALTER SYSTEM
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
96
Recovery-Related Parameters
Fast_Start_Mttr_Target
enables you to specify the number of seconds the database takes
to perform crash recovery of a single instance.
When specified, FAST_START_MTTR_TARGET
Is overridden by FAST_START_IO_TARGET
Is overridden by LOG_CHECKPOINT_INTERVAL
Parameter type : Integer
Default value : 0
Parameter class : Dynamic: ALTER SYSTEM
Range of values : 0 to 3600 seconds
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
97
Recovery-Related Parameters (contd )
Log_Checkpoint_Interval
specifies the frequency of checkpoints in terms of the number of
redo log file blocks that can exist between an incremental
checkpoint and the last block written to the redo log.
This number refers to physical operating system blocks, not
database blocks.
Regardless of this value, a checkpoint always occurs when
switching from one online redo log file to another.
Parameter type : Integer
Default value : 0
Parameter class : Dynamic: ALTER SYSTEM
Range of values : Unlimited
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
98
Recovery-Related Parameters (contd )
Control_File_Record_Keep_Time
specifies the minimum number of days before a reusable record in
the control file can be reused.
In the event a new record needs to be added to a reusable section
and the oldest record has not aged enough, the record section
expands.
If this parameter is set to 0, then reusable sections never expand,
and records are reused as needed.
Parameter type : Integer
Default value : 7 (days)
Parameter class : Dynamic: ALTER SYSTEM
Range of values : 0 to 365 (days)
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
99
Data Block Verification Parameters
Db_Block_Checksum
determines whether DBWn and the direct loader will calculate a
checksum and store it in the cache header of every data block
when writing it to disk.
If this parameter is set to false, DBWn calculates checksums only
for the SYSTEM tablespace, but not for user tablespaces.
This parameter checks all the data blocks on disks for the Oracle
redo log files.
By using checksums written to the data file headers, Oracle can
check for corrupted redo logs if you turn this parameter on.
Parameter type : Boolean
Default value : true
Parameter class : Dynamic: ALTER SYSTEM
Range of values : true | false
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
100
Data Block Verification Parameters (contd )
Db_Block_Checking
controls whether Oracle performs block checking for data blocks.
When this parameter is set to true, Oracle performs block
checking for all data blocks.
When it is set to false, Oracle does not perform block checking
for blocks in the user tablespaces.
Block checking for the SYSTEM tablespace is always turned on.
Parameter type : Boolean
Default value : false
Parameter class : Dynamic: ALTER SESSION, ALTER SYSTEM
Range of values : true | false
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
101
Security-Related Parameters
Os_Authent_Prefix
specifies a prefix that Oracle uses to authenticate users
attempting to connect to the server.
Oracle concatenates the value of this parameter to the beginning
of the user's operating system account name and password.
When a connection request is attempted, Oracle compares the
prefixed username with Oracle usernames in the database.
The default value of this parameter is OPS$ for backward
compatibility with previous versions.
Parameter type : String
Syntax : OS_AUTHENT_PREFIX = authentication_prefix
Default value : OPS$
Parameter class : Static
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
102
Security-Related Parameters (contd )
Remote_Login_Passwordfile
specifies whether Oracle checks for a password file and how
many databases can use the password file.
Parameter type : String
Syntax : REMOTE_LOGIN_PASSWORDFILE= {NONE | SHARED |
EXCLUSIVE}
Default value : NONE
Parameter class : Static
NONE : Oracle ignores any password file. Therefore, privileged
users must be authenticated by the operating system.
SHARED : More than one database can use a password file.
However, the only user recognized by the password file is SYS.
EXCLUSIVE : The password file can be used by only one database
and the password file can contain names other than SYS.
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
103
Undocumented Initialization Parameters
In addition to the initialization parameters listed, Oracle has
several undocumented initialization parameters.
These parameters are not supposed to be altered in any way
by regular users; therefore they remain undocumented.
The following query produces a list of 540 undocumented
parameters for the Oracle 9.2.0.1.0 database version.
select a.ksppinm parameter, a.ksppdesc description,
b.ksppstvl session_value, c.ksppstvl instance_value
from x$ksppi a, x$ksppcv b, x$ksppsv c
where a.indx = b.indx and a.indx = c.indx and
substr(a.ksppinm,1,1) = '_ order by a.ksppinm
/
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
104
Exercise II Create the Database
Revision no.: PPT/2K403/02
CMS INSTITUTE, 2004. All rights reserved. No part of this material may be reproduced, stored or emailed without the prior permission of Programme Director, CMS Institute
105
Design & Published by:
CMS Institute, Design & Development Centre, CMS House, Plot No. 91, Street No.7,
MIDC, Marol, Andheri (E), Mumbai 400093, Tel: 91-22-28216511, 28329198
Email: courseware.inst@cmail.cms.co.in
www.cmsinstitute.co.in

Вам также может понравиться