Harvard University Oracle Database Administration Session 2 System Level.

Slides:



Advertisements
Similar presentations
The Architecture of Oracle
Advertisements

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)
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
INTRODUCTION TO ORACLE DATABASE ADMINISTRATION Lynnwood Brown System Managers LLC Introduction – Lecture 1 Copyright System Managers LLC 2007 all rights.
Harvard University Oracle Database Administration Session 3 Installation.
Oracle Database Administration
Oracle Database Administration
1 - Oracle Server Architecture Overview
Oracle Architectural Components
Harvard University Oracle Database Administration Session 5 Data Storage.
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.
Introduction History The principles of the relational model were first outlined by Dr. E.F Codd in a June 1970 paper is called “A Relational Model of Data.
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)
INTRODUCTION TO ORACLE. 2 Before Databases  Information was kept in files:  Each field describes one piece of information about student  Fields are.
M ODULE 1 DBMS S TRATEGY AND ORACLE A RCHITECTURE Database Administration Techniques and Practices 1 ITEC 450 Fall 2012.
Oracle Architecture Client Computer Application Server Oracle Database Lan Or Internet Lan Or Internet Client Server Environment Application By Java or.Net.
1 Copyright © 2005, Oracle. All rights reserved. Introduction.
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.
Oracle Database Architecture An Oracle server: –Is a database management system that provides an open, comprehensive, integrated approach to information.
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
By Lecturer / Aisha Dawood 1.  You can control the number of dispatcher processes in the instance. Unlike the number of shared servers, the number of.
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.
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.
Oracle9i Performance Tuning Chapter 12 Tuning Tools.
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.
Outline Introduction to Oracle Memory Structures SGA, PGA, SCA The Specifics of the System Global Area (SGA) Structures Overview of Program Global Areas.
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.
Chapter 1Oracle9i DBA II: Backup/Recovery and Network Administration 1 Chapter 1 Backup and Recovery Overview MSCD642 Backup and Recovery.
Oracle Architecture - Structure. Oracle Architecture - Structure The Oracle Server architecture 1. Structures are well-defined objects that store the.
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.
Oracle Database Architectural Components
Chapter 21 SGA Architecture and Wait Event Summarized & Presented by Yeon JongHeum IDS Lab., Seoul National University.
Introduction to Oracle
Physical Database Structure .
Introduction To Oracle 10g
Oracle Memory Internals
Oracle Architectural Components
Index Index.
ISYS366, Oracle Disk Internals
Database administration
Presentation transcript:

Harvard University Oracle Database Administration Session 2 System Level

Harvard University The Database  A database can be viewed as the collection of data from a business  An application presents this data to the users in a manageable way.  The application can insert, delete or update the data.  The database structures hold and manipulate this data

Harvard University The Database  The Data is stored in Relational Tables, defined by Columns  Data is stored as Rows in the table  These tables can then be related to each other using relationships  The database enforces these relationships

Harvard University The Instance  A database instance (server) is a set of memory structures and background processes  The memory structures together makeup the System Global Area( SGA)

Harvard University The Instance  This set of memory structures and background processes are used to provide access to the data  There can be multiple instances,or sets of memory structures,for one database eg. Oracle Real Application Clusters (RAC)  A parameter file, the init.ora, is used to configure the instance  The parameters held in this file, determine the size and composition of the instance

Harvard University  This file is read during the instance startup  When some changes are made to the init.ora, they will not take effect until the next time the database is started.  Pfile – Parameter File  The parameter file is used to set the name of the instance  This is the SID (system identification) name  Spfile – Server Parameter File The Instance

Harvard University Database Structures  Three Types – Internal to the Database – Memory Based (SGA and Processes) – External to the Database

Harvard University Internal Database Structures  Tables – Tables are the storage mechanism for data inside the oracle database. There are made up of columns. – Each column has a datatype and a length  Indexes – It is a partial copy of the data in a table – They are used to quickly find data in the database – An index is created when a primary key is created.

Harvard University Internal Database Structures  Views – A method of looking at “some” of the data in a table or in groups of tables – Views are masks over a table or group of tables – Views have no indexes – They can be used to enforce security

Harvard University  Procedures – Blocks of PL/SQL statements, called by applications – They do not return a value to the calling program  Functions – Like a procedure, but can return a value to the calling program. Internal Database Structures

Harvard University  Packages – These hold procedures and functions in logical groups – A package can have PUBLIC and PRIVATE elements – Public elements would be for a USERS usage – Private may be called by other procedures in the package Internal Database Structures

Harvard University  Triggers – Procedures that execute when a specific event occurs – Used to augment referential integrity, enforce additional integrity – Statement triggers – Row triggers Internal Database Structures

Harvard University  Sequences – Sequential lists of unique numbers – Used as primary Keys  Synonyms – Synonyms are pointers to tables, views, procedures functions. – To fully qualify an object we need the machine hostname, the instance name, the objects owner and the object’s name – Synonyms help to simplify the interface for the user Internal Database Structures

Harvard University Internal Database Structures  Users – Users are not physical structures in database. – All objects are owned by a user – All users are associated to a specific default tablespace – Users can be ‘granted’ access to the objects of other users and ‘granted’ the privilege to execute a specific function or procedure

Harvard University Internal Database Structures  Schemas – They are related to users. – A set of tables and other database objects are created as a schema and are owned by a user  Database Links – Database Links are used to reference data outside the database – Database links can be public or private  Rollback Segments (Undo Segments)

Harvard University Memory Structures – System Global Area (SGA)  Part of the System Memory – Unix level processes

Harvard University

System Global Area (SGA)  The Data Buffer Cache is the cache area where data blocks are read into from the data segments, such as tables, indexes, etc.  Its size is controlled by the db_cache_size parameter in the init.ora file.  This space is managed by a least recently used (LRU) algorithm

Harvard University System Global Area  The Data Buffer Cache is very important in database tuning  If data is not in this area, it must be read from the datafile, so we have disk I/O.

Harvard University System Global Area  The Shared Pool stores the data dictionary cache and the library cache  Data Dictionary Cache stores data from the data dictionary tables  These tables store information about the database objects  It is managed by a Least Recently Used (LRU) algorithm

Harvard University System Global Area  The Library Cache holds information about statements that have run against the database  It allows the sharing of commonly used SQL statements  It is also managed by an LRU algorithm  Their sizes are set by the shared_pool_size parameter

Harvard University System Global Area  Automatic SGA sizing  Automatic PGA Sizing

Harvard University System Global Area  The Redo log buffer holds redo data on a transaction, before it gets written to the redo log  Its size(in bytes) is controlled by the log_buffer parameter

Harvard University SGA

Harvard University Process Architecture  A process is a mechanism in an operating system that can run a series of steps.  A process has its own private memory area  An Oracle database server has – User processes – Oracle processes

Harvard University Background Processes  PMON cleans up failed user processes. It wake up periodically to check if it is needed.  SMON checks to see if a database needs recovery, on startup. It also coalesces free space in tablespaces.

Harvard University  DBWR manages the data block buffer cache and the dictionary cache. It handles the batch writes of changed blocks from the SGA to the datafiles. There can be multiple DBWR processes. Background Processes

Harvard University Background Processes  LGWR manages the writing of the contents of the redo log buffer, to the online redo log files. It writes the log entries in batches. If the redo logs are mirrored sets, then both are written to simultaneously. There can be multiple LGWR processes

Harvard University Background Processes  ARCH performs the archiving of the redo log files. LGWR writes to the redo log files in a round robin fashion. When all are full, it over-writes the first one. However, if the database is in archive mode, Oracle takes a copy of this file and stores it on disk.

Harvard University

The Physical World  The computer system – The operating system – Memory Modules – Storage Disks – Processors – Daemons  printers  Networks – Files

Harvard University System  Information on a computer is stored in bytes  Bytes are grouped into Blocks  The Operating System usually has 512 bytes in a block  1K = 1024 bytes  Oracle data is also stored in bytes  Oracle data blocks are in 2k,4k,8k,16, or 32k bytes

Harvard University System  Oracle data blocks are multiples of the Operating System blocks  The computer memory uses the same block sizes as the disk storage

Harvard University System  The O/S software is Solaris 9 or 10  It is the layer between the computer hardware and the Oracle Software  It manages the computer system – writes to disk – reads from disk – controls printing – controls network connections

Harvard University The OFA Standard

Harvard University Oracle Directory Structure

Harvard University Files  Datafiles contain the actual data stored in a database  The Parameter file contain the initialization parameters used to create the memory area used to manage the database  Control files map the physical files of the database to the logical tablespaces and online redo logs. It helps ensure the database remains consistent

Harvard University Files  Redo files contain enough information to allow Oracle to reconstruct or back out a transaction, if the database should shutdown before these changes have been written to the disk  INSERT, UPDATE, DELETE, CREATE, ALTER, or DROP operations generate redo information  Alert and Trace files contain information on the health of the database and provides warnings when problems occur

Harvard University Files  Backup files contain copies of the database files and can be used to recover the database.  The standard convention for file extensions or endings to file names are – data files.dbf – control files.ctl – redo log files.dbf (some use.rdo) – parameter file.ora

Harvard University Datafiles and Tablespaces

Harvard University Oracle’s “Logical” World  A tablespace can belong to only one database  There must be at least two tablespaces, SYSTEM and SYSAUX to create a database  Other include USERS, UNDO, TOOLS, etc.

Harvard University Undo segments  Undo segments hold the before image of the data in a transaction  As a program begins to change the data in the database, Oracle changes the physical blocks that contain that information.  Before changing the data block buffers in the SGA or writing to disk, Oracle takes a copy of this data in an undo segment

Harvard University Tablespace Examples – System holds all objects owned by the sys user – SYSAUX is an auxiliary tablespace to the SYSTEM tablespace – Rollback (RBS) (undo) is used to store the rollback segments – Temp (Temporary) is used for sort functions.

Harvard University Tablespace Examples – Users is the default space for user accounts – Tools should be the default space for the system user, after database creation. – Data holds the ‘real’ application data – Index holds the index data for the application

Harvard University Reading  10g and 11g Concepts Guide – Part 2  Chapter 3 Tablespaces,datafiles and control files  Chapter 5 Schema Objects  Chapter 7 The Data Dictionary  The two installation guides – A quick review of each. Look them over to identify an overall process