Data Base Administration Short Notes
Data Base Administration Short Notes
Waseem
Short Notes.
Data Base Administration & Management.
Chapter 1:
1. Installation; SQL* Plus; Oracle Enterprise Manager; DBA Tools. Oracle Architectural Components: Oracle
Server; Oracle Instance.
Introduction to oracle database
It is a database commonly used for running online transaction processing (OLTP), data warehousing (DW)
and mixed (OLTP & DW) database workloads
The purpose of a database is to store and retrieve related information. A database server is the key to
solving the problems of information management. Oracle Database is the first database designed for
enterprise grid computing, the most flexible and cost-effective way to manage information and applications.
Installation:
The Oracle Database 11g software installation process using the Oracle Universal Installer (OUI), then
creating a database using the Database Creation Assistant (DBCA). You can create a new database using
OUI, running DBCA as a separate step gives you a bit more configuration flexibility
1-Software Installation
• Decide on the local database name and which domain will contain this database.
• Estimate the number of tables and indexes, as well as their size, to plan for disk space estimates
• Plan the locations of the physical data files on the server’s disk to maximize performance and
recoverability. Automatic Storage Management (ASM) instance, making it easier to manage
redundant storage if you don’t have RAID.
• Select the database character set, Character sets can be changed after installation
• Decide on the best default database block size. The default block size defined by
DB_BLOCK_SIZE cannot be changed later without reinstalling the database.
• Make sure that all non-administrative users are assigned a non-SYSTEM tablespace as their
default tablespace.
• Automatic Undo Management is a must to ease the administration of transaction undo
information.
• Plan a backup and recovery strategy. Decide how often the database needs to be backed up;
use more than one method to back up the database
SQL* Plus
SQL*Plus is an interactive query tool that is installed with every Oracle Database Server or Client installation.
It has a command-line user interface, a Windows Graphical User Interface (GUI) and the iSQL*Plus
webbased user interface.
It enables you to enter and execute SQL, PL/SQL, SQL*Plus and operating system commands to perform
the following:
• Format, perform calculations on, store, and print from query results
• Examine table and object definitions
• Develop and run batch scripts
https://psc-msc.blogspot.com/
Page 2 of 48 Data Base Administration & Management M. Waseem
• Perform database administration
You can use SQL*Plus to generate reports interactively, and to output the results to text file, to screen, or to
HTML file for browsing on the Internet.
SQL*Plus Installation
SQL*Plus is installed by default when you install the Oracle Database.
SQL*Plus Date Format
The default date format in SQL*Plus is determined by the database NLS_DATE_FORMAT parameter
and may use a date format displaying two digit years. You can use the SQL TO_CHAR function, or the
SQL*Plus COLUMN FORMAT command in your SELECT statements to control the way dates are displayed
in your report Using SQL Plus:
• Run command prompt and type in ―sqlplus‖ then hit enter. OR
• Select the ―SQL Plus‖ shortcut menu from oracle menu option.
• Enter username and password when prompted.
• You can also use ―username as SYSOPER‖ and ―username as SYSDBA‖.
• Shutdown a database instance
• Star a database instance ―startup‖
• View parameters by using SELECT name, value FROM V$PARAMETER:
• To view selected parameter use SHOW PARAMETER parameter_name / SHOW PARAMETER
shared_ pool _size
DBA Tools
Oracle DBA Tools for administrating Database 1-Oracle
Universal installer (OUI):
OUI is a Java-based graphical user interface application that enables you to install Oracle components from
a DVD, multiple DVDs, or the Web.
2-Oracle Database Configuration Assistant (DBCA):
A utility that creates a database from templates, or you can create, configure and drop databases your
own. Database Configuration Assistant (DBCA) is the preferred way to create a database, because it is a
more automated approach, and your database is ready to use when DBCA completes 3-Database
Upgrade Assistant :
Upgrading your database involves using Oracle’s upgrade tool called the Database Upgrade Assistant
(DBUA). you can upgrade of your existing database to a new oracle Database release.
4-Net Configuration Assistant(NETCA):520
A utility that enables you to configure listeners and naming methods, which are critical componenets of the
Oraclae Database Network. This performs the initial network configuration steps after the Oracle software
installation and automatically creates the default, basic configuration files.
https://psc-msc.blogspot.com/
Page 3 of 48 Data Base Administration & Management M. Waseem
• Administer Oracle Parallel Servers.
• Integrate participating Oracle or third-party tools
Oracle server:
An Oracle server includes an Oracle Instance and an Oracle database.
1- Oracle database:
A database is a collection of data on disk in one or more files on a database server that collects and
maintains related information. The database consists of various physical and logical structures, the table
being the most important logical structure in the database. A table consists of rows and columns containing
related data. a database provides a level of security to prevent unauthorized access to the data.
• An Oracle database includes several different types of files: datafiles, control files, redo log files
and archive redo log files. The Oracle server also accesses parameter files and password files.
• The database server must manage large amounts of data in a multi-user environment.
• The server must manage concurrent access to the same data.
• The server must deliver high performance. This generally means fast response times.
• Oracle Database provides many mechanisms to facilitate the security necessary to keep
confidential data confidential.
❖ Logical Storage Structure
❖ Logical Database Structure
https://psc-msc.blogspot.com/
Page 4 of 48 Data Base Administration & Management M. Waseem
❖ Physical Database Structure
Table spaces:
Tablespaces logically organize data that are physically stored in datafiles. A tablespace belongs to only
one database, and has at least one datafile that is used to store data for the associated tablespace. Oracle
11g allows you to create a special kind of tablespace called a bigfile tablespace, which can be as
large as 128TB (terabytes). It can also store many other database objects such as indexes, views,
sequences, etc. The DBA can manage the tablespace as a unit without worrying about the size and
structure of the underlying datafiles.
For an installation of Oracle 11g, a minimum of two tablespaces are created,the SYSTEM
tablespace and the SYSAUX tablespace.
• SYSTEM – a tablespace that is always used to store SYSTEM data that includes data about
tables, indexes, sequences, and other objects – this metadata comprises the data dictionary.
• SYSAUX tablespace stores data for auxiliary applications such as the LogMiner, Workspace
Manager, Oracle Data Mining, Oracle Streams, and many other Oracle tools.
There are three types of tablespaces: (1) permanent, (2) undo, and (3) temporary.
• Permanent – These tablespaces store objects in segments that are permanent – that persist
beyond the duration of a session or transaction.
• Undo – These tablespaces store segments that may be retained beyond a transaction, but are
basically used toProvide the ability to rollback a transaction that fails to commit.
• Temporary – This tablespace stores segments that are transient and only exist for the duration of
a session or a transaction.
Blocks:
Oracle manages the storage space in the datafiles of a database in units called data blocks. A data block is
the smallest unit of data used by a database. The size of a block is a specific number of bytes of storage
within a given tablespace within the database.
Extents:
An extent is a logical unit of database storage space allocation made up of a number of contiguous data
blocks. When you enlarge a database object, the space added to the object is allocated as an extent.
Segments
Each segment is composed of one or more extents that form a database object that Oracle treats as a unit,
such as a table or index. Four types of segments are found in an Oracle database: data segments, index
segments, temporary segments.
• Data Segment: Every table in the database resides in a single data segment, consisting of
one or more extents. Oracle allocates one or more extents to form that table's data segment
• Index Segment: Each index is stored in its own index segment. As with partitioned tables,
each partition of a partitioned index is stored in its own segment.
• Temporary Segment: A temporary segment in a temporary table contains data for multiple
statements of a single transaction or session.Oracle drops the temporary segment at the end of
the transaction or session. As When a user’s SQL statement needs disk space to complete an
operation, such as a sorting operation that cannot fit in memory, Oracle allocates a temporary
segment. Temporary segments exist only for the duration of the SQL statement.
• Rollback Segment: A Rollback Segment is a database object containing before-images of data
written to the database. Rollback segments are used to: Undo changes when a transaction is
rolled back. Rollback segments were also used during database recovery for rolling back
uncommitted transactions that were active when the database instance crashed or terminated
unexpectedly
https://psc-msc.blogspot.com/
Page 5 of 48 Data Base Administration & Management M. Waseem
❖ Tables:
A table is the basic unit of storage in an Oracle database. Regardless of the type of table, data in a table is
stored in rows and columns.
• Relational Tables: A relational table is heap organized; you can specify the clause organization heap
to define a heap-organized table Each row of a table contains one or more columns; each column has a
data type and a length.
• Temporary Tables: They are temporary in the sense of the data that is stored in the table, not in the
definition of the table itself. Users have permissions to insert, update, or delete, on a temporary table.
The statement to create a temporary table :
• Index Organized Tables: index Organized Tables (IOT) have their primary key data and non-key
column data stored within the same B*Tree structure. Effectively, the data is stored within the primary
key index. Why Use Index Organized Tables?
o Accessing data via the primary key is quicker as the key and the data reside in the same structure.
There is no need to read an index then read the table data in a separate structure. o Lack of
duplication of the key columns in an index and table mean the total storage requirements are
reduced. the values for the primary key of the table are stored only once in an IOT,
• Object Tables: An object type can represent a student, bank account, computer screen, rational
number, or data structure such as a queue, stack, or list. You can define them interactively in SQL*Plus
using the
SQL statement CREATE TYPE
Object tables can still have both primary and unique keys, just as relational tables do.
• External Tables: External tables allow Oracle to query data that is stored outside the database in flat
files. No DML can be performed on external tables but they can be used for query, join and sort
operations. You cannot create indexes on an external table, and no inserts, updates, or deletes can be
performed on external tables.
• Clustered Tables: A table cluster is a group of tables that share the same data blocks. Clustered
tables reduce the amount of space needed to store the columns the two tables have in common, also
known as a cluster key value. The advantages to clustering a table are reduced if frequent insert,
update, and delete operations occur on the table relative to the number of select statements against the
table.
• Hash Clusters: A hash cluster uses a hashing function to store and retrieve rows in a table. The total
estimated amount of space needed for the table is allocated when the table is created, given the number
of hash keys specified during the creation of the cluster.
• Sorted Hash Clusters: sorted hash clusters allow rows in the table to be stored by one or more
columns of the table in ascending order.
You create sorted hash clusters using the same syntax as regular clustered tables, with the addition
of the SORT positional.
#Partitioned Tables: Partitioning a table helps make a large table more manageable, A table may be
partitioned, or even subpartitioned, into smaller pieces. Queries against the partitioned table using criteria in
the where clause that matches the partitioning scheme. Partitions are one of three types: range partitioned,
hash partitioned, list partitioned;
• A range partition is a partition whose partition key falls within a certain range.
• A list partition is a partition whose partition key falls within groups of distinct values.
• A hash partition assigns a row to a partition based on a hashing function.
• Composite Partitions: a table is partitioned by one data distribution method and then each partition is
further subdivided into sub-partitions using a second data distribution method. All subpartitions for a
given partition represent a logical subset of the data.
• Partitioned Indexes: A partitioned index in Oracle 11g is simply an index broken into multiple pieces.
By breaking an index into multiple physical pieces, you are accessing much smaller pieces (faster), and
you may separate the pieces onto different disk drives (reducing I/O contention). Both b-tree and bitmap
indexes can be partitioned.
https://psc-msc.blogspot.com/
Page 6 of 48 Data Base Administration & Management M. Waseem
❖ Constraints
An Oracle constraint is a rule or rules that you can define on one or more columns in a table to help enforce
a business rule. Six types of data integrity rules can be applied to table columns: null rule, unique column
values, primary key values, referential integrity values, complex in-line integrity, and trigger-based integrity.
▪ Null Rule: The NOT NULL constraint prevents NULL values from being entered.
▪ Unique Column Values: The UNIQUE integrity constraint ensures that a column or
group of columns is unique throughout the table.
▪ Primary Key Values: only one primary key constraint can exist on a table. The
column or columns that comprise the primary key cannot have NULL values.
❖ Integrity o Referential Integrity Values: A foreign key constraint requires values in one table to
match values in another table.
o Complex In-Line Integrity: More complex business rules may be enforced at the
column level by using a CHECK constraint. A check constraint requires a value in
the database to comply with a specified condition.
o Trigger-Based Integrity: A trigger is a named PL/SQL unit that is stored in the
database and executed (fired) in response to a specified event that occurs in the
database.
❖ Indexes
An Oracle index allows faster access to rows in a table when a small subset of the rows will be retrieved
from the table. Indexes are created on a single column or multiple columns. Index entries are stored in a
Btree structure so that traversing the index to find the key value of the row uses very few I/O operations. Use
the CREATE INDEX statement to create an index on: ❖ Users
Use the CREATE USER statement to create and configure a database user, which is an account through
which you can log in to the database, and to establish the means by which Oracle Database permits access
by the user. Access to the database is granted to a database account known as a user. A user may exist in
the database without owning any objects.
❖ Schemas
schema is the set of objects (tables, views, tables, indexes, sequences, views etc.) that belong to that
account. A schema is a collection of database objects owned by a specific user.
❖ Profiles
Profiles are a means to limit resources a user can use. Before profiles can be assigned, they must be created with
create profile. The DBA can add new profiles or change the DEFAULT profile to suit the needs of the enterprise. A
DBA must manage and allocate resources among all database users. Some examples of database resources are CPU
time, concurrent sessions, logical reads, and connect time.
❖ Sequences
A sequence is an object in Oracle that is used to generate a number sequence. This can be useful when you
need to create a unique number to act as a primary key. Sequences can generate numbers up to 38 digits in
length; the series of numbers can be ascending or descending.
❖ Synonyms
A synonym is an alternative name for objects such as tables, views, sequences, stored procedures, and
other database objects.
You generally use synonyms when you are granting access to an object from another schema and you don't
want the users to have to worry about knowing which schema owns the object. Synonyms can be either
public or private. A private synonym is defined in the schema of a user and is available only to the user. A
public synonym is usually created by a DBA and is automatically available for use by any database user.
❖ PL/SQL
Oracle PL/SQL is Oracle’s procedural language extension to SQL. PL/SQL is useful when the standard DML
and select statements cannot produce the desired results in an easy fashion because of the lack of the
procedural elements found in a traditional third-generation language such as C++ and Ada.
❖ Procedures/Function
https://psc-msc.blogspot.com/
Page 7 of 48 Data Base Administration & Management M. Waseem
A procedure is a group of PL/SQL statements treated as a unit for the purposes of execution that you can
call by name. It contains up to three sections: a variable declaration section, an executable section, and an
exception section. Procedures are compiled and stored in the data dictionary once; when more than one
user needs to call the procedure, it is already compiled, and only one copy of the stored procedure exists in
the shared pool.
A function is compiled and executed every time whenever it is called. A function must returns a value and
cannot modify the data received as parameters.
The difference between a procedure and function is that a function will return a single value to a calling
program. A procedure, on the other hand, does not return a value, only a status code.
❖ Packages
PL/SQL packages group together related functions and procedures, along with common variables and
cursors. Packages consist of two parts: a package specification and a package body. In the package
specification, the methods and attributes of the package are exposed; the implementation of the methods
along with any private methods and attributes are hidden in the package body.
❖ Triggers
Triggers are a specialized type of a PL/SQL that is executed, or triggered, when a specified event occurs (
DML statements like Insert,Delete, Update). A trigger is triggered automatically when an associated DML
statement is executed.
https://psc-msc.blogspot.com/
Page 8 of 48 Data Base Administration & Management M. Waseem
Chapter 2.
2. Physical Structure; SGA; Shared Pool; Library Cache; Data Dictionary Cache; Large Pool; User Process; Server
Process; Background Processes.
❖ Datafiles: A data file is a physical file on disk that was created by Oracle Database and contains data
structures such as tables and indexes. Each datafile in an Oracle database is a member of one and
only one tablespace. An Oracle datafile may automatically expand when it runs out of space, if the
DBA created the datafile with the AUTOEXTEND parameter. The DBA can also limit the amount of
expansion for a given datafile by using the MAXSIZE parameter.
❖ Redo Log Files: The most crucial structure for recovery operations is the redo log, which consists of
two or more pre-allocated files that store all changes made to the database as they occur. Every
instance of an Oracle Database has an associated redo log to protect the database in case of an
instance failure. when a power failure occurs, Oracle instance is restarted, the entries in the redo log
file are applied to the database datafiles in a roll forward operation, to restore the state of the
database up to the point where the failure occurred.
❖ Control Files: A control file is a small binary. The control file is used to keep track of the database's
status and physical structure. Every Oracle Database must have at least one control file. However, it
is recommended to create more than one, up to a maximum of 8. Each copy of a control file should
be stored on a different disk drive. By storing control files in these locations, you minimize the risk that
all control files will be lost in a single disk failure.
The control file contains information like:
▪ Database name
▪ Timestamp of database creation
▪ Names and locations of Data Files
▪ Names and locations of Redo Log files
▪ The current log sequence number
▪ Checkpoint information ▪ Recent RMAN backups taken
▪ Etc.
One of the control files is designated as primary for purposes of retrieving database metadata.
❖ Archived Log Files: An Oracle database can operate in one of two modes: archivelog or
noarchivelog mode.
• ARCHIVELOG mode is a mode that you can put the database in for creating a backup of all
transactions that have occurred in the database so that you can recover to any point in time.
• The database is in noarchivelog mode, the circular reuse of the redo log files means that redo
entries are no longer available in case of a failure to a disk drive or another media-related failure.
In NOARCHIVELOG mode you cannot perform online tablespace backups. NOARCHIVELOG mode
protects a database from instance failure but not from media failure.
❖ Initialization Parameter Files: When a database instance starts, the memory for the Oracle instance
is allocated. The parameters tell the Oracle programs how much memory to allocate, where to put
files related to the database and the location of existing datafiles. A parameter has a name and a
value.
There are two types of initialization parameter files: either a text-based file called
init<SID>.ora/ PFILS and a server parameter file known as an SPFILE.
PFILE/int.ora:
https://psc-msc.blogspot.com/
Page 9 of 48 Data Base Administration & Management M. Waseem
• init.ora or the pfile is a simple text file which can be updated by a standard editor like vi
which contains the various initialization parameters used while starting a database
instance.
• We need to restart the database after editing the init.ora using a text editor so that the
changes can come into effect.
• If we want to start a remote db we need a local pfile.
• RMAN(Recovery manager) which helps in data backup recovery process does not keep
the backup of pfile or init.ora file.
SPFILE:
• The Oracle spfile is a binary representation of the text based init.ora file or pfile which
contains the various initialization parameters used while starting a database instance.
• We do not edit this file using an editor as it is a binary file and may get corrupted and
which may lead to your database instance not starting rather it is altered by using the alter
systemquery.
• We do not need a local copy in case of spfile if we need to start a remote database.
• As this file is maintained by the server the parameters are validated before they are
accepted.
• RMAN keeps the backup of spfile.
• SPFILE permits dynamic changes without requiring you to restart that instance.
INIT.ORA/ PFILEs
PFILEs are also know as INIT.ORA files. Characteristics of a PFILE:
▪ Client side
▪ Text file
▪ Edit with text editor like vi or notepad
SPFILEs
Characteristics of an SPFILE:
▪ Server side
▪ Binary file
▪ Edit by issuing ALTER SYSTEM SET command
❖ Alert and Trace Log Files: When things go wrong, Oracle can and often does write messages to the
alert log . The alert log file is a chronological log of messages and errors written out by an Oracle
Database. Typical messages found in this file is: database startup, shutdown, log switches, space
errors, etc. Oracle will automatically create a new alert log file whenever the old one is deleted.
Oracle will write the alert.log file to the directory as specified by the BACKGROUND_ DUMP_ DEST
parameter.
❖ Trace File are trace (or dump) file that Oracle Database creates to help you diagnose and resolve
operating problems. Each server and background process writes to a trace file. The trace files for the
Oracle instance background processes are also located in BACKGROUND_DUMP_DEST.
❖ Backup Files: Backup and recovery procedures protect your database against data loss and
reconstruct the data, should loss occur. Backup files can originate from a number of sources, such as
operating system copy commands or Oracle Recovery Manager (RMAN). If the DBA performs a
―cold‖ backup the backup files are simply operating system copies of the datafiles, redo log files,
control files, archived redo log files, and so forth. If you lose the original data, then you can
reconstruct it by using a backup.
Recovery Manager (RMAN) is an Oracle utility that can back up, restore, and recover database files.
It is a feature of the Oracle database server and does not require separate installation. RMAN can
generate full and incremental backups of datafiles, control files, archived redo log files, and SPFILEs
that are in a special format, called backupsets, only readable by RMAN. RMAN backupset backups
are generally smaller than the original datafiles because RMAN does not back up unused blocks.
❖ Oracle Managed Files:Oracle Managed Files (OMF) directly manages file creation and deletion at
the operating system level. It has several advantages including:
• Automatic cleanup of the filesystem when database objects are dropped.
• Standardized naming of database files.
• Increased portability since file specifications are not needed.
https://psc-msc.blogspot.com/
Page 10 of 48 Data Base Administration & Management M. Waseem
• Simplified creation of test systems on differing operating systems. No unused files
wasting disk space.
❖ Password Files: An Oracle password file is a file within the Oracle administrative or software
directory structure on disk used to authenticate Oracle system administrators for tasks such as
creating a database or starting up and shutting down the database. The Oracle command-line utility
orapwd creates a password file if one does not exist or is damaged. The privileges granted through
this file are the SYSDBA and SYSOPER privileges.
To minimize the possibility of losing a control file or a redo log file, multiplexing of database files
reduces or eliminates data-loss problems caused by media failures. Multiplexing can be somewhat
automated by using an Automatic Storage Management (ASM) instance. I need some information
regarding the multiplexing of data files and redo log files:
2 Oracle Instances
When a database is started on a database server Oracle allocates a memory area called the System Global
Area (SGA) and starts one or more Oracle processes. This combination of the SGA and the Oracle
processes is called an Oracle instance.
After starting an instance, Oracle associates the instance with the specified database. This is a mounted
database. The database is then ready to be opened, which makes it accessible to authorized users. Only
the database administrator can start up an instance and open the database. The instances that share the
database can be on the same server, most likely the instances will be on separate servers that are
connected by a high-speed interconnect and access a database.
A System Global Area (SGA) is a group of shared memory structures that contain data and control
information for one Oracle database instance. If multiple users are concurrently connected to the same
instance, the data in the instance's SGA is "shared" among the users. Most of its parameters have dynamic
https://psc-msc.blogspot.com/
Page 11 of 48 Data Base Administration & Management M. Waseem
size unless the parameter SGA_MAX_SIZE is not specified. SGA is allocated in units of GRANULES. A
GRANULE can either be 4 MB or 16MB.
➢ Shared Pool:
The shared pool contains two major sub-caches: the library cache and the data dictionary cache. The
shared pool is sized by the SHARED_POOL_SIZE initialization parameter.
• Library Cache:
The library cache holds information about SQL and PL/SQL statements that are run against the
database. It is shared by all users and also contains execution plan and syntax-tree or SQL
statement to improve execution time without reloading SQL statement each time.
• Data Dictionary Cache:
The data dictionary is a collection of database tables, owned by the SYS and SYSTEM schemas
that contain the metadata about the database, its structures, privileges and roles of database users.
.
➢ Redo Log Buffer:
The redo log buffer holds the most recent changes to the data blocks in the datafiles. When the redo log
buffer is one-third full, or every three seconds, Oracle writes redo log records to the redo log files. A user’s
committed transaction is not considered complete until the redo log entries have been successfully written to
the redo log files.
➢ Large Pool
The large pool is an optional area of the SGA. It is used for transactions that interact with more than one
database, for processes parallel queries, RMAN parallel backup and restore operations. The large pool
makes available large blocks of memory for operations. The initialization parameter LARGE_POOL_SIZE
controls the size of the large pool and is a dynamic parameter.
➢ Java Pool
It used by the Oracle JVM for all Java code and data within a user session. Storing Java code and data in the
Java pool is analogous to SQL and PL/SQL code cached in the shared pool.
➢ Streams Pool
The streams pool is sized by using the initialization parameter STREAMS_POOL_SIZE. The streams pool
holds data and control structures to support the Oracle Streams feature of Oracle Enterprise Edition. Oracle
Streams manages the sharing of data and events in a distributed environment.
The Program Global Area is an area of memory allocated and private for one process. PGA contains the
data and control information for a server process. It is non-shared memory created by Oracle Database
when a server process is started. Only a server process can access the PGA. Oracle Database reads
and writes information in the PGA on behalf of the server process. The PGA also includes a sort
area.Oracle Database automatically derives the total amount of PGA memory available to active work
areas from the PGA_AGGREGATE_TARGET initialization parameter.
https://psc-msc.blogspot.com/
Page 12 of 48 Data Base Administration & Management M. Waseem
2.2 Processes
A process is a mechanism in an operating system that can run a series of steps. The mechanism depends
on the operating system. A process normally runs in its own private memory area. Each process in a
database instance performs a specific job.
Multiple-process Oracle (also called multiuser Oracle) uses several processes to run different parts of the
Oracle Database code and additional processes for the users—either one process for each connected user
or one or more processes shared by multiple users.
➢ User Process;
➢ Server Process;
➢ Background Processes.
When a user requests a session with the database, the system starts a dedicated server process for that
user. When the user disconnects from the database, this dedicated server process terminates. Many people
call this dedicated server process a user process as well.
❖ Server Process:
Oracle Database creates server processes to handle the requests of user or client processes connected to
the instance. A client process always communicates with a database through a separate server process.
Server processes can be either dedicated or shared.
▪ Dedicated Server Processes: In dedicated server connections, the client connection is associated
with one and only one server process. Each client process communicates directly with its server
process. This server process is dedicated to its client process for the duration of the session.
▪ Shared Server Processes: In shared server connections, client applications connect over a network
to a dispatcher process, not a server process. The dispatcher process receives requests from
connected clients and puts them into a request queue in the large pool. The first available shared
server process takes the request from the queue and processes it. Afterward, the shared server
places the result into the dispatcher response queue. The dispatcher process monitors this queue
and transmits the result to the client.
❖ Background Processes:
When an Oracle instance starts, multiple background processes start. A background process is a block of
executable code designed to perform a specific task. Together, the SGA and the background processes
compose an Oracle instance. Each background process has a separate task, but works with the other
processes. Oracle Database creates background processes automatically when a database instance starts.
This section includes the following topics:
• Mandatory Background Processes
• Optional Background Processes
• Slave Processes Mandatory Background Processes:
These are present in all typical database configurations. These processes run by default in a database
instance
This section describes the following mandatory background processes:
• System Monitor Process (SMON): In the case of a system crash or instance failure, due to a
power outage or CPU failure, the SMON process performs crash recovery by applying the
entries in the online redo log files to the datafiles. It Cleaning up unused temporary segments.
https://psc-msc.blogspot.com/
Page 13 of 48 Data Base Administration & Management M. Waseem
• Process Monitor Process (PMON): The process monitor (PMON) monitors the other
background processes and performs process recovery when a server or dispatcher process
terminates abnormally. PMON perform the following tasks:
• Roll back the transaction that was in progress when the power went out.
• Mark the transaction’s blocks as available in the buffer cache. Remove the locks on
the affected rows in the table.
• Remove the process ID of the disconnected process from the list of active processes.
• Database Writer Process (DBWn): The database writer process (DBWn) writes new or change
the contents of database buffers to data files. The number of DBWn processes is controlled by
the DB_WRITER_PROCESSES parameter.
• Log Writer Process (LGWR): The log writer process (LGWR) manages the redo log buffer. A
transaction is not considered complete until LGWR successfully writes the redo information,
including the commit record, to the redo log files. If the redo log files are grouped, and one of
the multiplexed redo log files in a group is damaged, LGWR writes to the remaining members
of the group and records an error in the alert log file.
• ARCHIVELOG mode ( ARCn) : If the database is in ARCHIVELOG mode, then the archiver
process, or ARCn, copies redo logs to one or more destination directories, devices, or
network locations whenever a redo log fills up and redo information starts to fill the next redo
log in sequence.
• Checkpoint Process (CKPT): The checkpoint process, or CKPT, helps to reduce the amount
of time required for instance recovery. During a checkpoint, CKPT updates the header of the
control file and the datafiles to reflect the last successful SCN (System Change Number). A
checkpoint occurs automatically every time a redo log file switch occurs.
Slave processes are background processes that perform work on behalf of other processes.
I/O Slave Processes: I/O slave processes (Innn) simulate asynchronous I/O for systems and devices that do not
support it. In asynchronous I/O, there is no timing requirement for transmission, enabling other processes to start
before the transmission has finished.
Parallel Query Slaves: In parallel execution or parallel processing, multiple processes work together simultaneously
to run a single SQL statement. By dividing the work among multiple processes, Oracle Database can run the statement
more quickly. Parallel execution reduces response time for data-intensive operations on large databases .
https://psc-msc.blogspot.com/
Page 14 of 48 Data Base Administration & Management M. Waseem
Serial Execution :In serial execution, a single server process performs all necessary processing for the sequential
execution of a SQL statement. Parallel Execution In parallel execution, the server process acts as the parallel execution
coordinator responsible for parsing the query, allocating and controlling the slave processes, and sending output to the
user. The number of parallel execution servers assigned to a single operation is the degree of parallelism for an
operation.
Chapter 3:
3. Managing an Oracle Instance: Parameter File; Creating SPFILE; Oracle Managed Files; Startup and Shutdown
Database; Alert Log File; Background Trace File; User Trace File.
A parameter file is a file that contains a list of initialization parameters and a value for each parameter. In
order to start an instance and open the database, we must connect as SYSDBA and enter STARTUP
command. The Oracle server will then read the initialization parameter file and prepare the instance
according to the initialization parameters contained within. After being read from a file, initialization
parameters are retained in memory, where the values for many of them can be changed dynamically.
There or two types of parameters:
Explicit: having and entry in the file
Implicit : no entry within the file , but assuming the Oracle default values.
Multiple initialization parameter files can exist. There are two types of files from which these parameters can
be read: a text initialization parameter file and a server parameter file.
https://psc-msc.blogspot.com/
Page 15 of 48 Data Base Administration & Management M. Waseem
• with the IMMEDIATE Clause: Use immediate database shutdown only in the following situations:
o To initiate an automated and unattended backup o When a power
shutdown is going to occur soon
o When the database or one of its applications is functioning irregularly
and you cannot contact users to ask them to log off or they are unable
to log off
To shut down a database immediately, use the SHUTDOWN command with the
IMMEDIATE clause: SHUTDOWN IMMEDIATE
• With the TRANSACTIONAL Clause: When you want to perform a planned shutdown of an instance
while allowing active transactions to complete first, use the SHUTDOWN command with the
TRANSACTIONAL clause:
SHUTDOWN TRANSACTIONAL
Transactional database shutdown proceeds with the following conditions:
o No new connections are allowed, nor are new transactions allowed to be started, after the
statement is issued.
o After all transactions have completed, any client still connected to the instance is
disconnected.
o At this point, the instance shuts down just as it would when a SHUTDOWN IMMEDIATE
statement is submitted.
https://psc-msc.blogspot.com/
Page 16 of 48 Data Base Administration & Management M. Waseem
• With the ABORT Clause: If possible, perform this type of shutdown only in the following situations:
The database or one of its applications is functioning irregularly and none of the other types of
shutdown works.
o You need to shut down the database.
o You experience problems when starting a database instance.
When you must do a database shutdown ,issue the SHUTDOWN command with the
ABORT clause:
SHUTDOWN ABORT
The Oracle Managed Files feature provides better integration with operating system functionality for disk
space allocation.
A file system allows the disk space to be allocated to a large number of files. Each file is made to appear as
a contiguous address space to applications such as Oracle Database.
https://psc-msc.blogspot.com/
Page 17 of 48 Data Base Administration & Management M. Waseem
https://psc-msc.blogspot.com/
Page 18 of 48 Data Base Administration & Management M. Waseem
Chapter 4:
4. Creating Database and Data dictionary.
Creating Database
1- Considerations Before Creating a Database
Creating a database can also erase information in an existing database and create a new database with the
same name and physical structure. The following topics can help prepare you for database creation.
Planning for Database Creation
• Meeting Creation Prerequisites
• Deciding How to Create an Oracle Database
❖ Planning for Database Creation
• Plan the database tables and indexes and estimate the amount of space they will require.
• Plan the layout of the underlying operating system files that are to comprise your database.
• Using the Oracle Managed Files feature to create and manage the operating system files that
comprise your database storage.
• Select the global database name, which is the name and location of the database within the
network structure.
• Familiarize yourself with the initialization parameters that comprise the initialization parameter file.
• Select the database character set.
• Consider what time zones your database must support.
• Select the standard database block size.
• Use an undo tablespace to manage your undo records, rather than rollback segments.
• Develop a backup and recovery strategy to protect the database from failure.
• Familiarize yourself with the principles and options of starting up and shutting down an instance
and mounting and opening a database.
❖ Deciding How to Create an Oracle Database
You use the CREATE DATABASE statement to perform these operations. You have the following options for
creating your new Oracle database:
• Use the Database Configuration Assistant (DBCA). DBCA can be launched by the Oracle Universal
Installer, depending upon the type of install that you select, and provides a graphical user interface
(GUI) that guides you through the creation of a database.
• Create the database manually from a script. If you already have existing scripts for creating your
database, you can still create your database manually and editing your existing script to take
advantage of new Oracle features.
• Upgrade an existing database. You can upgrade your existing Oracle database and use it with the
new release of the Oracle software.
https://psc-msc.blogspot.com/
Page 19 of 48 Data Base Administration & Management M. Waseem
• DBCA displays the templates that are available. You select the appropriate template for the database
that you want to create. Clicking the "Show Details..." button displays specific information about the
database defined by a template.
• When you select a template, you also specify whether the database definition is to include datafiles.
• The next page that DBCA displays enables you provide a global database name and SID.
• Specifying Database Features. The following is a representative list of Oracle features that you can
install in your database.
1. Oracle Spatial
2. Oracle Ultra Search
3. Oracle Label Security
4. Oracle Data Mining
5. Oracle OLAP Services
6. Sample Schemas
• You can also display a list of standard database features. these are optional.
1. Oracle JVM
2. Oracle Text
3. Oracle interMedia
4. XDB Protocol
• You specify mode (dedicated server of shared server), set initialization parameters, and specify
datafile locations.
• After you have completed the specification, you can:
1. Create the database now
2. Save the description as a database template
3. Generate database creation scripts
https://psc-msc.blogspot.com/
Page 21 of 48 Data Base Administration & Management M. Waseem
CATALOG.SQL Creates the views of the data dictionary tables, the dynamic performance views, and public synonyms
for many of the views. Grants PUBLIC access to the synonyms.
➢ User-Accessible Views: The views that summarize and display the information stored in the base
tables of the data dictionary. These views decode the base table data into useful information, such as
user or table names, using joins and WHERE clauses to simplify the information.
https://psc-msc.blogspot.com/
Page 22 of 48 Data Base Administration & Management M. Waseem
Chapter 5:
5. Managing Control Files and Redo Log Files.
Without the control file, the database cannot be mounted and recovery is difficult. The control file of an
Oracle database is created at the same time as the database. You should create two or more copies of the
control file during database creation. You might also need to create control files later, if you lose control files.
2- Guidelines for Control Files
➢ Provide Filenames for the Control Files
➢ Multiplex Control Files on Different Disks
➢ Place Control Files Appropriately
➢ Back Up Control Files
➢ Manage the Size of Control Files
3- Creating Control Files
➢ Creating Initial Control Files
The initial control files are created when issue the CREATE DATABASE statement. The names of the control
files are specified by the CONTROL_FILES parameter.
CONTROL_FILES =
Creating Additional Copies, Renaming, and Relocating Control Files
You can create an additional control file copy by copying an existing control file to a new location and
adding the file's name to the list of control files. Similarly, you rename an existing control file by copying the
file to its new name or location, and changing the file's name in the control file list.
➢ Creating New Control Files
It is necessary for you to create new control files in the following situations:
• All control files for the database have been permanently damaged and you do not have a control file
backup.
• You want to change one of the permanent database parameter settings originally specified in the
CREATE DATABASEstatement. These settings include the database's name and the following
parameters: MAXLOGFILES, MAXLOGMEMBERS, MAXLOGHISTORY, MAXDATAFILES, and
MAXINSTANCES.
• You can create a new control file for a database using the CREATE CONTROLFILE statement.
https://psc-msc.blogspot.com/
Page 23 of 48 Data Base Administration & Management M. Waseem
With the instance shut down, use an operating system command to overwrite the bad control file with a
good copy:
% cp /u01/oracle/prod/control03.ctl /u01/oracle/prod/control02.ctl
Start SQL*Plus and open the database: SQL> STARTUP
7- Dropping Control Files
You can drop control files from the database. Remember that the database must have at least two control
files at all times.
1. Shut down the database.
2. Edit the CONTROL_FILES parameter in the database's initialization parameter file to delete the old
control file's name.
3. Restart the database.
➢ Redo Threads
Each database instance has its own online redo log groups. These online redo log groups, multiplexed or
not, are called an instance's thread of online redo. Only one database instance accesses an Oracle
database, so only one thread is present. ➢ Online Redo Log Contents
• Online redo log files are filled with redo records. A redo record, also called a redo entry.
• These records contain description of a change made to a single block in the database.
• Redo entries record data that you can use to reconstruct all changes made to the database, including
the rollback segments.
• Redo records are buffered in a circular fashion in the redo log buffer of the SGA and are written to
one of the online redo log files by the Oracle background process.
2- Planning the Online Redo Log
➢ Multiplexing Online Redo Log Files
Oracle allows multiplying Redo Log files to protect against failure, meaning that two or more identical copies
can be automatically maintained as groups in separate locations, ideally separate disk drives. ➢
Responding to Online Redo Log Failure
Whenever LGWR connote write to a member of group, the database writes an error message to the LGWR
trace file and to alert log. These errors can be used to resolve issue.
➢ Legal and Illegal Configurations
Multiplexed redo log should have same number of members in each group. However this is not a MUST
HAVE. For example, one group can have only one member, while other groups have two members. This
configuration protects against disk failures that temporarily affect some online redo log members but leave
others intact.
3- Creating Online Redo Log Groups and Members
Plan the online redo log of a database and create all required groups and members of online redo log files
during database creation.
To create new online redo log groups and members, you must have the ALTER DATABASE system privilege. A
database can have up to MAXLOGFILES groups. ➢ Creating Online Redo Log Groups
To create a new group of online redo log files, use the SQL statement ALTER DATABASE with the ADD
LOGFILE clause.
https://psc-msc.blogspot.com/
Page 24 of 48 Data Base Administration & Management M. Waseem
4- Relocating and Renaming Online Redo Log Members
• You can use operating system commands to relocate online redo logs, then use the ALTER DATABASE
statement to make their new names (locations) known to the database.
• It is useful if current disk drive is going to be removed or id some data needs to be moved due to disk
space issues.
• To rename online redo log members, you must have the ALTER DATABASE system privilege.
Additionally, you might also need operating system privileges to copy files to the desired location and
privileges to open and back up the database.( optional or not read)
➢ Steps for Renaming Online Redo Log Members Shut down the
database.
SHUTDOWN
Copy the online redo log files to the new location.
mv /diska/logs/log1a.rdo /diskc/logs/log1c.rdo mv
/diska/logs/log2a.rdo /diskc/logs/log2c.rdo
• Startup the database, mount, but do not open it.
CONNECT / as SYSDBA
STARTUP MOUNT
• Rename the online redo log members.
ALTER DATABASE
RENAME FILE '/diska/logs/log1a.rdo',
'/diska/logs/log2a.rdo'
TO '/diskc/logs/log1c.rdo',
'/diskc/logs/log2c.rdo';
• Open the database for normal operation.
ALTER DATABASE OPEN;
https://psc-msc.blogspot.com/
Page 25 of 48 Data Base Administration & Management M. Waseem
Chapter 6:
6. Managing Tablespaces, Operations with Tablespaces.
Managing Tablespaces
• Tablespace is a database storage unit that groups related logical structures together.
• Database files are stored in tablespace.
• Multiple table space can be used for flexibility in performance.
• Quotas can be assigned to users for creating tables, views, clusters, indexed and other objects.
• A tablespace belongs to only one database, and has at least one datafile that is used to store data for
the associated tablespace.
❖ Tablespace Types
➢ Permanent – These tablespaces store objects in segments that are permanent – that persist beyond
the duration of a session or transaction. The SYSTEM and SYSAUX tablespaces are two examples of
permanent tablespaces.
• SYSTEM Tablespace o A tablespace that is always used to store SYSTEM data that
includes data about tables, indexes, sequences, and other objects – this metadata
comprises the data dictionary.
• SYSAUX Tablespace
o The SYSAUX tablespace stores data for auxiliary applications such as the
LogMiner, Workspace Manager, Oracle Data Mining, Oracle Streams, and
many other Oracle tools.
.
➢ Undo – These tablespaces store segments that may be retained beyond a transaction, but are
basically used to:
o Provide read consistency for SELECT statements that access tables that have rows that are
in the process of being modified.
o Provide the ability to rollback a transaction that fails to commit.
➢ Temporary – This tablespace stores segments that are transient and only exist for the duration of
a session or a transaction. Mostly, a temporary tablespace stores rows for sort and join operations.
➢ Bigfile: A bigfile tablespace eases database administration because it consists of only one datafile.
The single datafile can be up to 128TB (terabytes) in size if the tablespace block size is 32KB.
https://psc-msc.blogspot.com/
Page 27 of 48 Data Base Administration & Management M. Waseem
Chapter 7.
7. Data File Management, Segments, Block.
Managing Datafiles
Data files are the operating system files that store the data within the database. The data is written to these
files in an Oracle proprietary format that cannot be read by other programs. Data files can be broken down
into the following components: 1- Blocks
Oracle manages the storage space in the datafile of a database in units called data blocks. A data block
is the smallest unit of data used by a database. The size of a block is a specific number of bytes of
storage within a given tablespace within the database. The default block size is specified by
DB_BLOCK_SIZE parameter. In oracle 11g Largest block size allowed is 2KB to 32KB. The default block
size is 8KB. Every data block contains:
❖ Header :The header contains general block information, such as the block address and the type of
segment (for example, data, index, or rollback).
❖ Table Directory: This portion of the data block contains information about the tables having
rows in this block.
❖ Row Directory: This portion of the data block contains information about the actual rows in the
block (including addresses for each row piece in the row data area).
Once the space has been allocated in the row directory of a data block's overhead, this space is not
reclaimed when the row is deleted.
❖ Overhead:The data block header, table directory, and row directory are referred to collectively as
overhead. Some block overhead is fixed in size; the fixed and variable portions of data block
overhead total 84 to 107 bytes.
❖ Row Data: This portion of the data block contains table or index data. Rows can span blocks.
❖ Free Space management: Free space is allocated for insertion of new rows and for updates
to rows that require additional space. Two types of statements can increase the free space of one or
more data blocks: DELETE statements, and UPDATE statements that update existing values to
smaller values. The released space from these types of statements is available for subsequent
INSERT statements.
Two space management parameters, PCTFREE and PCTUSED, enable you to control the use of free space
for inserts of and updates to the rows in all the data blocks of a particular segment. You specify these
parameters when creating or altering a table or cluster. PCTFREE and PCTUSED work together to optimize
the utilization of space in the data blocks of the extents within a data segment.
2- Extents
An extent is a logical unit of database storage space allocation made up of a number of contiguous data
blocks. When you enlarge a database object, the space added to the object is allocated as an extent. Oracle
starts with minimum extent size of 64KB. When table is created, initial extent is allocated. When the space in
an extent is full, another extent is allocated.
3- Segments
Each segment is composed of one or more extents that form a database object that Oracle treats as a unit,
such as a table or index. Four types of segments are found in an Oracle database: data segments, index
segments, temporary segments.
https://psc-msc.blogspot.com/
Page 28 of 48 Data Base Administration & Management M. Waseem
❖ Data Segments
A single data segment in an Oracle database holds all of the data for one of the following:
• A table that is not partitioned or clustered
• A partition of a partitioned table
• A cluster of tables
Oracle creates this data segment when you create the table or cluster with the CREATE statement.
❖ Index Segments
Every nonpartitioned index in an Oracle database has a single index segment to hold all of its data. For a
partitioned index, every partition has a single index segment to hold its data. Oracle creates the index
segment for an index or an index partition when you issue the CREATE INDEX statement.
❖ Temporary Segments
When processing queries, Oracle often requires temporary workspace for intermediate stages of SQL
statement parsing and execution. Oracle automatically allocates this disk space called a temporary segment.
https://psc-msc.blogspot.com/
Page 29 of 48 Data Base Administration & Management M. Waseem
Chapter 8:
8. Managing Undo Data, Undo Data Statistics: Managing Tables and Users:
(2) manual undo management – manual undo management is the only method available for Oracle 8i
and earlier versions of Oracle and is the type of management that involves use of rollback
segments.
UNDO_MANAGEMENT = MANUAL
If the UNDO_MANAGEMENT initialization parameter is not specified, the instance starts in manual undo
management mode.
Managing Tables
About Tables
• Tables are the basic unit of data storage in an Oracle Database.
• Data is stored in rows and columns.
• You define a table with a table name and a set of columns.
• each column a column is given a name, a data type and a width.
• rules can specify for each column of a table. These rules are called integrity constraints. Example
NOT NULL
• Tables can also include virtual columns. column having a derived value.
• After you create a table, you insert rows of data using SQL statements or using an Oracle bulk load
utility.
• The table data con be queried, deleted, updated using SQL.
Guidelines for Managing Tables:
• Design Tables Before Creating Them Specify the type of table to create.
• Specify How Data Block Space Is to Be Used: By specifying the PCTFREE and PCTUSED parameters
during the creation of each table,
• Specify the Location of Each Table
• Consider Parallelizing Table Creation
• Consider Using NOLOGGING When Creating Tables: The NOLOGGING clause causes minimal redo
information to be generated during the table creation
• Estimate Table Size and Set Storage Parameters
• Plan for Large Tables: There are no limits on the physical size of tables and extents. You can specify
the keyword UNLIMITED for MAXEXTENTS.
• You cannot move types and extent tables to a different schema when the original data still exists in
the database.
• You cannot merge an exported table into a preexisting table having the same name in a different
schema.
Tables types
• Relational Tables
• Temporary Tables
• Index organized Tables
• Object Tables
• External Tables
• Clustered Tables
• Partitioned Table
Creating Tables
To create a new table you must have the CREATE TABLE system privilege.
To create a new table in your schema, you must have the CREATE TABLE system privilege. To create a table
in another user's schema, you must have the CREATE ANY TABLE system privilege.
https://psc-msc.blogspot.com/
Page 31 of 48Data Base Administration & Management M. Waseem
➢ Creating a Table you create a table named admin_emp in the hr schema by
CREATE TABLE statement.
CREATE TABLE hr.admin_emp (
empno NUMBER(5) PRIMARY KEY,
ename VARCHAR2(15) NOT NULL,
job VARCHAR2(10), mgr
NUMBER(5), hiredate DATE DEFAULT
(sysdate), sal NUMBER(7,2),
comm NUMBER(7,2), deptno
NUMBER(3) NOT NULL
CONSTRAINT admin_dept_fkey REFERENCES hr.departments
(department_id))
TABLESPACE admin_tbs
STORAGE ( INITIAL 50K
NEXT 50K
MAXEXTENTS 10
PCTINCREASE 25 );
Altering Tables
You alter a table using the ALTER TABLE statement. you must have either the ALTER object privilege for the
table or the ALTER ANY TABLE system privilege. Example:
➢ Moving a Table to a New Segment or Tablespace
The ALTER TABLE ... MOVE statement enables you to relocate data of a nonpartitioned table into a new
segment, and different tablespace.
The following statement moves the hr.admin_emp table to a new segment, specifying new storage
parameters:
ALTER TABLE hr.admin_emp MOVE
STORAGE ( INITIAL 20K
NEXT 40K
MINEXTENTS 2
MAXEXTENTS 20
PCTINCREASE 0 );
Dropping Tables
• Use DROP TABLE clause to drop a table that is no longer needed in own schema.
• DROP ANY TABLE system privilege is required to drop table from another schema.
o To drop a table: DROP TABLE emp:
https://psc-msc.blogspot.com/
Page 32 of 48 Data Base Administration & Management M. Waseem
o Drop foreign key constraints of child table: DROP TABLE emp CASCADE
CONSTRAINTS; o Drop a table and immediately release associated space: DROP
TABLE emp PURGE;
➢ Drop Columns from Tables
• This statement drops only the sal column:
o ALTER TABLE hr.admin_emp DROP COLUMN sal; o ALTER TABLE
hr.admin_emp DROP UNUSED COLUMNS CHECKPOINT 250;
• The following statement drops both the bonus and comm columns:
ALTER TABLE hr.admin_emp DROP (bonus, commission);
• To mark the hiredate and mgr columns as unused, execute the following statement:
ALTER TABLE hr.admin_emp SET UNUSED (hiredate, mgr); Managing
Users:
Each Oracle database has a list of valid database users. To access a database, a user must run a database
application and connect to the database instance using a valid user name defined in the database.
Creating Users
You create a database user with the CREATE USER statement.To create a user, you must have the CREATE
USER system privilege.
The following example creates a user and specifies that user's password, default tablespace, temporary
tablespace where temporary segments are created, tablespace quotas, and profile.
CREATE USER saad
IDENTIFIED BY wasim
DEFAULT TABLESPACE data_ts
QUOTA 100M ON test_ts
QUOTA 500K ON data_ts
TEMPORARY TABLESPACE temp_ts
PROFILE clerk;
GRANT connect TO saad;
https://psc-msc.blogspot.com/
Page 33 of 48 Data Base Administration & Management M. Waseem
Chapter 09:
9. Indexes Management, Maintaining Data Integrity, Constraints. Managing Privileges.
Indexes Management
Indexes are totally optional structures that are intended to speed up the execution of SQL statements against
table data and cluster data. Indexes are used for direct access to a particular row or set of rows in a table.
Type of indexes
Indexes can be categorized in a number of ways. The two primary options are :
Standard (B-tree): A standard, B-tree index contains an entry for each value in the index key along with an
address to the row where the value is stored. A B-tree index is the default in the form of balance tree.
Bitmap: A bitmap index uses strings of bits to encapsulate values and potential row addresses. It is best for
low cordiality columns. It has a bitmap for each index value.
Altering Indexes
• You can alter an index only to change the transaction entry parameters or to change the storage
parameters; you cannot change its column structure.
The following statement alters the EMP_ENAME index:
ALTER INDEX emp_ename
INITRANS 5
MAXTRANS 10
STORAGE (PCTINCREASE 50);
Dropping Indexes
https://psc-msc.blogspot.com/
Page 34 of 48 Data Base Administration & Management M. Waseem
To drop an index, the index must be contained in your schema, or you must have the DROP ANY INDEX
system privilege.
You might want to drop an index for any of the following reasons:
• The index is no longer required.
• The index is not providing anticipated performance improvements for queries issued against the
associated table. (For example, the table might be very small, or there might be many rows in the
table but very few index entries.)
• Applications do not use the index to query the data.
• The index has become invalid and must be dropped before being rebuilt.
• The index has become too fragmented and must be dropped before being rebuilt.
You cannot drop only the index associated with an enabled UNIQUE key or PRIMARY KEY
constraint. To drop a constraint's associated index, you must disable or drop the constraint itself.
DROP INDEX emp_ename;
INTEGRITY CONSTRAINTS
Integrity Constraints are used to prevent entry of invalid information into tables. There are five Integrity
Constraints Available in Oracle. They are :
• Not Null
• Primary Key
• Unique
• Foreign Key
• Check
https://psc-msc.blogspot.com/
Page 35 of 48 Data Base Administration & Management M. Waseem
Managing Privileges
A user privilege is a right to execute a particular type of SQL statement, or a right to access another user's
object. The types of privileges are defined by Oracle.
Roles, on the other hand, are created by users (usually administrators) and are used to group together
privileges or other roles. They are a means of facilitating the granting of multiple privileges or roles to users.
Creating a secure application role: A secure application role enables you to define conditions that control
when a database role can be enabled
This contains the following topics:
• System Privileges
• Object Privileges
• User Roles
System Privileges
There are over 100 distinct system privileges. Each system privilege allows a user to perform a particular
database operation or class of database operations. Because system privileges are so powerful, Oracle
recommends that you configure your database to prevent regular (non-DBA) users exercising ANY system
privileges (such as UPDATE ANY TABLE) on the data dictionary. Object Privileges
Each type of object has different privileges associated with it.
You can specify ALL [PRIVILEGES] to grant or revoke all available object privileges for an object. ALL is not
a privilege; rather, it is a shortcut, or a way of granting or revoking all object privileges with one word in GRANT
and REVOKE statements. User Roles
A role groups several privileges and roles, so that they can be granted to and revoked from users
simultaneously. A role must be enabled for a user before it can be used by the user.
Creating a Role
You can create a role using the CREATE ROLE statement. The following statement creates the clerk role,
which is authorized by the database using the password bicentennial:
Later, you can set or change the authorization method for a role using the ALTER ROLE statement.
ALTER ROLE clerk IDENTIFIED EXTERNALLY;
Dropping Roles
You can drop a role using the SQL statement DROP ROLE. To drop a role, you must have the DROP ANY
ROLE system privilege or have been granted the role with the ADMIN OPTION.
https://psc-msc.blogspot.com/
Page 36 of 48 Data Base Administration & Management M. Waseem
Chapter10:
10. Basic Oracle Net Architecture: Types of Networks, Oracle Net Services, Oracle Shared Server,
Connection Manager, Oracle Net Connections.
Basic Oracle Net Architecture Overview
of Oracle Net:
Oracle Net is a software layer that resides on the client and the Oracle Database server. It is responsible for
establishing and maintaining the connection between the client application and server, as well as
exchanging messages between them, using industry-standard protocols.
• client/server configuration (two-tier architecture): the client, supports the application that initiates
the request from the database. The back-end machine on which the database resides is called the
server. When the client sends a database request to the server, the server receives and executes the
SQL statement that is passed to it. The direct communication takes place between client and server.
The Two-tier architecture is divided into two parts:
1) Client Application (Client Tier)
2) Database (Data Tier)
• Three-tier architecture (thin-client configuration): In it application code is housed and executed
using Java applets on a separate server from the database server. A database request is sent from
the client through the application server to the database server; the database server then receives
and executes the SQL statement that is passed to it. The results of the SQL statement, plus any error
conditions that are returned, are then sent back to the client through the application server.
• server/server configurations: databases on separate servers share data with each other. Each
server supports client applications, but it also has the ability to communicate with other servers in the
network. When one of the servers sends a database request to another server, the sending server
acts like a client. The receiving server executes the SQL statement passed to it and returns the
results plus error conditions to the sender.
Network types
You can model many different types of networks in UIM (Unified Inventory Management), including:
• Personal Area Network (PAN): The smallest and most basic type of network, a PAN is made up of a
wireless modem, a computer or two, tablets, etc.
• Local area network (LAN): LANs are one of the simplest types of networks. LANs connect groups of
computers together across short distances (within a building or two/three) to share information and
resources. Enterprises typically manage and maintain LANs.
• Metropolitan Area Network (MAN): A MAN consists of a computer network across an entire city,
college campus or small region. This type of network can cover an area from several miles to tens of
miles.
• Wide Area Network (WAN): A WAN occupies a very large area, such as an entire country or the
entire world.
• Campus Area Network (CAN): Larger than LANs, but smaller than metropolitan area networks these
types of networks are typically seen in universities or small businesses.
• Storage area network (SAN): As a dedicated high-speed network that connects shared pools
of storage devices to several servers.
• Virtual private network (VPN): A VPN lets its users send and receive data as if their devices were
connected to the private network – even if they’re not.
• Asynchronous transport mode (ATM): ATM is a high-speed networking standard designed to
support voice, video and data communications.
ATM stands for automated teller machine, a machine that bank customers use to make transactions
without a human teller.
• Digital subscriber loop (DSL): DSL is a modem technology that uses existing telephone lines to
transport high-bandwidth data, such as multimedia and video.
https://psc-msc.blogspot.com/
Page 37 of 48 Data Base Administration & Management M. Waseem
Oracle Net Services
Oracle Net Services provides a scalable, secure, and easy-to-use high-availability network infrastructure for
Oracle environment. It eases the complexities of network configuration and management, maximizes
performance, and improves network security and diagnostic capabilities as summarized hereafter.
• Connectivity: Oracle Net Services enables a network session from a client application to an Oracle
database server.
• Manageability: it encompasses location transparency, centralized configuration and management, quick
installation and configuration.
• Performance and Scalability: features such as Database Resident Connection Pool , Shared Server and
scalable event models enable performance and high scalability.
• Network Security: Oracle Net Services enables database access control using features of firewall access
control and protocol access control.
• Diagnose ability: a diagnostic and performance analysis tool, Trace Assistant, provides detailed information
about the source and context of problems as they arise.
https://psc-msc.blogspot.com/
Page 38 of 48 Data Base Administration & Management M. Waseem
Chapter 11:
11. Server Side Configuration: The Listener Process; Configuring Listener, Sessions, Creating and Managing
Listener.
Server Side Configuration
Oracle Net Listener is a separate process that runs on the database server computer. It receives incoming
client connection requests and manages the traffic of these requests to the database server.
The Listener Process:
Listener: A process that resides on the server whose responsibility is to listen for incoming client connection
requests and manage the traffic to the server. The Oracle Database Listener listens on a specific network
port (default 1521) and forwards network connections to the Database.
The characters of a listener:
• A listener can listen for more than one database.
• Multiple listeners can listen on behalf of a single database to perform load balancing
• The default name of the listener in Oracle Net is LISTENER
• The listener can listen for multiple protocols
The listener configuration is stored in a configuration file named listener.ora .
Configuring Listener:
Each listener is configured with one or more protocol addresses that specify its listening endpoints. Once a
client request has reached the listener, the listener selects an appropriate service handler to service the
client's request and forwards the client's request to it. It is possible to configure multiple listeners, each with
unique name, in one listener.ora file.
Sessions:
Session events help you debug or coordinate the actions of multiple sessions. This section illustrates how
you customize session events, and discusses:
• Session Event Listeners
• Session Event Manager
• Implementing Events Using Java
➢ Session Event Listeners
One approach to customizing session events is to create session event listeners that detect and respond to
session events. To register objects as listeners for session events, implement ➢ Session Event Manager
The session event manager handles information about session events. Applications register listeners with
the session event manager to receive session event data. ➢ Implementing Events Using Java
You can implement custom events and event handlers in Java code.
o Select No to configure another listener, click Next. o Click Next to complete the
listener configuration.
https://psc-msc.blogspot.com/
Page 40 of 48 Data Base Administration & Management M. Waseem
Chapter 12:
12. Client Side Configuration: Host Naming Method, Local Naming Method, Net Assistant, Configurations.
Usage and Configuration of Oracle Shared Server.
Client Side Configuration
Client machines need to be configured before they can connect to an Oracle database. To configure the
client machine, you must first install Oracle client software, which includes Oracle Net software. Oracle
Net provides four naming methods:
• local naming
• Oracle Names Method
• directory naming
• Easy Connect naming
• external naming
Local Naming Method::
Support all oracle net protocols. With the local naming method, net service names are added to the
TNSNAMES.ORA file. A net service name is mapped to a network address contained in a connect descriptor.
Clients use this net service name when making a connection with an application. It also supports advanced
connection options such as source routing and load balancing.
You can use the Oracle Net Configuration Assistant’s Local Net Service Name configuration options to
manage net service names. Five options are available for the Oracle Net Configuration Assistant’s Local Net
Service Name configuration tool:
Host Naming Method::
Host naming can eliminate the need for service name lookup in the tnsnames.ora files. The host naming
method is available for TCP/IP network environments only.
Clients can connect to a server using host naming if the following conditions are met:
• Oracle Net Services software installed on both the client and database service
• Oracle TCP/IP protocol support on both the client and database service
• An IP address translation mechanism, such as Domain Name System (DNS) or a centrally
maintained TCP/IP hosts file, to resolve names
• No advanced features like Oracle Connection Manager or security are requested or required
No advanced features like connection manager or security options are used.
Net Assistant, Configurations::
Oracle Net Configuration Assistant is a wizard-based tool with a graphical user interface. Its primary uses are
to configure basic Oracle Net network components.This also important for configuring Enterprise User
Security, and also including:
Perform the following steps to configure the listener and naming methods using Oracle Net Configuration
Assistant:
1) Start Oracle Net Configuration Assistant. The Welcome page appears.
2) In the Listener Configuration, Listener Name screen, enter a Listener name or accept the default
value. Click Next.
3) In the Listener Configuration, Select Protocol screen, select one or more protocols from the Available
Protocols list, and move it to the Selected Protocols list. Click Next.
4) In the Listener Configuration, TCP/IP Protocol screen, select the standard port number, or enter a
different port number. Click Next.
5) In the Listener Configuration, More Listeners? screen, select No if you do not want to configure an
additional listener, and click Next.
6) The listener configuration is now complete, click Next to proceed.
7) In the Naming Methods Configuration screen, select Yes to configure naming methods. Click Next.
https://psc-msc.blogspot.com/
Page 41 of 48 Data Base Administration & Management M. Waseem
8) In the Naming Methods Configuration, Select Naming Methods screen, select the naming method you
want from the Available Naming Methods list, and move it to the Selected Naming Methods list. Click
Next.
Typically, Local Naming is sufficient.
9) In the Net Service Name Configuration, Service Name screen, enter Service Name, and click Next.
10) In the Net Service Name Configuration, Select Protocols screen, select the protocol for the database
you want to access, and click Next.
11) In the Net Service Name Configuration, TCP/IP Protocol screen, enter the Host name of the
computer where the Oracle database is installed. Use the standard port number, or specify a different
port number, and click Next.
12) In the Net Service Name Configuration, Test screen, click Yes, perform a test to test the database
connection. Click Next.
13) In the Net Service Name Configuration, Connecting screen, click Next.
14) In the Net Service Name Configuration, Net Service Name screen, enter the name of the Net Service
Name, and click Next.
15) Answer the remaining prompts to complete the configuration.
16) In the Finish screen, click Close, to exit from Oracle Universal Installer.
To start Oracle Net Configuration Assistant in standalone mode, select Programs from the Start menu, and
then select Oracle - HOME_NAME. Next, select Configuration and Migration Tools, and then Oracle Net
Configuration Assistant.
https://psc-msc.blogspot.com/
Page 42 of 48 Data Base Administration & Management M. Waseem
Chapter 13:
13. Backup and Recovery, Instance and Media Recovery, Configuration of Archive log mode, User Managed
Complete Recovery, Loading Data into Database, Tuning Tools, Sizing Shared Pool, Sizing Buffer Cache,
I/O Issues.
Backup and recovery
Backup and recovery is one of the most important aspects of database administration.
BASICS OF BACKUP
A backup is a representative copy of data. This copy can include important parts of a database such as
the control file, redo logs, and datafiles. That can be used to reconstruct that data. Backups can be divided
into
1. physical backups
2. logical backups
Physical backups::
Physical backups are backups of the physical files used in storing and recovering your database, such as
datafiles, control files, and archived redo logs. Physical backup is a copy of files storing database information
to some other location, whether on disk or some offline storage such as tape.
Logical backups::
Contain data that is exported using SQL commands and stored in a binary file. Oracle records both
committed and uncommitted changes in redo log buffers.
KEY DATA STRUCTURES FOR BACKUP AND RECOVERY ::
• Datafiles
• Control Files
• Online Redo Log Files
• Archived Redo Log Files
• Automatic Managed Undo
➢ DATAFILES The data of logical database structures, such as tables and indexes, is physically
located in the blocks of the datafiles allocated for a database.
➢ CONTROL FILES
Every Oracle database has a control file containing the operating system filenames of all other files
that constitute the database. such as the:
➢ ONLINE REDO LOG FILES
Every Oracle database contains a set of two or more online redo log files. Oracle uses the redo log to
record all changes made to the database. LGWR writes to online redo log files in a circular fashion.
➢ ARCHIVED REDO LOG FILES
Archived log files are redo logs that Oracle has filled with redo entries, rendered inactive, and copied
to one or more log archive destinations. Oracle can be run in either of two modes:
• ARCHIVELOG - Oracle archives the filled online redo log files before reusing them in the cycle.
• NOARCHIVELOG - Oracle does not archive the filled online redo log files before reusing them in the
cycle.
➢ Automatic Managed Undo
Every Oracle database must have a method of maintaining information that is used to roll back, or undo,
changes to the database. Oracle has used rollback segments to store undo.
Understanding Basic Backup strategy::
A backup strategy provides a safeguard against data loss:
• What types of failures can occur?
• What information should be backed up?
https://psc-msc.blogspot.com/
Page 43 of 48 Data Base Administration & Management M. Waseem
• Which backup method should be used?
• Should backups be made online or offline?
• How often should backups be made?
• How can dangerous backup techniques be avoided? ❖ WHAT TYPES OF FAILURES CAN
OCCUR?
Data loss can occur for various reasons.
• A statement failure is a logical failure in the handling statement in an Oracle program. A
process failure is a failure in a user process accessing Oracle,
• An instance failure is a problem that prevents an Oracle instance.
• A user or application error is a user mistake that results in the loss of data.
• A media failure is a physical problem that arises when Oracle tries to write or read a file that is
required to operate the database
❖ WHAT INFORMATION SHOULD BE BACKED UP?
When developing backup strategy, DBAs must decide what information they want to copy. The basic backup
types include:
• Online Database Backup
• Offline Database Backup
• Whole Database
• Tablespace
• Datafile
• Control File
• Archived Redo Log
• Configuration Files
In deciding what to back up, the basic principle is to prioritize data depending on its importance and the
degree to which it changes.
❖ WHICH BACKUP METHOD SHOULD BE USED?
Oracle provides users a choice of several basic methods for making backups. The methods include:
➢ Making Recovery Manager Backups
Recovery Manager (RMAN) that allows users to make an RMAN backup or image copy of their data.
You can make backups of archived logs by using the following methods:
• using the RMAN BACKUP command to creates a backup set as output.
• RMAN RESTORE command for recovery operations
• BACKUP AS COPY command is used to create an image copy of a file.
➢ Automatic Disk-Based Backup
The components that create different backup and recovery-related files have no knowledge of each
other or of the size of the file systems where they store their data. With Automatic Disk-Based
Backup and Recovery, you can create a flash recovery area, which automates management of
backuprelated files.
If you do not use a flash recovery area, you must manually manage disk space for your
backuprelated files and balance the use of space among the different types of files.
➢ Oracle Enterprise Manager
The Backup Wizards in Oracle Enterprise Manager is the GUI interface that enables backup and recovery via a
point-and-click method. Oracle Enterprise Manager (EM) supports Backup and Recovery features commonly
used by users.
➢ Using the Data Pump for Supplemental Backup Protection
Physical backups can be supplemented by using the Data Pump utility to make logical backups of
data. Data Pump writes data from a database into Oracle files in a proprietary format, which can then
be imported into a database using the Import utility.
➢ User Managed Backups
Operating system commands can be used such as the UNIX dd or tar command to make backups. Backup
operations can also be automated by writing scripts. The user can make a backup of the whole database at
once or back up individual tablespaces, datafiles, control files, or archived logs.
RECOVERY
Recovery restoring a physical backup and then updating it with the changes made to the database since the
last backup. When preparing a recovery strategy, it is critical to understand the answers to these questions:
https://psc-msc.blogspot.com/
Page 44 of 48 Data Base Administration & Management M. Waseem
• How does recovery work?
• What are the types of recovery?
• Which recovery method should be used?
Recovery refers to the various operations involved in restoring, rolling forward, and rolling back a backup.
WHAT ARE THE TYPES OF RECOVERY?
There are three basic types of recovery: instance recovery, crash recovery, and media recovery.
➢ An instance recovery:
Instance recovery is the process of applying records in the online redo log to data files to reconstruct
changes made after the most recent checkpoint.
A redo thread is a record of all of the changes generated by an instance. Instance recovery consists of two
steps. One is Roll forward, next is Roll backward. ➢ A crash recovery occurs;
• when either a single-instance database crashes or all instances of a multi-instance database
crash.
• In crash recovery, an instance must first open the database and then execute recovery
operations.
• In general, the first instance to open the database after a crash or SHUTDOWN ABORT
automatically performs crash recovery.
The important point is that in both crash and instance recovery Oracle applies the redo automatically: no user
intervention is required to supply redo logs.
➢ media recovery
Datafile Media Recovery
A media recovery is executed on the user's command, usually in response to media failure. In media
recovery, online or archived redo logs can be used to make a restored backup current or to update it to a
specific point in time. Media recovery can restore the whole database, a tablespace or a datafile and recover
them to a specified time.
The following scenarios necessitate media recovery:
• You restore a backup of a datafile.
• You restore a backup control file.
• A datafile is taken offline
• Block Media Recovery
Block media recovery is a technique for restoring and recovering individual data blocks while all database
files remain online and available. The interface to block media recovery is provided by RMAN.
The principal division in media recovery is between complete and incomplete recovery.
❖ Incomplete Recovery
You do not apply all of the redo records generated after the most recent backup. You usually perform
incomplete recovery of the whole database in the following situations:
• Media failure destroys some or all of the online redo logs.
• A user error causes data loss.
• You cannot perform complete recovery because an archived redo log is missing.
https://psc-msc.blogspot.com/
Page 45 of 48 Data Base Administration & Management M. Waseem
• You lose your current control file and must use a backup control file to open the database.
➢ Tablespace point-in-time recovery (TSPITR), which enables users to recover one or more
tablespaces to a point-in-time that is different from the rest of the database.
➢ Time-based recovery, recovers the data up to a specified point in time.
➢ Cancel-based recovery, which recovers until the CANCEL command is issued.
➢ Change-based recovery; change-based recovery recovers up to a specified SCN in the redo record.
Conclusion :
Backup and recovery of your Oracle database is important to protecting data from corruptions, hardware
failures, and data failures. While Oracle provides many features to protect your data, nothing can replace a
backup.
Chapter No:14
14. Tuning Rollback Segments, Latches, Rollback Segment Tuning Shared Servers, Types of Locks, Block
Efficiency, Storage hierarchy, Avoiding Dynamic allocation, Statistics, PCTFREE and PCTUSED, Monitoring
Index Usage.
➢ System Locks
Protect internal database structures and memory structures such as data files. Latches, mutexes, and
internal locks are entirely automatic. o Latches
Latches are simple, low-level system lock that coordinate multi-user access to shared data structures,
objects, and files. Latches protect shared memory resources from corruption when accessed by multiple
processes. Specifically, latches protect data structures from the following situations:
o Concurrent modification by multiple sessions
o Being read by one session while being modified by another session
o De-allocation of memory while being accessed
Typically, a single latch protects multiple objects in the SGA. For example, background processes, shared
pool, library cache. Latch spinning occurs when a process repeatedly requests a latch in a loop, whereas
latch sleeping occurs when a process releases the CPU before renewing the latch request. o
Mutexes
A mutual exclusion object (mutex) is a low-level mechanism that prevents an object in memory
from aging out or from being corrupted when accessed by concurrent processes. A mutex protects
a single object.
Mutexes provide several benefits: o A mutex can reduce the
possibility of contention. o A mutex consumes less
memory than a latch.
o When in shared mode, a mutex permits concurrent reference by multiple sessions.
Internal Locks
Internal locks are higher-level, more complex mechanisms than latches and mutexes and serve
various purposes. The database uses the following types of internal locks:
o Dictionary cache locks
https://psc-msc.blogspot.com/
Page 47 of 48 Data Base Administration & Management M. Waseem
These locks are of very short duration and are held on entries in dictionary caches while the
entries are being modified or used.
o File and log management locks
These locks protect various files. For example, control file . Data files are locked to ensure
that multiple instances mount a database in shared mode or that one instance mounts it in
exclusive mode.
o Tablespace and undo segment locks
These locks protect tablespaces and undo segments. For example, all instances accessing a
database must agree on whether a tablespace is online or offline. Undo segments are locked
so that only one database instance can write to a segment.
❖ Locks and Deadlocks
A deadlock is a situation in which two or more users are waiting for data locked by each other.
Deadlocks prevent some transactions from continuing to work.
Oracle Database automatically detects deadlocks and resolves them by rolling back one statement
involved in the deadlock, releasing one set of the conflicting row locks. The statement rolled back
belongs to the transaction that detects the deadlock. Usually, the signal transaction should be rolled
back explicitly, but it can retry the rolled-back statement after waiting.
https://psc-msc.blogspot.com/
Page 48 of 48 Data Base Administration & Management M. Waseem
• PCTFREE is a block storage parameter
used to specify how much space should
be left in a database block for future
updates. For example, for
PCTFREE=10, Oracle will keep on
adding new rows to a block until it is
90% full. This leaves 10% for future
updates (row expansion).
See the PCTFREE setting for a table:
SQL> SELECT pct_free FROM user_tables WHERE table_name = 'EMP';
PCT_FREE
----------
10
• PCTUSED is a block storage parameter
used to specify when Oracle should
consider a database block to be empty
enough to be added to the free list.
Oracle will only insert new rows in
blocks that is enqueued on the free list.
For example, if PCTUSED=40, Oracle
will not add new rows to the block
unless sufficient rows are deleted from
the block so that it falls below 40% used.
This parameter is ignored for objects
created in locally managed tablespaces
with Segment Space Management
(ASSM) specified as AUTO.
https://psc-msc.blogspot.com/