Docsity

Understanding Failures, Recovery, and Security in Database Servers, Slides of Database Management Systems (DBMS)

Partial preview of the text

Download Understanding Failures, Recovery, and Security in Database Servers and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

Reliability and Security in Database

Servers

Overview

  • Role of Database Management Systems in

creating reliable & secure systems.

  • Sources of failure.
  • Recovery from failure.
  • Distribution, consistency, and managing

databases.

  • DBMS security and access.

Sources of database Failures.

  • Database server computer crashes
    • Information may be corrupted as it still resides in memory & not HDD
  • Database server program crashes
    • Generally database program should never crash
  • Database client computer crashes
    • Results in locks and inactive transactions.
  • Network connection between client and server

fails

  • A transaction executes a rollback operation
    • A transaction has voluntarily cancelled itself therefore its updates must be removed from database.

Sources of database Failures

  • A transaction executes an illegal operation
    • Systems detects that transaction has violated a protocol
    • Server must abort and recover through a rollback.
  • Two or more transactions deadlock
    • System must abort one or more transactions to break dreadlock
  • One or more transactions induce errors into the database
    • Application program runs incorrectly and updates database introducing inconsistent or nonfactual information
  • Data on the disk is corrupted.
    • A hardware error causes some information on database to become unavailable.

Transaction logs

  • Records all activity within the server.
  • Log contains:
    • Unique Transaction ID for every transaction upon execution.
    • Name of action preformed
    • Object that is referenced by the action
    • The Effect of the action on the object.
  • Transaction log used to recreate state of database prior to failure
  • Log should be in remote locations

Recovery: Roll Forward

  • Steps:

Recover database in a correct state

Reapply all changes of the committed

transactions in same order they were originally committed.

Pre-requisite: System must have a redo log , which

maintains all committed changes in order.

Automatic recovery

  • Rollback is supported by most commercial DBMSs
  • Oracle has control file, containing redo logs, timestamps, names, locations of Databases.
  • When failure occurs DB admin must first copy the damaged file from best backup.
  • Recover command prompts for each redo log that must be run.
  • Oracle has both “hot” and “cold” backups. Hot backup when in use, cold backup - when database is unavailable to users

Security in Relational Database System.

  • Security always begins with the physical

security of the actual systems.

  • Database system must have support for 3

types of security:

  • Account security: validates users
  • Access security: protection of DB objects
  • Operating System security: Protects files

Protection of Database objects

  • Involves privileges, to read, updated, append,

create and drop.

  • grant insert on Customer to Jane;
  • grant select on Customer to public ;
  • grant all on Employee to Jane;
  • revoke delete on Employee from Jane;
  • grant update on Customer(street, city, state, zip) to Jane;

Protection of Database objects

  • create role Clerk not identified ;
  • grant all on Rental, PreviousRental to Clerk;
  • grant role Clerk to Dick;
  • create role FloorManager identified by

ImInCharge;

  • grant role Clerk to FloorManager;