Session 3

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 23

DCIT 322

DATABASE MANAGEMENT AND


ADMINISTRATION

SESSION 3 – Instance and Init Parameters

Course Writer: Michael K. Kolugu, Dept. of Computer Sc.


Contact Information: [email protected]

College of Basic and Applied Sciences


School of Physical and Mathematical Sciences
Department of Computer Science
Session Overview
• This session brings to bare the knowledge and
description of the various stages and the processes
involved in the starting-up and the shutting-down of
oracle database.

Slide 2
Summary of Previous Session

Slide 3
Session Outline
The key topics to be covered in the session are as follows:
• Starting up and stopping a database instance.
• Managing database instance
• Initialization parameter file

Slide 4
Startup Options

Slide 5
Instance shutdown

Slide 6
The Three(3) Shutdown Modes
1. ABORT: Performs the least amount of work before shutting down.
Because this mode requires recovery before startup, use it only when
necessary. It is typically used when no other form of shutdown works,
or when you need to shut down immediately because of an impending
situation (such as notice of a power outage within seconds).

2. IMMEDIATE: Is the most typically used option. Uncommitted


transactions are rolled back.

3. TRANSACTIONAL: Allows transactions to finish.


Slide 7
The Three(3) Shutdown Modes
NORMAL: Waits for sessions to disconnect.

ABORT is the fastest and NORMAL is the slowest.

NORMAL and TRANSACTIONAL can take a long time depending on


the number of sessions and transactions.

Slide 8
Shutdown Modes (SQL* Plus)

SQL> shutdown;

Same results
SQL> shutdown normal;

SQL> shutdown transactional;

SQL> shutdown immediate;

SQL> shutdown abort;

Slide 9
Shutdown Modes (SQL* Plus)
A I T N
Allows new connections No No No No
Waits until current sessions end No No No Yes
Waits until current transactions end No No Yes Yes
Forces a checkpoint and closes files No Yes Yes Yes

So, which one is the fastest yet safe mode to use?

Slide 10
Initialization parameters
• Managing an instance includes configuring parameters
that affect the basic operation of the instance.

• These parameters are called initialization parameters.


• The instance reads initialization parameters from a file at
startup
• After being read from a file, initialization parameters are
retained in memory, where the values for many of them
can be changed dynamically.

Slide 11
Initialization parameters
• There are two types of files from which these
parameters can be read:
– A text initialization parameter file
• Init<SID>.ora

– A server parameter file


• spfile<SID>.ora

Question: What is SID –(System Identifier) of the database?

Slide 12
Server Parameter File:
• is the preferred type of initialization parameter file,
• is a binary file,
• can be written to and read by the database server,
• must not be edited manually,
• resides on the server on which the Oracle instance
is executing
• is persistent across shutdown and startup,
• The default name of this file, which is automatically
sought at startup, is spfile<SID>.ora
Slide 13
Text initialization parameter file:
• can be read by the database server, but it is not written to
by the server.
• parameter settings must be set and changed manually by
using a text editor
• The default name of this file (which is automatically sought
at startup if an SPFILE is not found) is init<SID>.ora
• To create text initialisation file from server parameter file
use: SQL> create pfile from spfile
• To create server parameter file from text init file use: SQL>
create spfile from pfile
Slide 14
Types of initialization parameters:
There are two kinds of initialization parameters:

• Static - cannot be changed for the current instance. You must change

these parameters in the text initialization file or server parameter file

and then restart the database before changes take effect.

• Dynamic - can be changed for the current Oracle Database instance

NB: Dynamic parameters can be changed by using the ALTER SESSION

and ALTER SYSTEM SQL commands

Slide 15
Other Types of initialization parameters:

Initialization parameters can also be:


⮚ Basic –parameters that should be considered for every database.
⮚ Advanced -extra parameters, that the most databases run well with
default values.
⮚ Derived - meaning that their values are calculated from the values of other
parameters (Normally, you should not alter values for derived
parameters).
⮚ Operating system dependent - meaning their value depend on the host
operating system.

Viewing initialisation parameter values in SQL*Plus: SQL> select name,

value from v$parameter; Slide 16


Changing initialization parameters

Slide 17
Connecting to the Database

Slide 18
What is the Listener?

Slide 19
Using the Listener Control Utility

Slide 20
Interacting with a Database

• An instance has started on a machine where Oracle Database is


installed often called the host or database server. The server also
runs a listener that has the appropriate Oracle Net Services handler.
• A user starts an application spawning a user process, which attempts
to establish a connection to the server.
• The listener detects the connection request from the application and
creates a dedicated server process on behalf of the user process.
• User process communicates with the server process.
Slide 21
Things Covered

• Describe database initialization parameters


• Learn how to change the values of the initialisation parameters
• Start and stop the database and components
• Describe the stages of database startup
• Describe database shutdown options
• Discuss database listener

Slide 22
Questions

Slide 23

You might also like