Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version 0.0.1. Concept.

Slides:



Advertisements
Similar presentations
The Architecture of Oracle
Advertisements

Module 2: Database Architecture
Introduction to Oracle
Acknowledgments Byron Bush, Scott S. Hilpert and Lee, JeongKyu
Overview of Database Administrator (DBA) Tools
Oracle9i Database Administrator: Implementation and Administration 1 Chapter 2 Overview of Database Administrator (DBA) Tools.
Oracle Architecture. Instances and Databases (1/2)
INTRODUCTION TO ORACLE DATABASE ADMINISTRATION Lynnwood Brown System Managers LLC Introduction – Lecture 1 Copyright System Managers LLC 2007 all rights.
Basic Storage Concepts and Settings
1 - Oracle Server Architecture Overview
Harvard University Oracle Database Administration Session 2 System Level.
Oracle Architectural Components
Advanced Databases Basic Database Administration Guide to Oracle 10g 1.
A Guide to Oracle9i1 Introduction to Oracle9i Database Administration Chapter 11.
Backup and Recovery Part 1.
Oracle Architecture. Database instance When a database is started the current state of the database is given by the data files, a set of background (BG)
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
Oracle Database Administration
1 Copyright © 2009, Oracle. All rights reserved. Exploring the Oracle Database Architecture.
Oracle Database Workshop 1 Presented to IBRI CAS 27-Nov-2011 By Abdullah Alkalbani.
Oracle Documentation Oracle DBA Course (9i, 10g, 11g) Lecture 1: Oracle Architectural Components.
Database Administration TableSpace & Data File Management
CHAPTER 2 Implementing a Database. Introduction to Creating Databases After you’ve installed the Oracle software, the next logical step is to create a.
Chapter Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.
Oracle on Windows Server Introduction to Oracle10g on Microsoft Windows Server.
Basic Oracle Architecture
1Introduction Objectives 1-2 Course Objectives 1-3 Oracle Products 1-4 Relational Database Systems 1-5 How the Data Is Organized 1-6 Integrity Constraints.
CSE 781 – DATABASE MANAGEMENT SYSTEMS Introduction To Oracle 10g Rajika Tandon.
7202ICT Database Administration Lecture 7 Managing Database Storage Part 2 Orale Concept Manuel Chapter 3 & 4.
4 Copyright © 2006, Oracle. All rights reserved. Recovering from Noncritical Losses.
Database Systems Slide 1 Database Systems Lecture 5 Overview of Oracle Database Architecture - Concept Manual : Chapters 1,8 Lecturer : Dr Bela Stantic.
The protection of the DB against intentional or unintentional threats using computer-based or non- computer-based controls. Database Security – Part 2.
7202ICT – Database Administration
1 Oracle Architectural Components. 1-2 Objectives Listing the structures involved in connecting a user to an Oracle server Listing the stages in processing.
Copyright  Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
Oracle Tuning Ashok Kapur Hawkeye Technology, Inc.
Copyright © Oracle Corporation, All rights reserved. 1 Oracle Architectural Components.
An Oracle server:  Is a database management system that provides an open, comprehensive, integrated approach to information management.  Consists.
Anton TopurovIT-DB 23 April 2013 Introduction to Oracle2.
Database structure and space Management. Database Structure An ORACLE database has both a physical and logical structure. By separating physical and logical.
Introduction to Oracle. Oracle History 1979 Oracle Release client/server relational database 1989 Oracle Oracle 8 (object relational) 1999.
Database Storage Structures
Process Architecture Process Architecture - A portion of a program that can run independently of and concurrently with other portions of the program. Some.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
INTRODUCTION TO ORACLE DATABASE ADMINISTRATION Lynnwood Brown President System Managers LLC Introduction – Lecture 1 Copyright System Managers LLC 2003.
Oracle 10g Database Administrator: Implementation and Administration Chapter 5 Basic Storage Concepts and Settings.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
6 Copyright © 2007, Oracle. All rights reserved. Performing User-Managed Backup and Recovery.
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
8 Copyright © 2007, Oracle. All rights reserved. Using RMAN to Duplicate a Database.
3 Copyright © 2004, Oracle. All rights reserved. Creating an Oracle Database.
7 Copyright © Oracle Corporation, All rights reserved. Instance and Media Recovery Structures.
Physical Database Structure .
3 Copyright © 2004, Oracle. All rights reserved. Database Architecture Comparison.
1 Copyright © 2006, Oracle. All rights reserved. Introduction.
I NTRODUCTION OF W EEK 2  Assignment Discussion  Due this week:  1-1 (Exam Proctor): everyone including in TLC  1-2 (SQL Review): review SQL  Review.
What is Oracle ? Oracle is a relational database management system. It is a management system which uses the relational data model. In the relational data.
6 Copyright © 2005, Oracle. All rights reserved. Managing Database Storage Structures.
14 Copyright © 2007, Oracle. All rights reserved. Backup and Recovery Concepts.
8 Copyright © Oracle Corporation, All rights reserved. Managing Tablespaces and Data files.
5 Copyright © 2005, Oracle. All rights reserved. Managing the Oracle Instance.
Oracle Database Architectural Components
Initialization Parameters
Oracle 10g Database Administrator: Implementation and Administration
Physical Database Structure .
Introduction To Oracle 10g
Index Index.
ISYS366, Oracle Disk Internals
Database administration
Presentation transcript:

Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept

Slide Titel Page Footer Part I Oracle database architecture

Slide Titel Page Footer Overview Chapter 1 Chapter 2 Chapter 3 Oracle Instance Logical structure of an Oracle database Physical structure of an Oracle database

Slide Titel Page Footer Chapter 1 The Oracle Instance

Logical database structure: The Oracle Instance Page Footer An Oracle Instance consists of: Memory Structures Configurable chunks of internal server memory used to optimize database actions like storing data blocks and database language commands (SQL). The Memory structures together form the Shared Global Area (SGA)‏ Background Processes Generic processes to perform certain database functions like monitoring processes and writing changed data back to datafiles.

Oracle Logical Database Structure Page Footer Shared Pool Database Buffer Cache Large Pool Java Pool Redo Log Buffer Library Cache Library Cache Library Cache Data Dictionary Cache Data Dictionary Cache Data Dictionary Cache Library Cache Data Dictionary Cache Data Dictionary Cache Data Dictionary Cache PMONSMONDBWRLGWRCKPTOthers Shared Global Area Oracle Instance

Logical database structure: Shared Global Area (1 of 2)‏ Page Footer The Shared Global Area (SGA) consists of: Library Cache Structure used to store SQL commands for reuse Data Dictionary Cache Structure used to store Meta information (information about the database objects like table-columns and object-privileges Database Buffer Cache Structure used to store data read from data files. If data is changed, it is always done in the Database Buffer Cache (never direct on disk)‏ Redo Log Buffer Buffer used to cache information about database transaction. From this buffer the redo data is written to the Online Redo Log Files Sharted Pool

Logical database structure: Shared Global Area (2 of 2)‏ Page Footer The Shared Global Area (SGA) consists of: Large Pool The Large Pool is an optional Memory structure which is used to store large memory allocations. Especially when RMAN (Backup and Recovery Manager) is used, it is recommended to configure the Large Pool Java Pool The Java Pool is only used to execute Java Stored Procedures. If no Java is used in the database, the size of the Java Pool can set up 0 (default)‏

Logical database structure: Background processes Page Footer Oracle Background Processes: Execute general database task Are automatically started when database is started Mandatory and optional background processes serveral instances of some background processes can start (heavy use) Background processes are visible in V$BGPROCESS

Logical database structure: Shared Global Area (1 of 2)‏ Page Footer The Shared Global Area (SGA) consists of: Library Cache Structure used to store SQL commands for reuse Data Dictionary Cache Structure used to store Meta information (information about the database objects like table-columns and object-privileges Database Buffer Cache Structure used to store data read from data files. If data is changed, it is always done in the Database Buffer Cache (never direct on disk)‏ Redo Log Buffer Buffer used to cache information about database transaction. From this buffer the redo data is written to the Online Redo Log Files

Oracle Instance: Background Processes Page Footer The Shared Global Area (SGA) consists of: Large Pool The Large Pool is an optional Memory structure which is used to store large memory allocations. Especially when RMAN (Backup and Recovery Manager) is used, it is recommended to configure the Large Pool Java Pool The Java Pool is only used to execute Java Stored Procedures. If no Java is used in the database, the size of the Java Pool can set up 0 (default)‏

Logical database structure: Background Processes (1/2) Page Footer Oracle basic Background processes: SMON PMON DBWR LGWR CKPT ARCH J000 : System Monitor : Process Monitor : Database Writer : Log Writer : Checkpoint Process : Archiver Process : Job Queue Process

Logical database structure: Program Global Area (PGA) Page Footer Oracle basic Background processes: SMON PMON DBWR LGWR CKPT ARCH J000 : System Monitor : Process Monitor : Database Writer : Log Writer : Checkpoint Process : Archiver Process : Job Queue Process

Slide Titel Page Footer Chapter 2 Logical structure of an Oracle database

Logical database structure: Overview Page Footer Logical database structure: Tablespace Segment Extent Data Block : Container for tables, indexes, Undo or Temporary structures : The type of the segment (table, index, undo or temporary segment) : Unit of allocation of storage for specific segment : Smallest unit in which data is stored

Logical database structure: Overview Page Footer Oracle Tablespace: Logical container for segments (e.g. table, index, temporary) An Oracle database have several mandatory tablespaces (system, sysaux, undo, temporary) Default storage clause for tables and indexes can be set on tablespace level Tablespace can be permanent (datafiles) or temporary (tempfiles) Tablespace can be locally managed or dictionary managed Tablespace can be set offline (data in tablespace is not accessible) Storage quotum for users or applications can be set on tablespace

Logical database structure: Mandatory tablespaces Page Footer An Oracle database has several mandatory tablespace: System: Sysaux: Undo: Temp: contains the data dictionary and store temporary segments when no default temporary tablespace is defined is used to store information for specific database functions like OLAP, RMAN and Ultra Search the Undo tablespace is used for storing Undo information (changes made in transactions). No other objects can be created in the Undo tablespace. Tablespace used to execute sorts which are too big to do in memory by using temporary segments

Logical database structure: Tablespaces Page Footer Free space management in an Oracle tablespace: Data Dictionary Managed tablespaces (DMT) Free space management is done in the system tablespace Default management mode in Oracle 8i and previous versions Locally Managed Tablespaces (LMT) Free space management is done in the tablespace itself A bitmap structure is used to map and identifiy free blocks in the tablespace Default management mode in Oracle 9i and onwards Combination of DMT and LMT tablespace possible in database as long as system tablespace is dictionary managed.

Logical database structure: BigFile Tablespaces Page Footer BigFile Tablespaces: Data Dictionary Managed tablespaces (DMT) Free space management is done in the system tablespace Default management mode in Oracle 8i and previous versions Locally Managed Tablespaces (LMT) Free space management is done in the tablespace itself A bitmap structure is used to map and identifiy free blocks in the tablespace Default management mode in Oracle 9i and onwards

Logical database structure: Segments Page Footer Oracle Segments: Oracle has four types of segments: Table, Index, Undo and Temporary Logical container for extents (e.g. table, index or temporary) All extents within a segment are used to store similar object (e.g. Table) DBA_SEGMENTS records information about segments.

Logical database structure: Extents Page Footer Segment: Logical container for segments (e.g. table, index, temporary)

Logical database structure: Blocks Page Footer Blocks: A blocks is the smallest unit used in storage a Block has a header in which meta-data is stored Default block size is configured by parameter DB_BLOCK_SIZE if space in block is insufficient Row Migrating and Row Chaining will occur

Logical database structure: Segments, extents and blocks Page Footer Relationship among segments, extents and blocks: 8k Data blocks Extent 192k Extent 64k Segment 256k

Slide Titel Page Footer Chapter 3 Physical structure of an Oracle database

Physical database structure: Overview Page Footer The physical structure of an Oracle database comprises of: Data files Temp files Online redo log files Control files Parameter or initialization file Password file

Physical database structure: Data files Page Footer Oracle Data files: Permanent tablespaces using data files for storage Every tablespace has at least 1 data file A data file can be configured to grow automatically (autoextent) A data file can be set Online or Offline The view DBA_DATA_FILES contains information about the data files

Physical database structure: Temp files Page Footer Oracle Temp files: Temporary tablespaces using temp files for storage Temp tablespaces are mainly used for big sorting operations Creation of temp files is fast. Only header and last block are written Temp files are not recorded in the control file It is not necesarry to backup temp files (with RMAN)

Physical database structure: Redo Log Files Page Footer Oracle Redo Log files: Redo log files are transaction journals At least two redo log groups must be defined in an Oracle database Every redo log group must contain at lease 1 member It is recommended to multiplex Redo log members A filled up redo log file is archived when database is running is archive log mode Redo log groups and members information is recorded in the control file

Physical database structure: Control Files Page Footer Oracle Control files: Control file contains physical information about the Oracle databas Control file is read in nomount-phase of database startup Control file can be dumped with SQL-command: alter database backup controlfile to trace Control files must be multiplexed to ensure availability during operation Locations of control files are included in the parameter file

Physical database structure: Password File Page Footer Oracle Password file: Used to authenticate sysdba & sysoper users when database is not running Is created with Oracle utility $ORACLE_HOME/bin/orapwd Can be shared among databases on same server or can be dedicated to single database on server (recommended) Parameter REMOTE_LOGIN_PASSWORDFILE is used to configure use The view V$PWFILE_USERS gives an overview of users recorded in file

Physical database structure: Oracle Managed Files Page Footer Oracle Managed Files (OMF): Used to authenticate sysdba & sysoper users when database is not running Is created with Oracle utility $ORACLE_HOME/bin/orapwd Can be shared among databases on same server or can be dedicated to single database on server (recommended) Parameter REMOTE_LOGIN_PASSWORDFILE is used to configure use The view V$PWFILE_USERS gives an overview of users recorded in file

Slide Titel Page Footer Chapter X Creating an Oracle database

Creating an Oracle Database: Parameter file Page Footer Oracle Managed Files (OMF): Used to authenticate sysdba & sysoper users when database is not running Is created with Oracle utility $ORACLE_HOME/bin/orapwd Can be shared among databases on same server or can be dedicated to single database on server (recommended) Parameter REMOTE_LOGIN_PASSWORDFILE is used to configure use The view V$PWFILE_USERS gives an overview of users recorded in file

Creating an Oracle Database: Basic initialization parameters Page Footer Oracle Managed Files (OMF): Used to authenticate sysdba & sysoper users when database is not running Is created with Oracle utility $ORACLE_HOME/bin/orapwd Can be shared among databases on same server or can be dedicated to single database on server (recommended) Parameter REMOTE_LOGIN_PASSWORDFILE is used to configure use The view V$PWFILE_USERS gives an overview of users recorded in file

Creating an Oracle Database: Creating an Oracle Database Page Footer Oracle Managed Files (OMF): Used to authenticate sysdba & sysoper users when database is not running Is created with Oracle utility $ORACLE_HOME/bin/orapwd Can be shared among databases on same server or can be dedicated to single database on server (recommended) Parameter REMOTE_LOGIN_PASSWORDFILE is used to configure use The view V$PWFILE_USERS gives an overview of users recorded in file

Creating an Oracle Database: Manually creating an Oracle Database Page Footer Oracle Managed Files (OMF): Used to authenticate sysdba & sysoper users when database is not running Is created with Oracle utility $ORACLE_HOME/bin/orapwd Can be shared among databases on same server or can be dedicated to single database on server (recommended) Parameter REMOTE_LOGIN_PASSWORDFILE is used to configure use The view V$PWFILE_USERS gives an overview of users recorded in file

Creating an Oracle Database: Creating an Oracle Database using DBCA Page Footer Oracle Managed Files (OMF): Used to authenticate sysdba & sysoper users when database is not running Is created with Oracle utility $ORACLE_HOME/bin/orapwd Can be shared among databases on same server or can be dedicated to single database on server (recommended) Parameter REMOTE_LOGIN_PASSWORDFILE is used to configure use The view V$PWFILE_USERS gives an overview of users recorded in file

Starting en Stopping Oracle: Startup phases Page Footer Nomount Parameter file (PFILE or SPFILE) is read SGA (memory) is allocated and the background processes are started Mount Control file is read Open Data files and temp files are opened Database become available for users Startup nomount Startup Startup mount

Starting en Stopping Oracle: Start Oracle with alternative pfile Page Footer Parameter file: The use of a SPFILE is recommended over the use of the PFILE

Starting en Stopping Oracle: PFILE and SPFILE Page Footer Parameter file: The use of a SPFILE is recommended over the use of the PFILE

Oracle user management: Oracle database users (overview) Page Footer Syntax for creating a database user: CREATE USER username IDENTIFIED BY password DEFAULT TABLESPACE tablespace TEMPORARY TABLESPACE tablespace PROFILE profile ; Username is a 30-length string and should not start with digit TEMPORARY TABLESPACE is obsolete (In 10g default temporary tablespace) Resource requirements can set in the profile (like number of invalid logins) Privileges and rights cannot be assigned in CREATE-command

Oracle user management: Creating database users Page Footer Syntax for creating a database user: CREATE USER username IDENTIFIED BY password DEFAULT TABLESPACE tablespace TEMPORARY TABLESPACE tablespace PROFILE profile ; Username is a 30-length string and should not start with digit TEMPORARY TABLESPACE is obsolete (In 10g default temporary tablespace) Resource requirements can set in the profile (like number of invalid logins) Privileges and rights cannot be assigned in CREATE-command

Oracle user management: Profiles Page Footer Syntax for creating a database user: CREATE USER username IDENTIFIED BY password DEFAULT TABLESPACE tablespace TEMPORARY TABLESPACE tablespace PROFILE profile ; Username is a 30-length string and should not start with digit TEMPORARY TABLESPACE is obsolete (In 10g default temporary tablespace) Resource requirements can set in the profile (like number of invalid logins) Privileges and rights cannot be assigned in CREATE-command

Oracle user management: Privileges Page Footer Syntax for creating a database user: CREATE USER username IDENTIFIED BY password DEFAULT TABLESPACE tablespace TEMPORARY TABLESPACE tablespace PROFILE profile ; Username is a 30-length string and should not start with digit TEMPORARY TABLESPACE is obsolete (In 10g default temporary tablespace) Resource requirements can set in the profile (like number of invalid logins) Privileges and rights cannot be assigned in CREATE-command

Oracle user management: Roles Page Footer Syntax for creating a database user: CREATE USER username IDENTIFIED BY password DEFAULT TABLESPACE tablespace TEMPORARY TABLESPACE tablespace PROFILE profile ; Username is a 30-length string and should not start with digit TEMPORARY TABLESPACE is obsolete (In 10g default temporary tablespace) Resource requirements can set in the profile (like number of invalid logins) Privileges and rights cannot be assigned in CREATE-command