09 creating an oracle database

Upload: papusaha

Post on 03-Jun-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 09 Creating an Oracle Database

    1/105

  • 8/12/2019 09 Creating an Oracle Database

    2/105

    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.

  • 8/12/2019 09 Creating an Oracle Database

    3/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    4/105

    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.ora.

    $cp init.ora $ORACLE_HOME/dbs/initU16.ora Modify the initU16.ora by editing the parameters.

  • 8/12/2019 09 Creating an Oracle Database

    5/105

    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 sysdbaEnter password:Connected to an idle instance.

    SQL> startup nomount

    You can see all the background processes for your databaseinstance having been started at this point by using ps ef command.

    At this point, go to the location of your bdump directory andsee the alert log file.

    The alert log file gives you all the details of your instancecreation process.

  • 8/12/2019 09 Creating an Oracle Database

    6/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    7/105

  • 8/12/2019 09 Creating an Oracle Database

    8/105

    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 )

  • 8/12/2019 09 Creating an Oracle Database

    9/105

    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 currentlyin use.

  • 8/12/2019 09 Creating an Oracle Database

    10/105

    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 InitializationParameter Values

    The ALTER SYSTEM statement allows you to set, change, ordelete (restore to default value) initialization parameter values.

    When the ALTER SYSTEM statement is used to alter aparameter setting in a traditional initialization parameter file,the change affects only the current instance, since there is no

    mechanism for automatically updating initialization parameterson disk.

    They must be manually updated in order to be passed to afuture instance.

    Using a server parameter file overcomes this limitation.

  • 8/12/2019 09 Creating an Oracle Database

    11/105

    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 ParameterValues

    R i i PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    12/105

    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 anOracle database.

    Oracle-managed files eliminate the need for you, the DBA, todirectly manage the operating system files comprising anOracle database.

    You specify operations in terms of database objects rather

    than filenames. Oracle internally uses standard file system interfaces to createand delete files as needed for the following databasestructures:

    Tablespaces Online redo log files Control files

    R i i PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    13/105

    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.

    Re ision no : PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    14/105

    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 isgiven in the creation operation.

    Also used as a default file system directory for online redo log fileand control files if DB_CREATE_ONLINE_LOG_DEST_n is notspecified.

    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 givenin the creation operation.

    You can use this initialization parameter multiple times, where nspecifies the multiplexed copy of the online redo log or controlfile.

    You can specify up to 5 multiplexed copies.

    Revision no : PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    15/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    16/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    17/105

    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 followingformat 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

  • 8/12/2019 09 Creating an Oracle Database

    18/105

    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 theDatabase

    OPENOPEN

    MOUNTMOUNT

    NOMOUNTNOMOUNT

    SHUTDOWNSHUTDOWN

    All files opened asAll files opened asdescribed by the controldescribed by the controlfile for thisfile for thisinstance.instance.

    Control file openedControl file opened

    for this instance.for this instance.

    InstanceInstancestarted.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

  • 8/12/2019 09 Creating an Oracle Database

    19/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    20/105

    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.oraSTARTUP PFILE=/DISK1/initU15.ora

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    21/105

    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 accessto database

    FORCE: aborts the running instance before performing anormal startup

    RESTRICT: restricted access

    RECOVER: begins media recovery

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    22/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    23/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    24/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    25/105

    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

    ImmediateTransactionalTimeTime

    Normal

    Abort

    4

    3

    1

    2

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    26/105

    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 astate where only DBA transactions, queries, fetches, orPL/SQL statements are allowed.

    This is called a quiesced state, in the sense that there are noongoing non-DBA transactions, queries, fetches, or PL/SQLstatements in the system.

    This quiesced state allows you or other administrators toperform 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

  • 8/12/2019 09 Creating an Oracle Database

    27/105

    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 byconcurrent 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

  • 8/12/2019 09 Creating an Oracle Database

    28/105

    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 adatabase by halting all input and output (I/O) to datafiles (fileheader and file data) and control files, thus allowing adatabase to be backed up without I/O interference.

    When the database is suspended all preexisting I/O operationsare allowed to complete and any new database accesses areplaced in a queued state.

    The suspend command suspends the database, and is notspecific to an instance.

    However, do not start a new instance while you suspend

    another instance, since the new instance will not besuspended. Use the ALTER SYSTEM RESUME statement to resume normal

    database operations.

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    29/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    30/105

    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

    OPENOPEN

    MOUNTMOUNT

    NOMOUNTNOMOUNT

    Data dictionaryData dictionary

    Dynamic performanceDynamic performance

    views reading data fromviews reading data fromdiskdisk

    DynamicDynamicperformanceperformanceviews reading fromviews reading frommemorymemorySHUTDOWNSHUTDOWN

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    31/105

    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$PARAMETERV$SGAV$OPTION

    V$PROCESSV$SESSIONV$VERSIONV$INSTANCE

    Control file

    SGA

    V$THREADV$CONTROLFILEV$DATABASEV$DATAFILEV$DATAFILE_HEADERV$LOGFILE

    Revision no.: PPT/2K403/02

    Displaying Current

  • 8/12/2019 09 Creating an Oracle Database

    32/105

    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 CurrentParameter Values

    Use the Server Manager command:

    Query the dynamic performance view V$PARAMETER:

    SHOW PARAMETER controlSHOW PARAMETER control

    SELECT name FROM v$parameter

    WHERE name LIKE %control%;

    SELECT name FROM v$parameterWHERE name LIKE %control%;

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    33/105

    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 aninstance 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=131072DEFERRED;

    ALTER SYSTEM SET SORT_AREA_SIZE=131072DEFERRED;

    Revision no.: PPT/2K403/02

    Enable and Disable

  • 8/12/2019 09 Creating an Oracle Database

    34/105

    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 DisableRestricted Session

    Use the STARTUP command to restrict access to a database:

    Use the ALTER SYSTEM command to place an instance inrestricted mode:

    STARTUP RESTRICTSTARTUP RESTRICT

    ALTER SYSTEM ENABLE RESTRICTEDSESSION;

    ALTER SYSTEM ENABLE RESTRICTEDSESSION;

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    35/105

    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 dynamicperformance view V$SESSION:

    Execute the ALTER SYSTEM command:

    SELECT sid, serial# FROM v$session WHEREusername=SCOTT;

    SELECT sid, serial# FROM v$session WHEREusername=SCOTT;

    ALTER SYSTEM KILL SESSION 7,15; ALTER SYSTEM KILL SESSION 7,15;

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    36/105

    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 backgroundprocesses.

    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

  • 8/12/2019 09 Creating an Oracle Database

    37/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    38/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    39/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    40/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    41/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    42/105

    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 isoptional, you should generally set it before issuing the CREATEDATABASE statement, and then reference it in that statement.

    The following characters are valid in a database name:alphanumeric characters, underscore (_), number sign (#), anddollar 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

  • 8/12/2019 09 Creating an Oracle Database

    43/105

    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 bepart of a distributed system.

    The value consists of the extension components of a globaldatabase 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

  • 8/12/2019 09 Creating an Oracle Database

    44/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    45/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    46/105

    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

    b d h l

  • 8/12/2019 09 Creating an Oracle Database

    47/105

    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

    b d h l

  • 8/12/2019 09 Creating an Oracle Database

    48/105

    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 byNLS_TERRITORY.

    If the nls_territory format is America, the nls_date_formatparameter 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

  • 8/12/2019 09 Creating an Oracle Database

    49/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    50/105

    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, subjectto operating system constraint, that will ever be specified for thedatabase, including files to be added by ADD DATAFILEstatements.

    If you increase the value of DB_FILES, then you must shut downand restart all instances accessing the database before the newvalue can take effect.

    Parameter type : Integer

    Default value : 200 Parameter class : Static Range of values : operating system-dependent

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    51/105

    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 = d i rec tory

    Default value : $ ORACLE_HOME /DBS

    Parameter class : Dynamic: ALTER SYSTEM

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    52/105

    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 = { pa thname | d i rec tory }

    Default value : Operating system-dependent

    Parameter class : Dynamic: ALTER SYSTEM

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    53/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    54/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    55/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    56/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    57/105

    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 aslocks, job queue processes, and parallel execution processes.

    The default values of the SESSIONS and TRANSACTIONSparameters are derived from this parameter.

    Therefore, if you change the value of PROCESSES, you shouldevaluate whether to adjust the values of those derivedparameters.

    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

  • 8/12/2019 09 Creating an Oracle Database

    58/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    59/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    60/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    61/105

    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_SIZEparameter).

    The value must be at least the size of one granule (smaller valuesare automatically rounded up to the granule size).

    A value of zero is illegal because zero is the size of the DEFAULTpool for the standard block size, which is the block size for theSYSTEM 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

  • 8/12/2019 09 Creating an Oracle Database

    62/105

    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 = in teger [K | M | G]

    Default value : 0 (KEEP cache is not configured by default) Parameter class : Dynamic: ALTER SYSTEM

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    63/105

    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 KBblock 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 configuredby default)

    Parameter class : Dynamic: ALTER SYSTEM

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    64/105

    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

  • 8/12/2019 09 Creating an Oracle Database

    65/105

    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 inthe shared pool in situations where pool fragmentation forcesOracle to search for and free chunks of unused pool to satisfy thecurrent 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

  • 8/12/2019 09 Creating an Oracle Database

    66/105

    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 SQLworking areas used by memory-intensive SQL operators such assort, 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

  • 8/12/2019 09 Creating an Oracle Database

    67/105

    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 beenmade to the database block buffers.

    The LGWR process writes redo log entries from the log buffer to aredo log file.

    In general, larger values for LOG_BUFFER reduce redo log file I/O,particularly if transactions are long or numerous. In a busysystem, a value 65536 or higher is reasonable.

    Parameter type : Integer

    Default value : 512 KB or 128 KB * CPU_COUNT, whichever isgreater

    Parameter class : Static Range of values : Operating system-dependent

    Revision no.: PPT/2K403/02

    f

  • 8/12/2019 09 Creating an Oracle Database

    68/105

    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 bybackup processes for disk I/O buffers.

    (Parallel execution allocates buffers out of the large pool only whenPARALLEL_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

    f

  • 8/12/2019 09 Creating an Oracle Database

    69/105

    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 objectsthat 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

    M C fi i P

  • 8/12/2019 09 Creating an Oracle Database

    70/105

    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 = in teger [K | M | G]

    Default value : Initial size of SGA at startup, dependent on thesizes 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

    M C fi i P

  • 8/12/2019 09 Creating an Oracle Database

    71/105

    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

    M C fi i P

  • 8/12/2019 09 Creating an Oracle Database

    72/105

    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 theV$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

    A hi L P

  • 8/12/2019 09 Creating an Oracle Database

    73/105

    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 handledisplayed 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

    A hi L P t

  • 8/12/2019 09 Creating an Oracle Database

    74/105

    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 ormanual 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

    A hi L P t

  • 8/12/2019 09 Creating an Oracle Database

    75/105

    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 stringspecified 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

    U d S P t

  • 8/12/2019 09 Creating an Oracle Database

    76/105

    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 executedusing the SYSTEM rollback segment.

    You can replace an undo tablespace with another undo tablespacewhile 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

    Undo Space Parameters

  • 8/12/2019 09 Creating an Oracle Database

    77/105

    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 allocatedexternally as rollback segments.

    Parameter type : String

    Syntax : UNDO_MANAGEMENT = {MANUAL | AUTO}

    Default value : MANUAL

    Parameter class : Static

    Revision no.: PPT/2K403/02

    Undo Space Parameters

  • 8/12/2019 09 Creating an Oracle Database

    78/105

    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 oldundo information to rollback changes to produce older images ofdata blocks.

    The UNDO_RETENTION parameter works best if the current undotablespace 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

    Oracle Licensing Related Parameters

  • 8/12/2019 09 Creating an Oracle Database

    79/105

    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

    Oracle Licensing Related Parameters

  • 8/12/2019 09 Creating an Oracle Database

    80/105

    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 messageindicating 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/02Performance and Diagnostics RelatedParameters

  • 8/12/2019 09 Creating an Oracle Database

    81/105

    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

    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/02Performance and Diagnostics RelatedParameters

  • 8/12/2019 09 Creating an Oracle Database

    82/105

    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

    Parameters (contd )

    Query_Rewrite_Enabled

    allows you to enable or disable query rewriting globally for the

    database, which is of importance mostly when you usematerialized 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/02Performance and Diagnostics RelatedParameters ( d )

  • 8/12/2019 09 Creating an Oracle Database

    83/105

    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

    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/02Performance and Diagnostics RelatedParameters ( d )

  • 8/12/2019 09 Creating an Oracle Database

    84/105

    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

    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/02Performance and Diagnostics RelatedParameters ( d )

  • 8/12/2019 09 Creating an Oracle Database

    85/105

    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

    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/02Performance and Diagnostics RelatedParameters ( td )

  • 8/12/2019 09 Creating an Oracle Database

    86/105

    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

    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/02Performance and Diagnostics RelatedParameters (contd )

  • 8/12/2019 09 Creating an Oracle Database

    87/105

    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

    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 mayhave a narrower range

    Revision no.: PPT/2K403/02Performance and Diagnostics RelatedParameters (contd )

  • 8/12/2019 09 Creating an Oracle Database

    88/105

    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

    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/Ooperation during a sequential scan.

    The total number of I/Os needed to perform a full table scandepends on such factors as the size of the table, the multiblockread count, and whether parallel execution is being utilized for theoperation.

    Parameter type : Integer

    Default value : 8 Parameter class : Dynamic: ALTER SESSION, ALTER SYSTEM Range of values : Operating system-dependent

    Revision no.: PPT/2K403/02Performance and Diagnostics RelatedParameters (contd )

  • 8/12/2019 09 Creating an Oracle Database

    89/105

    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

    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/02Performance and Diagnostics RelatedParameters (contd )

  • 8/12/2019 09 Creating an Oracle Database

    90/105

    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

    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/02Performance and Diagnostics RelatedParameters (contd )

  • 8/12/2019 09 Creating an Oracle Database

    91/105

    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

    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 operationsautomatically.

    Parameter type : Boolean

    Default value : false

    Parameter class : Static

    Range of values : true | false

    Revision no.: PPT/2K403/02Performance and Diagnostics RelatedParameters (contd )

  • 8/12/2019 09 Creating an Oracle Database

    92/105

    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

    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 thenumber created at instance startup up to this value.

    If you set this parameter too low, some queries may not have a parallelexecution process available to them during query processing.

    If you set it too high, memory resource shortages may occur during peakperiods, which can degrade performance.

    Parameter type : Integer Default value : Derived from the values of CPU_COUNT,

    PARALLEL_AUTOMATIC_TUNING, andPARALLEL_ADAPTIVE_MULTI_USER Parameter class : Static Range of values : 0 to 3599

    Revision no.: PPT/2K403/02Performance and Diagnostics RelatedParameters (contd )

  • 8/12/2019 09 Creating an Oracle Database

    93/105

    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

    Parameters (contd )

    Timed_Statistics specifies whether or not statistics related to time are collected.

    On some systems with very fast timer access, Oracle mightenable timing even if this parameter is set to false.

    On these systems, setting the parameter to true can sometimesproduce 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/02Performance and Diagnostics RelatedParameters (contd )

  • 8/12/2019 09 Creating an Oracle Database

    94/105

    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

    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/02Performance and Diagnostics RelatedParameters (contd )

  • 8/12/2019 09 Creating an Oracle Database

    95/105

    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

    Parameters ( )

    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

    Recovery-Related Parameters

  • 8/12/2019 09 Creating an Oracle Database

    96/105

    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

    ecove y e ated a a ete s

    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

  • 8/12/2019 09 Creating an Oracle Database

    97/105

    Revision no.: PPT/2K403/02

    Recovery-Related Parameters (contd )

  • 8/12/2019 09 Creating an Oracle Database

    98/105

    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

    y ( )

    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 sectionand the oldest record has not aged enough, the record sectionexpands.

    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

    Data Block Verification Parameters

  • 8/12/2019 09 Creating an Oracle Database

    99/105

    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

    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

    Data Block Verification Parameters (contd )

  • 8/12/2019 09 Creating an Oracle Database

    100/105

    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

    Db_Block_Checking

    controls whether Oracle performs block checking for data blocks.

    When this parameter is set to true, Oracle performs blockchecking for all data blocks.

    When it is set to false, Oracle does not perform block checkingfor 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

    Security-Related Parameters

  • 8/12/2019 09 Creating an Oracle Database

    101/105

    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

    y

    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 beginningof the user's operating system account name and password.

    When a connection request is attempted, Oracle compares theprefixed username with Oracle usernames in the database.

    The default value of this parameter is OPS$ for backwardcompatibility with previous versions.

    Parameter type : String

    Syntax : OS_AUTHENT_PREFIX = authentication_prefix Default value : OPS$ Parameter class : Static

    Revision no.: PPT/2K403/02

    Security-Related Parameters (contd )

  • 8/12/2019 09 Creating an Oracle Database

    102/105

    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

    y

    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

    Undocumented Initialization Parameters

  • 8/12/2019 09 Creating an Oracle Database

    103/105

    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

    In addition to the initialization parameters listed, Oracle hasseveral undocumented initialization parameters.

    These parameters are not supposed to be altered in any wayby regular users; therefore they remain undocumented.

    The following query produces a list of 540 undocumentedparameters for the Oracle 9.2.0.1.0 database version. select a.ksppinm parameter, a.ksppdesc description,

    b.ksppstvl session_value, c.ksppstvl instance_valuefrom x$ksppi a, x$ksppcv b, x$ksppsv c

    where a.indx = b.indx and a.indx = c.indx andsubstr(a.ksppinm,1,1) = '_ order by a.ksppinm

    /

    Revision no.: PPT/2K403/02

    Exercise II Create the Database

  • 8/12/2019 09 Creating an Oracle Database

    104/105

    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

    Revision no.: PPT/2K403/02

  • 8/12/2019 09 Creating an Oracle Database

    105/105

    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: [email protected]