Harvard University Oracle Database Administration Session 1 CSCI E-256 Introduction The Role of the DBA
Dec 19, 2015
Harvard University
Oracle Database Administration
Session 1CSCI E-256 Introduction
The Role of the DBA
Harvard University
Introduction
What is Database ? What is Database Administration ? What is an Oracle DBA ? What do they do ? How do they do it ?
Harvard University
The Database Most people view a database 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 a table These tables can then be related to each
other, using relationships The database enforces these relationships
Harvard University
Types of Database Online Transaction Processing (OLTP) –
Amazon.com Decision Support (DSS) – OLTP database
used for reports Operational Data Store (ODS) – OLTP
database plus summary data Data Warehouse – special set of structures,
star schema
Harvard University
OLTP
Online Transaction Processing Data dependency Model Many-to-many relationships Many-to-one relationships If we have more detailed data, it must be
better Normalization
Harvard University
Operational Data Store (ODS)
An ODS has been defined as – Subject oriented– Integrated– Volatile– Current valued– Comprised of only corporate detailed data
Harvard University
Data Warehouse
A Data Warehouse is a collection of integrated, subject-oriented databases designed to support the DSS (decision support) function, where each unit of data is relevant for some moment in time
W. H. Inmon
The data should be– Well defined – Consistent– Non-volatile (read-only)
Harvard University
Data Warehouse Any information, from anywhere, of anytime,
from internal and external data sources This includes operational, historical and
legacy data It can also include data from Internet service
providers and subscription databases It must include Metadata ( data about data)
Harvard University
Applications
Most are Web based.
SQL (sequel) is a language used to interface with various rdbms environments
Embedded SQL (Java, C++, etc)
Harvard University
The Oracle DBA What is the Role of the DBA
– Planning, design and development – Ongoing maintenance– Data Administrator– Security
Newer Issues– Uptime– Backups with shorter windows– Larger environments– More visible
Harvard University
The Oracle DBA Roles
The Systems or Operational DBA The Architect The Applications DBA The Data DBA The Internet DBA – Webmaster
Harvard University
The DBA Tasks
Software Installation Software Additions Software Upgrades Database Creation Database Standards Performance Security
Harvard University
DBA Tasks
Software Installation– Setup the initial environment
Software Additions Software Upgrades
– What are the current releases
Harvard University
DBA Tasks
Log SR’s (Service Request) Applying Patches System Tuning
– System level– Database level– Application level
Harvard University
Database Issues Move/Copy a database Development Issues Database Standards Security policies
DBA Tasks
Harvard University
DBA Tasks
Education of others Reading, magazines… Third Party Software Monitoring Tools Automation
Harvard University
heir Time
Load Data 6%
MaintainSoftware 6%
Install 6% Create and Configure 12%
Manage DatabaseSystem 55%
How DBAs spend their time
Harvard University
The Past and the Present Environment
Limited scalability, no resource sharing Must be configured for peak loads, when
implemented Single points of failure Slow to adjust to the new needs of the
business Islands of computation
Harvard University
Storage Grid Database Grid
Application Server
Grid
Grid
Control
Grid Computing
Harvard University
Grid Vision Computing as a utility
– A network of clients and service providers– Cloud Computing
Virtualization– Nothing more virtual than a utility– Massive potential
Client-side: Simplicity– Request computation or information and receive it
Server-side: Sophistication– Availability, reliability, security– Capacity on demand, load balancing
Harvard University
The E-256 Course ….
System level issues Installation of the RDBMS software Adding more software options Upgrading to a new level of the RDBMS and
the issues related to this Applying patches to the RDBMS
Harvard University
Create a database “instance” Database Security, create users, roles … Create database objects, tables, indexes, etc. Examine the storage parameters the
database objects above Oracle utilities, export, import, etc Database Networking Issues
The E-256 Course ….
Harvard University
How to manage the database using database “views”
How to “backup” the database How to “recover” the database Performance management How to get help from Oracle Oracle Enterprise Manager
The E-256 Course ….
Harvard University
The Approach
Where does the database fit in the big picture The technical architecture of an application Frameworks (examples)
– Management – Performance– Backup/Recovery– Security
Harvard University
The Approach
Knowledge Work Research Methods Scenario Thinking Project Management An Intentional Methodology
Harvard University
The Instance
What is an Oracle database A database instance (server) is a set of
memory structures and background processes, that access a set of database files
The memory structure is the SGA (System Global Area)
Harvard University
The computer system– The operating system– Memory – Storage– Processors– Daemons
printers Networks
– Files
The Physical World
Harvard University
The Logical World A Tablespace is a logical division of a
database. Each tablespace is made up of one or more
files, called datafiles. A datafile belongs to one tablespace A table is a logical structure, inside a
tablespace
Harvard University
Oracle Flexible Architecture (OFA)
/u01 - Oracle Base and Oracle Home /u01/app/oracle Oracle Base directory /u02 - The Application Home /u03 - General Usage /u04 - Oracle Datafiles
Harvard University
Oracle Flexible Architecture (OFA)
/u05 thru /u09 /u04/oradata/<SID> Example: /u04/oradata/test SID is the database identifier
Harvard University
Oracle Directory Structure
bdum p udum p pfile cdum p arch create
<SID_NAM E>
adm in
netw ork dbs bin
$ORACLE_HOME
product
/u01/app/oracle ($ORACLE_BASE)
Harvard University
Database Structures
Three Types– Internal to the Database
– Memory Based (SGA and Processes)
– External to the Database
Harvard University
Internal Database Structure Examples Table
– The only way to store data in a database
Indexes– It is a partial copy of a table, used to help speed
up accessing the data in the table
Views– A method of looking at “some” of the data in a
table or group of tables
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, would be procedures 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
Users Schemas Database Links Undo Segments (rollback segments)
Internal Database Structures
Harvard University
Memory Structures
– System Global Area (SGA) Part of the System Memory
– Unix level processes
Harvard University
PMON SMON
DBW0 LGWR
Library Cache Dictionary
Cache
ARCH
DatafilesRedo Log Files Archived Redo
Log Files
Data Cache Redo Log BuffersShared Pool
1
23 4
Harvard University
The 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
The System
Oracle data blocks are multiples of the Operating System blocks
The computer memory uses the same block sizes as the disk storage
Space allocation
Harvard University
Security
Users and Roles Security Patching Advanced Security Option
– Sql*net encryption
Application level security– Sql injection
Harvard University
The Learning Environment
Distance Option Blog Method TA session Online TA session Elluminate Website Books
Harvard University
Website
Website at http://courses.fas.harvard.edu/ext/22750
www.elluminate.com
Harvard University
How do you know you got it Understand the Concepts Be able to create a maintainable database Walk-away with a framework approach Understand where that database fits within the
technology stack The Future
– Security– Auditing– High Availability– Semantic Web
Harvard University
Security Framework
Confidentiality
Availability
Integrity
Harvard University
Environment Boundaries
Database
System Layer
Subnet layer
Network Layer
Domain Edge
Database Layer
Network Layer
Global Network
Harvard University
Strategic and Tactical
Prevent
Remediate
Monitor
React
detect
Policy
Complience
Harvard University
Overall Strategic and TacticalPrevent
Remediate
Monitor
React
detect
Policy
Complience
Prevent
Remediate
Monitor
React
detect
Policy
Complience
System Level
Database Level