study guide advanced database technology...oct 07, 2013  · beginning oracle database 11g...

61
Study Guide Advanced Database Technology By Dale J. Schroeder

Upload: others

Post on 10-Mar-2020

16 views

Category:

Documents


0 download

TRANSCRIPT

Study Guide

Advanced DatabaseTechnologyBy

Dale J. Schroeder

About the Author

Dale Schroeder works as a senior software architect in SouthernCalifornia. He holds a Bachelor of Science degree in ComputerScience and Computer Information Systems from CaliforniaLutheran University. He currently works in the field of radio fre-quency (RF) collection and analysis while developing large-scale,web-enabled, remote-controlled analysis software packages. He’swritten software that performs nondestructive ultrasonic testing forthe NASA Space Shuttle and commercial aircraft. He’s taught train-ing seminars and courses for clients at NASA, Boeing, Rockwell,and DuPont Imaging Systems, and he’s written large-databaseapplication software for the publishing and insurance industries.He’s also written installation and utility software for EarthLinkNetwork, and software user interfaces and drivers for a digitalmicroscope to aid medical-research physicians.

Copyright © 2013 by Penn Foster, Inc.

All rights reserved. No part of the material protected by this copyright may bereproduced or utilized in any form or by any means, electronic or mechanical,including photocopying, recording, or by any information storage and retrieval system, without permission in writing from the copyright owner.

Requests for permission to make copies of any part of the work should be mailed to Copyright Permissions, Penn Foster, 925 Oak Street, Scranton,Pennsylvania 18515.

Printed in the United States of America

All terms mentioned in this text that are known to be trademarks or service marks have been appropriately capitalized. Use of a term in this text should not beregarded as affecting the validity of any trademark or service mark.

INSTRUCTIONS TO STUDENTS 1

LESSON ASSIGNMENTS 5

LESSON 1: DATABASE CONCEPTS 7

PROJECT—LESSON 1 15

LESSON 2: DATABASE IMPLEMENTATION 19

PROJECT—LESSON 2 29

LESSON 3: DATABASE SUPPORT 31

PROJECT—LESSON 3 41

LESSON 4: DATABASE TUNING 43

PROJECT—LESSON 4 47

FINAL GRADED PROJECT 49

iii

Co

nt

en

ts

Co

nt

en

ts

1

Ins

tru

ctio

ns

Ins

tru

ctio

ns

YOUR COURSE

This course will give you the necessary background in rela-tional database theory and Oracle Database concepts. It willshow you how to implement an Oracle Database correctlyand give you significant insight into the routine of a databaseadministrator. Lastly, the latter parts of the book will showyou the fine art of performance tuning.

Each chapter contains a section of exercises designed to helpyou apply the lessons of that chapter. The sections alsoinclude a list of reference works that contain more informa-tion on the topic of the chapter.

OBJECTIVES

When you complete this course, you’ll be able to

n Explain what makes a relational database relational

n Explain the necessity of knowing the Structured QueryLanguage (SQL)

n Describe how all the interconnected parts of the OracleDatabase work and how they relate

n Discuss what you need to do to plan and what influencesyou, as a database administrator, have under your control

n Install the software that precedes the creation of adatabase

n Create a database, both through the application’s helpand manually

n Tune your database based on queries and mechanismsthat can be used to improve performance

n Input into and extract data out of a database

n Explain what the database contains: tables, data files,and log files

n Explain how to monitor the database and prevent possibleproblems

Instructions to Students2

n Complete real-life problems from detection to resolution

n Perform backup, recovery, and general maintenance

n Discuss the big IT picture and determine the databaseadministrator’s roles in deliverables

KNOW YOUR TEXTBOOK

Your textbook, Beginning Oracle Database 11g Administration,by Iggy Fernandez, contains the material on which you’ll betested. Before beginning your studies, you should becomefamiliar with your textbook.

Read the table of contents, and determine what’s specificallycovered in each section. Following the table of contents,beginning on page xxv, is a brief introduction. These, and theother pages that appear before the first chapter, provide agood overview of the book and this course.

A STUDY PLAN

Think of this study guide as a blueprint for your course. Youshould read it carefully. To receive the maximum benefit fromyour studies, use the following procedure:

1. Read the assignment introduction in the study guide.Note the assigned textbook pages for each assignment.

2. Skim the assigned textbook pages to get a general idea ofthe content. Then, closely read the assignment. Payattention to all details, especially definitions and mainconcepts.

3. Return to the study guide and answer the questions inthe self-check. These questions will allow you to reviewthe material.

4. After answering the self-checks, check your answersagainst those at the back of the study guide. If you missany questions, review the pages of the textbook coveringthose questions. The self-checks are designed to helpyou evaluate your understanding of the material andreveal weak points that you need to review. Do not sub-mit your self-check answers for grading.

6. Complete each assignment in this way. After you’ve com-pleted and checked the self-checks for the lesson,complete its project. Send your project to the school forgrading.

7. Follow these procedures for all four lessons. Finally,when the other work for this course is finished, completethe final graded project.

At any point in your studies, you can contact your instructorfor further information or clarification. Your instructor cananswer questions, provide additional information, and pro-vide further explanation on any of your study materials. Youshould find your instructor’s guidance and suggestions veryhelpful.

COURSE MATERIALS

The instructional material for this program is drawn fromBeginning Oracle Database 11g Administration, by IggyFernandez. The study guide is presented in four lessons, andeach lesson has assignments and a project. Your course pro-vides you with the following materials:

1. Your textbook, Beginning Oracle Database 11gAdministration, which contains your assigned readings

2. This study guide, which contains reading assignments,activities, and self-check questions to check your under-standing of the material. It also contains the instructionsyou’ll use to complete the four lesson projects and thefinal graded project.

An outline of each lesson is provided in the following section.Please take a few moments to review it before beginningLesson 1.

Instructions to Students 3

Remember to regularly check “My Courses” on your student homepage.Your instructor may post additional resources that you can access toenhance your learning experience.

NOTES

Instructions to Students4

Lesson 1: Database ConceptsFor: Read in the Read in the

study guide: textbook:

Assignment 1 Pages 7–9 Pages 3–20

Assignment 2 Pages 10–11 Pages 21–49

Assignment 3 Pages 12–13 Pages 51–62

Graded Project 40258900 Database Concepts

Lesson 2: Database ImplementationFor: Read in the Read in the

study guide: textbook:

Assignment 4 Pages 19–21 Pages 65–79

Assignment 5 Pages 22–23 Pages 81–93

Assignment 6 Pages 24–25 Pages 95–130

Assignment 7 Pages 26–28 Pages 131–150

Assignment 8 Pages 29–30 Pages 151–181

Graded Project 40259000 Database Implementation

Lesson 3: Database SupportFor: Read in the Read in the

study guide: textbook:

Assignment 9 Pages 33–35 Pages 185–221

Assignment 10 Pages 36–37 Pages 223–254

Assignment 11 Pages 38–40 Pages 255–304

Assignment 12 Pages 41–42 Pages 305–330

Assignment 13 Pages 43–45 Pages 331–354

Graded Project 40259100 Database Support

Lesson 4: Database TuningFor: Read in the Read in the

study guide: textbook:

Assignment 14 Pages 49–52 Pages 357–416

Graded Project 40259200 Database Tuning

Graded Project 40259300 Final Graded Project

5

As

sig

nm

en

tsA

ss

ign

me

nts

Lesson Assignments6

Note: To access and complete any of the examinations for this studyguide, click on the appropriate Take Exam icon on your “My Courses”page. You should not have to enter the examination numbers. Thesenumbers are for reference only if you have reason to contact StudentServices.

7

Le

ss

on

1L

es

so

n 1

Database Concepts

ASSIGNMENT 1: RELATIONAL DATABASEMANAGEMENT SYSTEMSRead the following assignment introduction. Then, read Chapter 1,pages 3–20 in your textbook. Before you begin each chapter inyour textbook, read the summary (on page 19 in Chapter 1), sothat you’ll have a good idea of what’s in the chapter. Then, readthe rest of the chapter.

What’s a database? A database can be a place to store confi-dential data. Critical to a company’s operations, databasesare large amounts of data that can be stored for later analyz-ing to produce usable information on, for example, markettrends and customer usage. What’s a relational database? Arelational database is made up of a table. The word relation isa precisely defined mathematical term. Basically, a relationaldatabase is a database in which the data is perceived by theuser as tables.

The operators, available to the user for retrieval, derive newtables from old ones. The purpose of a database managementsystem (DBMS) is to create and maintain tight control overdatabase activities and the overall structure of the relationaldatabase. The DBMS is the interface between the user andthe databases. It allows users to enter, change, and retrievedata stored within the database.

The basic structure of a database is made up of characters,which when grouped together are known as a field. A field istypically referred to as an attribute or characteristic (for example,a name, address, or city). A collection of fields is known as arecord. A group of records about the same type of entity isstored in a file. These collections of interrelated files arestored in a database.

Chapter 1 explains the purpose of the Structured QueryLanguage (SQL). SQL is the specification of relational algebraexpressions that are facilitated by an English-like languagecalled SQL. It also explains the purpose of a DBMS. It discussestransactions and their properties, as well as data security.

Advanced Database Technology8

As you’ll see, SQL is a data sublanguage that navigates thedata stored within database tables. It’s the relational databasemodel’s language. This language allows the user to performvarious types of database manipulation, such as creatingdatabases, querying databases to extract information, andperforming various database administrations.

SQL is powerful, yet its expressions and vocabulary are fairlysimple. SQL is relatively easy to learn because its inherentlogical flow is similar to the English language. This chapterwill introduce the basics of the SQL language,

Transactions are a logical unit of work that can be leveragedto exchange information to and from a database. These trans-actions are characterized by durability, isolation, consistency,and atomicity.

At this point, turn to the textbook and begin reading theassigned pages. When you reach the end of each chapter, be sure to read the list of Further Reading items, and try toobtain any that sound helpful for the work you’ll be doing.Then, return to the study guide and complete the self-check.After checking your answers and reviewing any material forwhich you need to spend more effort, continue with the nextassignment.

Lesson 1 9

Self-Check 1

At the end of each section of Advanced Database Technology, you’ll be asked to pause andcheck your understanding of what you’ve just read by completing a “Self-Check” exercise.Answering these questions will help you review what you’ve studied so far. Please completeSelf-Check 1 now.

Match the following terms to their descriptions.

______ 1. Availability management

______ 2. Continuity management

______ 3. Change management

______ 4. Incident management

______ 5. Problem management

______ 6. Configuration management

______ 7. Release management

______ 8. Capacity management

______ 9. Relational operators

______ 10. Transaction

______ 11. Consistency

______ 12. Serializability

______ 13. Referential constraint

______ 14. Logical data independence

Check your answers with those on page 53.

a. A logical unit of work characterized by atomicity, consistency, isolation, and durability

b. Implies that changes to the way in which data is storedor indexed shouldn’t affect the logical behavior ofapplication programs

c. Allows seamless database relocation

d. Producing the same outcome no matter whether thetransactions are executed one at a time or concurrently

e. Enabling a database to be accessible at all hours

f. The correspondence of a field in a record to another record

g. Documenting infrastructure components and theirdependencies

h. Guards a database from unauthorized or poorly tested changes

i. Planning for database growth

j. Detecting problems; restoring service

k. Not compromising the integrity of a database

l. Produce new relations from old

m. Bringing discipline to the unending task of applyingpatches and upgrades

n. Providing permanent fixes for known issues

Advanced Database Technology10

ASSIGNMENT 2: SQL AND PL/SQLRead the following assignment introduction. Then, readChapter 2, pages 21–49 in your textbook. For this and allassigned chapters, be sure to first read the chapter’s summarysection.

SQL needs to be understood by database administrators inall its forms. Chapter 2 begins by discussing the performanceimprovement pyramid. All database activity, including databaseadministration, is transacted through SQL.

To teach the SQL language, Oracle uses railroad diagrams,which can refer to themselves or be used recursively. A subquerythat consists of an entire table is known as an inline view. Scalarsubquery expressions can be used in a SELECT statement,which returns exactly one data item from one data row.

SQL is divided into two types of language: Data ManipulationLanguage (DML) and Data Definition Language (DDL). DMLincludes SELECT, INSERT, UPDATE, MERGE, and DELETEstatements. DDL includes the CREATE, ALTER, and DROPstatements for different class objects in the Oracle Database.Programs written in PL/SQL can be stored in an OracleDatabase. Using these programs has several advantages,including efficiency, control, and flexibility. However, the use of nullable data items can lead to results that contradictcommon sense. SQL queries can usually be formulated inseveral ways. There are several ways the Optimizer canchoose a query execution plan.

Other publications listed in the Further Reading section arehighly recommended for additional study on SQL.

As you did with the previous assignment, read the assignedtextbook pages, complete the following self-check, review whatyou need to, and then continue with the next assignment.

Lesson 1 11

ASSIGNMENT 3: ORACLEARCHITECTURERead the following assignment introduction. Then, readChapter 3, pages 51–62 in your textbook.

The word database collectively indicates the data files andsupporting files on the storage disks attached to the hostcomputer. A process that resides on a computer system inshared memory areas is known as an instance. Oracle instancesand databases are either one-to-one instance-per database ormany-to-one instances per database (multiple instances perdatabase).

The location of the database software is called the Oraclehome and is usually stored in the environment variable ORACLE_HOME. Each Oracle table or index is assigned toone tablespace and shares the space with the other tablesassigned to the same tablespace. Data files are logically grouped

Self-Check 2

1. In which direction does a railroad diagram normally proceed?

__________________________________________________________

2. What are some of the deficiencies of SQL?

__________________________________________________________

3. Why is PL/SQL beneficial?

__________________________________________________________

Check your answers with those on page 53.

Advanced Database Technology12

into tablespaces. The space within data files is organized intoequally sized blocks. Temporary files are used if a large workarea doesn’t fit into available computer memory.

Undo and redo logs are stored in redo log files and are neededto guarantee atomicity and durability of a transaction. Redologs are for safety and are a fixed size.

To locate names and locations of data files, Oracle uses controlfiles. The buffer cache System Global Area (SGA) containsinformation stored from the data dictionary and query executionplans, as well as the shared pool and the log buffer. When auser connects to the database, a dedicated server is started,and it terminates when the user disconnects.

A small number of dispatchers and shared servers service alluser connections in multithreaded server mode (MTS). Thedatabase writer (DBWR) process as well as the log writer (LGWR),the archiver (ARCH), the checkpoint process (CKPT), the processmonitor (PMON), and the system monitor (SMON) are backgroundprocesses that aren’t tied to user connections; these startwhen the database starts and exist until database shutdown.

Recommended online Oracle searchable and downloadablereferences can be found here:http://tinyurl.com/OracleRefs

Lesson 1 13

Self-Check 3

1. What is the most important database configuration file, and what does it contain?

__________________________________________________________

2. The following steps show the life cycle of a database session, but they’re not in order. List them in the correct order.

______ a. The dedicated server checks whether the required blocs of data are in the buffer cache.

______ b. The program residing on the user’s computer tries to connect to a database.

______ c. If the undo and redo entries fill up the current redo log file, the log writer closesthe file and opens the next one.

______ d. The dedicated server prepares the SQL statement for execution.

______ e. The user’s program sends a message to the port number specified in thetnsnames.ora file.

______ f. The user’s program disconnects from the database.

______ g. The user’s program provides the user’s credentials to the dedicated server process.

______ h. The database writer wakes up periodically and copies any modified data blocksthat it finds in the data cache to the data files.

______ i. The user’s program sends an SQL statement to the dedicated server for processing.

______ j. If the SQL statement doesn’t involve any modifications to the data, the requireddata rows are transmitted to the user; if the SQL statement involves modificationto the data, the user’s program sends a COMMIT command to the dedicatedserver process.

Check your answers with those on page 54.

Advanced Database Technology14

NOTES

15

Gra

de

d P

roje

ct

Gra

de

d P

roje

ct

DATABASE CONCEPTS

Overview

Now that you’ve completed the Lesson 1 assignments, you’reready to complete this graded project. It’s essential that youknow how to work with Oracle 11g for editing tables andissuing SQL commands on the database, and this gradedproject will help you develop those skills.

As you work through this project, carefully read the questions. The project you submit will consist of answers to these questions.

Questions

1. Based on the supplier-part example in Chapter 1, listthe parts supplied by NEW YANKEE WORKSHOP, INC.

2. Based on the supplier-part example in Chapter 1, listthe parts that are supplied only by TOOL TIME, INC.

3. Based on the supplier-part example in Chapter 1, howmany SELECT statements have been used?

4. In the subquery factoring example in Chapter 1, whichparts of the statement don’t conform to the railroaddiagram?

5. What is the most important database configuration file,and why? What are the two versions?

Writing Guidelines

1. Type your submission, double-spaced, in a standardprint font, size 12.

2. Include the following information at the top of your paper:

a. Name and complete mailing address

b. Student number

c. Course title (Advanced Database Technology)

d. Graded project number (40258900)

Advanced Database Technology16

3. Read the assignment carefully, and answer each question.

4. Be specific. Limit your submission to the questionsasked and issues mentioned.

5. Proofread your work carefully. Check for correct spelling,grammar, punctuation, and capitalization.

Grading Criteria

Your project will be evaluated according to the following criteria.

Content 80 percent

Written communication 10 percent

Format 10 percent

Here’s a brief explanation of each of these points.

Content

The student

n Provides clear answers to the assigned questions

n Addresses the questions in complete sentences, not justsimple yes or no statements

n Stays focused on the assigned issues

n Writes in his or her own words and uses quotationmarks to indicate direct quotations

Written Communication

The student

n Answers each question in complete sentences

n Uses correct grammar, spelling, punctuation, and sentence structure

n Provides clear organization (for example, uses words likefirst, however, on the other hand, and so on, consequently,since, next, and when)

n Makes sure the answers contain no typographical errors

Graded Project 17

Format

The paper is double-spaced and typed in font size 12. It includesthe student’s

n Name and complete mailing address

n Student number

n Course title (Advanced Database Technology)

n Graded project number (40258900)

Submitting Your Project

Follow this procedure to submit your project online:

1. On your computer, save a revised and corrected versionof your project.

2. Go to http://www.takeexamsonline.com and log in.

3. Go to My Courses.

4. Click on Take Exam next to the project you’re working on.

5. Enter your e-mail address in the box provided. (Note:This information is required for online submission.)

6. Attach your file as follows:

a. Click on the Browse box.

b. Locate the file you wish to attach.

c. Double-click on the file.

d. Click on Upload File.

7. Click on Submit Files.

Advanced Database Technology18

NOTES

Database Implementation

ASSIGNMENT 4: PLANNINGRead the following assignment introduction. Then, readChapter 4, pages 65–79 in your textbook.

As a starting point for designing a database system that willmeet your requirements, Oracle has provided several pretestedhardware and software configurations. The main memory-usage categories to consider are buffer cache, shared pool, andstack space for user sessions. Disk sizing is also important tounderstand for many data files.

The use of RAID layouts is standard practice, but this reducesthe amount of usable space available. RAID 10 is the bestchoice for databases, and certain categories of files should beseparated from each other. Sizing is typically a difficult taskinvolving many estimations. Some ideas on performing thistask would be asking vendors for help, using results from vol-ume testing, and studying similar systems in the enterprise.Ensuring room for expansion, being liberal with oversizing whenpossible, and setting your expectations correctly are usuallythe best practices. System redundancy requires identicallyconfigured primary and standby sites. If the primary systemuses Real Application Cluster (RAC), the standby systemmust use RAC; this practice is known as Maximum AvailableArchitecture (MAA). A standby database can improve applica-tion availability. In this scenario, redo information is shippedand applied to other databases. RACs involve multiple Oracleinstances connecting to the same database, which allows theuse of cheaper hardware and scaling out as the workloadincreases, instead of scaling up to a more-expensive andpowerful computer. This allows for system maintenance to be done without affecting application availability.

The dedicated server configuration is typically the most com-mon approach. Each user session is handled by a dedicatedprocess. The shared server configuration conserves resources; a small set of shared processes and dispatchers handles allsessions. Finally, Oracle offers several licensing options.Standard Edition is priced lower but can be used only on

19

Le

ss

on

2L

es

so

n 2

Advanced Database Technology20

servers with a maximum capacity of four CPUs. EnterpriseEdition is expensive but offers high-end features such as par-allelism and SQL results caching. Several other options areavailable with Enterprise, and these entail additional fees.

Oracle software can be used free-of-charge for prototyping andself-education. Oracle documentation is freely downloadableand searchable at this location:

http://tahiti.oracle.com

Self-Check 4

1. What should you use if you wanted to determine which software products have been installedin your Oracle installation?

__________________________________________________________

2. What does over-licensed mean in Oracle database terms?

__________________________________________________________

3. Which architecture best facilitates disaster recovery?

__________________________________________________________

Check your answers with those on page 54.

Lesson 2 21

ASSIGNMENT 5: SOFTWAREINSTALLATIONRead the following assignment introduction. Then, readChapter 5, pages 81–93 in your textbook.

Instant Client is a software bundle that’s simply copied to adirectory of your choice. A client installation is software thatneeds to be installed on every computer that wishes to have aconnection initiated to a database. A server installation is thesoftware that needs to be installed on the host computer of adatabase. This could include an application server or a laptop.Oracle’s is free to download, is free to learn, and has unlimitedevaluation time.

SQL Developer is a java-based graphical user interface toolthat database administrators, developers, and users can useto generate SQL statements. It’s a client installation in itsown right, and it doesn’t require Instant Client to be installed.

Perl is an open source, cross-platform programming language.The Perl software should be installed on the server installationhost computer to allow Oracle Enterprise Manager that usesPerl scripts to monitor the database and perform correctiveactions.

To download reference materials without any artificial restric-tions such as license keys, all that’s required is an OracleTechnology Network (OTN) account. To learn more aboutOracle software installations, go to

http://www.oracle.com/technology/index.html

At this point, you should attempt to write a simple “hello,world” on your screen using Perl. Successfully doing so willshow that Perl is properly installed on your computer.

Advanced Database Technology22

ASSIGNMENT 6: DATABASECREATIONRead the following assignment introduction. Then, readChapter 6, pages 95–130 in your textbook.

In a Windows environment, Oracle database components are installed as services and are started and stopped, whenthe server is started or stopped. The lsrctl and emctl utilitiescan be used, via command-line, to manage the listener andDatabase Control, respectively. The sqlplus utility can beused to stop and start Oracle and change database settings.Database Configuration Agent (DBCA) can be used in command-line mode; in this manner you specify a response file thatcontains your directives, which can be invoked from the operating system prompt.

Remote Diagnostics Agent (RDA) is a tool supplied by the Oraclesupport team to allow them to collect all the database infor-mation that may aid in the diagnosis of a problem. It breaksdown the documenting database configurations and helpsexplore the issues. If you don’t have a license for Diagnostics

Self-Check 5

1. What is the primary difference between a client installation and a server installation?

__________________________________________________________

2. Is OUI required for post Oracle 10g installs using Instant Client?

__________________________________________________________

Check your answers with those on page 54.

Lesson 2 23

Pack, there’s an option to install a free performance analysistool called Statspack. If you don’t have a license for DiagnosticsPack, it’s recommended that you disable access to unlicensedmanagement packs after creating a database.

A database template is a copy of all the settings that werecreated in a previous database. Saving your work in a tem-plate allows you to review your work later. It also allows youto create other databases using the same template (settings).Oracle provides three database templates:

1. General Purpose or Transaction Processing

2. Custom Database

3. Data Warehouse

Finally, DBCA can be used to create a database, reconfigurean existing database, delete a database, and manage databasetemplates. Net Configuration Assistant (NetCA) can be used toconfigure a listener.

Advanced Database Technology24

ASSIGNMENT 7: PHYSICALDATABASE DESIGNRead the following assignment introduction. Then, readChapter 7, pages 131–150 in your textbook.

Physical database design follows logical database design.There are three basic steps in the physical design process:

1. The logical model is mapped to the proprietary datatypes, language elements, and mechanisms provided by the chosen database technology.

2. Security requirements are implemented using the variousmechanisms provided, usually a view.

3. Performance is considered.

Self-Check 6

1. What are some basic database administrator tasks?

__________________________________________________________

2. What are two reasons to create templates?

__________________________________________________________

3. True or False? Changing a security setting can lock out a user on a certain number of failedlogin attempts.

4. What is the recommended common area for stored backups using the Recovery Manager(RMAN) and archived logs?

__________________________________________________________

5. What are the three default basic database template types?

__________________________________________________________

Check your answers with those on page 54.

Lesson 2 25

The first stage of database design is the logical databasedesign or possibly better known as data modeling. This isindependent of any specific database technology like MS SQLServer or Oracle. Three categories regarding performancemechanisms are

1. Indexes (to quickly find data)

2. Partitions and disk clusters to organize the data

3. Materialized views and denormalized tables to performprocess intensive operations like join queries ahead of time

An Oracle index, which is similar to an index at the back of aprinted book, allows a search of a record to happen quickly.This is less helpful, though, when a large percentage of rowsin the table satisfy the restrictions of the query. At the sametime, a proliferation of indexes can negatively affect efficiencybecause indexes must be updated when a table is modified.The typical Oracle index is a balanced tree or b-tree.

SQL Access Advisor is used to analyze an SQL query anddetermine if indexes would improve performance. The differentpartitioning schemes supported by Oracle include

1. List

2. Range

3. Interval

4. Reference

5. Hash

6. Composite partitioning

Partitions divide data tables into separate storage pools, androws of data can be allocated to each storage pool using somecriteria. A local index is itself partitioned in the same way asits table. Global indexes are most suitable when the querydoesn’t specify the partitioning criteria.

Denormalized tables and materialized views can be used toimprove the efficiency of join operations. Data in a material-ized view is automatically modified whenever the data in theunderlying tables is modified. The optimizer silently rewritesqueries and incorporates materialized views if possible. Hashclusters provide quick access to data without the need for an

Advanced Database Technology26

index, only if the value of the clustering key is specified in theSQL query. Memory cache can improve its efficiency becausedata from related tables can be stored in the same data blocks.

Self-Check 7

1. What type of index is used when multiple indexes are used in a query searching on multiplecriteria?

__________________________________________________________

2. What divides data tables into separate storage pools?

__________________________________________________________

3. What improves the efficiency of the memory cache and thus improves join operations?

__________________________________________________________

Check your answers with those on page 55.

Lesson 2 27

ASSIGNMENT 8: USER MANAGEMENT AND DATA LOADINGRead the following assignment introduction. Then, readChapter 8, pages 151–181 in your textbook.

The collections of objects owned by a user in an Oracle data-base are referred to as a schema. Every object in a databaseis owned by a single user, and the owner of an object mustexplicitly authorize its use by anybody else. The tables, indexes,triggers, views, and sequences are stored in the SYS schema.

The commands for user management are CREATE USER,ALTER USER, DROP USER, GRANT, and REVOKE commands.Operations that can be performed are SELECT, INSERT,UPDATE, and DELETE on tables. System objects that don’tapply to specific objects are CREATE SESSION and CREATETABLE. All the privileges in a collection can usually be assignedto a user with a single command. Roles are collections ofprivileges that are created for convenience.

To transfer data to and from Oracle databases, the exp andimp utilities are used. Although they’re not as sophisticatedas the data pump utilities introduced with Oracle 10g, theiradvantage is that they can work with client-side files, namedpipes, magnetic tapes, and standby databases. The Data PumpExport and Data Pump Import, expdp and impdp, respectively,were utilities introduced in Oracle 10g database with supportfor, among other things, parallelism, compression, andencryption. The SQL*Loader utility is used to import datafrom sources in other Oracle databases.

Advanced Database Technology28

Self-Check 8

1. What is a typical convention by which a database knows a user?

__________________________________________________________

2. What is the primary tool for controlling what permissions are given to a user?

__________________________________________________________

3. What is the best command to use to load small amounts of data into the database?

__________________________________________________________

Check your answers with those on page 55.

DATABASE IMPLEMENTATION

Overview

Now that you’ve completed the Lesson 2 assignments, you’reready to complete this graded project. This graded project isbased on Lesson 2, which includes textbook Chapters 4–8.

Questions

1. Using Database Configuration Assistant (DBCA) on anOracle 11g database you have access to, determine allthe software that has been installed and whether theinstallation is properly licensed. What do you find?

2. Which architecture facilitates business continuity?

3. Using the Perl language, write and execute a simple Perlprogram to display a message, ‘Oracle is great!’ on yourscreen. Type the program.

4. Create a database manually using the DBCA tool. Whatis the syntax?

5. Start an instance of the Oracle database, and list thecontrol_management_pack_access parameter.

6. Now, stop the Oracle instance you just started inQuestion 5. What’s the command?

7. Using SQL*Plus, create an index on the CUSTOMERStable to speed up the queries that search for customersbased on their state of residence (State) field. Describehow you’ve done this.

8. Create a cluster called supplier_parts with 5000 hashbuckets of 1 KB. What would the syntax look like?

9. Using SQL*Plus, create a user ‘jpublic’ and then give thatuser the password of ‘unitedstates’. Describe how you’vedone this.

29

Gra

de

d P

roje

ct

Gra

de

d P

roje

ct

Advanced Database Technology30

10. Now, give jpublic user rights to do a SELECT on tablesupplier_parts. Describe how you’ve done this.

11. Write a simple SQL*Loader control file that will load datainto a file using table supplier_parts with only a field ofsupplier_id. What would that syntax look like?

Writing Guidelines

1. Type your submission, double-spaced, in a standardprint font, size 12.

2. Include the following information at the top of yourpaper:

a. Name and complete mailing address

b. Student number

c. Course title (Advanced Database Technology)

d. Graded project number (40259000)

3. Read the assignment carefully, and answer each question.

4. Be specific. Limit your submission to the questionsasked and issues mentioned.

5. Proofread your work carefully. Check for correct spelling,grammar, punctuation, and capitalization.

Grading Criteria

Your project will be evaluated according to the following criteria.Especially important is providing correct SQL statements.

Content 80 percent

Written communication 10 percent

Format 10 percent

For a brief explanation of these criteria, refer to the previous project.

Submitting Your Project

Use the same procedures that you used to submit the previous project.

Database Support

ASSIGNMENT 9: TAKINGCONTROL AND MONITORINGRead the following assignment introduction. Then, readChapters 9 and 10, pages 185–221 in your textbook.

Oracle databases store information about the data in tables,and this data is known as metadata. The collection of theseis referred to as a data dictionary. The data in the data dic-tionary is quite cryptic because it’s compressed for maximumefficiency during database operation. The views to the datadictionary are provided to make the information in themmore comprehensible to the database administrator.

SQL Developer is a tool primarily for developers, but databaseadministrators also find it useful. Common uses are examin-ing the structure of a table and checking the execution planfor a query. It can also help identify such tasks as terminat-ing blocking sessions.

Enterprise Manager is broken down into two different web-based tools: Database Control and Grid Control. DatabaseControl is used to manage a single database, whereas GridControl is used to manage multiple databases. You can per-form various tasks, such as password resets and creatingindexes, to complex tasks, like backup and recovery usingEnterprise Manager, which is an alternative to command lineutilities like SQL*Plus.

Some of the areas that require monitoring by the databaseadministrator are database availability, changes, security,growth, backups, workload, performance, and capacity. Thealert log contains error messages and other informational mes-sages. The location of the alert log is found in the V$DIAG_INFOview. The name of the alert log would be alert_SID.log, whereSID is the name of your database instance. Enterprise Managermonitors the database and sends e-mails when problems aredetected.

31

Le

ss

on

3L

es

so

n 3

Advanced Database Technology32

The database administrator can monitor changes by usingOracle auditing facilities such as AUDIT TABLE and AUDITALTER TABLE. Recovery Manager (RMAN) maintains detailedhistory information about backups. Enterprise Manager canalso be used to review backups. The database size can bemonitored using DBA_DATA_FILES, table size can be moni-tored using DBA_SEGMENTS.STATSPACK, and AWR can beused to create regular snapshots of various information, likedatabase workload, performance, and capacity. This data canbe turned into graphs using SQL queries from time-series data.

Self-Check 9

1. What are some advantages of the SQL Developer tool?

__________________________________________________________

2. What is the primary reason you’d use the Remote Diagnostic Agent?

__________________________________________________________

3. What is the best source of information for checking the availability of the database?

__________________________________________________________

4. What tool is used for monitoring database backups?

__________________________________________________________

5. Which view is used to monitor database workload, and why is it important?

__________________________________________________________

Check your answers with those on page 55.

Lesson 3 33

ASSIGNMENT 10: FIXING PROBLEMSRead the following assignment introduction. Then, readChapter 11, pages 223–254 in your textbook.

Depending on urgency and importance, a database adminis-trator can spend time on several activities. These tasks canbe divided into keeping records, identifying the root causes ofincidents and eliminating them, updating documentation, andautomating common tasks.

The first step to fixing a problem is defining it. The second isto investigate the problem. The last is to implement a solutionin a safe and controlled manner. The best practice is to beproactive in your problem solving. Being proactive entailsusing good tools, following standard operating procedures,using RDA collections, and keeping working records.

Incident management is concerned with restoring service asrapidly as possible. Problem management is concerned withpermanently fixing defects so the incidents aren’t repeated. TheOracle documentation site, Technology Network, online forumsand Ask Tom, the Usenet newsgroup comp.databases.oracle.server, and the Oracle-L mailing list are high-quality Internettroubleshooting resources.

If you’ve purchased an Oracle support contract, you cansearch the Oracle knowledge base Metalink and escalateproblems to the Oracle support team. Oracle error code hastwo parts: a facility code and five-digit number, separated bya hyphen. The DBA must learn to identify which Oracle errorcodes indicate problems with the database infrastructure andwhich codes indicate errors made by a user or a problemwith an application.

Advanced Database Technology34

ASSIGNMENT 11: BACKUPS AND RECOVERYRead the following assignment introduction. Then, readChapters 12 and 13, pages 255–304 in your textbook.

A backup of a database is typically a backup of the entiredatabase or part of the database. Damaged parts can berepaired using the backups. Additionally, archived logs canbe used in conjunction with backups to replay transactionsthat changed data after the backup was performed.

Maintaining costs while meeting the business objectives is anappropriate backup strategy. Backups are typically scheduledfor off hours, weekends, and evenings. Thus, some larger data-bases may not be able to be backed up in a single operation.Incremental backups, which copy only those data blockswhich have changed since the last backup, can be used toconserve computer resources.

Self-Check 10

1. What are the five steps in solving an Oracle database problem?

__________________________________________________________

2. What are some resources to help diagnose a problem?

__________________________________________________________

3. What tool beginning with Oracle 11g is stored in a directory structure?

__________________________________________________________

4. What are four frequently misunderstood error messages?

__________________________________________________________

Check your answers with those on page 55.

Lesson 3 35

Backups performed while the database is being used mightcontain inconsistencies. However, information in the redo logscan be used to eliminate inconsistencies. Physical backupsare copies of whole database blocks. Logical backups arecopies of the data records themselves. Recovery Manager(RMAN) is usually the tool of choice for creating physicalbackups. Data Pump Export can be used for creating logicalbackups. Using the DBCA to create a database, you canchoose to accept the Oracle suggested backup scheme andschedule backups immediately. You can also use EnterpriseManager later to schedule backups.

The word recover refers to the process of relaying transactionsrecorded to the log, while the word restore refers to the opera-tion of replacing a damaged or missing file from a backupcopy. A good recovery solution is tailored to the situation andminimizes downtime. Individual data blocks and files can berepaired without impacting the rest of the database. Single-block recovery is available only with Enterprise Edition. TheData Pump Utility can be used to restore a table from logicalbackup made using that utility.

The only option for the common incomplete recovery is usererror if the archived redo logs are damaged. Flashback tech-niques can be used to reverse logical damage caused by usererror. These techniques depend on the availability of therequired information in the undo segments. The FlashbackArchive technique can be used to record all changes made todata rows during the lifetime of the table.

You can recover prior versions of data from the archived redo logs by using LogMiner. To do this, enable supplementalminimal logging to ensure that LogMiner has sufficient informa-tion to support chained rows and various storage arrangementssuch as cluster tables and indexed-organized tables. A criticalmistake is not performing recovery testing; to do this, youcan use the DUPLICATE DATABASE command withoutharming the live database.

Advanced Database Technology36

ASSIGNMENT 12: DATABASE MAINTENANCERead the following assignment introduction. Then, readChapter 14, pages 305–330 in your textbook.

To keep the database in peak operating condition, databasemaintenance is required. Most maintenance operations canbe automated, specifically the collection of statistics for theuse of the query optimizer.

Self-Check 11

1. What are the two types of main backup storage?

__________________________________________________________

2. What is the difference between a hot backup and a cold backup?

__________________________________________________________

3. True or False? An RMAN command can delete an expired backup.

4. What are the two types of recovery?

__________________________________________________________

5. What is referred to as tailoring a recovery only to affected data?

__________________________________________________________

6. What utility can you use to selectively reverse changes to data?

__________________________________________________________

Check your answers with those on page 56.

Lesson 3 37

The most important aspect of database maintenance for adatabase administrator is backups. RMAN is the preferredtool for many reasons. Recovery testing is vital to validate thebackup procedures. Making a copy of old data, in preparationfor deleting it from the database, is called archiving, and purgingis the task of deleting data that has already been archived.Rebuilding refers to the task of compacting tables and indexesfrom which large amounts of data have been purged.

The query optimizer requires statistical information about thedata. DBMS_STATS package collects information using a col-lection of procedures. Statistical information about data iscollected automatically by a scheduled nightly job, although,if you like, you’re free to disable this job in favor of a customapproach.

The adrci utility manages log files and trace files which arestored in the Automatic Diagnostics Repository (ADR). Auditrecords should be periodically reviewed, archived, and purged.Passwords should be changed regularly, and shared pass-words should be changed when they’ve been compromised.Password complexity should be enforced, and workers’ accountsshould be purged when their responsibilities are changed orthey leave the company.

For management of disk capacity, the information inDBA_DATA_FILES and DBA_FREE_SPACE can be used to set up a simple system. Likewise, the information in theSTATSPACK tables can be used to produce graphs of systemcapacity.

Advanced Database Technology38

Self-Check 12

1. What command is used for scanning the database for corruption?

__________________________________________________________

2. What is the purpose of having to archive and purge a database occasionally?

__________________________________________________________

3. True or False? It’s necessary to audit all aspects of the database.

4. What table stores audit records?

__________________________________________________________

5. What files can record database size and free space?

__________________________________________________________

Check your answers with those on page 56.

Lesson 3 39

ASSIGNMENT 13: THE BIGPICTURE AND THE 10DELIVERABLESRead the following assignment introduction. Then, readChapter 15, pages 331–354 in your textbook.

The 10 deliverables of the database administration role are

1. Databases that meet the needs of the business

2. A secure document library

3. Work logs of service requests, alarms, and changes

4. Standard operating procedures (SOPs)

5. Backup testing and failover testing procedures and records

6. Maintenance and batch schedules, documentation, and records

7. Database administration tools

8. Management reports

9. Exception reports

10. Audit reports

A standard operating procedure (SOP) is any database admin-istration task that’s done repeatedly, and it should be codified.RDA is a cheap and simple alternative to buying a ConfigurationManagement pack. Incident management is a reactive process;the goal is to restore service as soon as possible. However,problem management is proactive, and the goal is to identifyand eliminate chronic problems.

IT services are managed using the principles of IT servicemanagement (ITSM). The database administrator is typically a part of the operations team. However, persons with the titleof DBA can be found in other groups like the deploymentteam or application management team. Some processes ofthis ITSM are strategic, service level management, financialmanagement, capacity management, availability management,and IT continuity management (disaster recovery).

Advanced Database Technology40

Oracle provides several Management Packs for a number ofITSM processes, but most sites aren’t licensed to use them,because they’re available only with the Enterprise Editionand require extra license and support fees. Care must betaken because of the ability to use Management Packs isautomatically installed and activated during the installationprocess, and this installation may cause organizations to bevulnerable to using unlicensed software.

Every database must have a disaster recovery plan. Threeapproaches that can be used are hot standby, warm standby,and cold standby, and a cold standby is the cheapest option.STATSPACK reports can be used to monitor trends in work-loads and performance. STATSPACK histories should bemaintained for as long as practicable, and baselines shouldbe retained indefinitely.

Various ITIL definitions that are provided in this chapter canbe found here:

http://tinyurl.com/ITIL-glossaries

Self-Check 13

1. Name three SOPs on common tasks.

__________________________________________________________

2. Name three of the various processes of IT Service Management.

__________________________________________________________

3. True or False? Execution Management is a process for implementing and managing the lifecycle of a database.

4. Name the points that should be addressed when discussing the structure of an SOP.

__________________________________________________________

Check your answers with those on page 56.

41

Gra

de

d P

roje

ct

Gra

de

d P

roje

ct

DATABASE SUPPORT

OverviewNow that you’ve completed the Lesson 3 assignments, you’reready to complete this graded project. When you submit yoursolutions, remember to include all the required components.This graded project is based on Lesson 3, which includestextbook Chapters 9–15.

Questions1. Using SQL*Plus, and referencing the sys.ts$ table, determine

which is the largest table in the database and who ownsit. Show how to load the data dictionary table and view.

2. How should you create a query to monitor the history ofmodifications to tables and other objects?

3. Similarly, how should you monitor the history of connections and disconnections?

4. What is the SQL statement to monitor the size of the database?

5. When troubleshooting a problem, what is the step afterlearning everything about the problem?

6. In what rare scenario might users not receive any error messages?

7. Using RMAN, what is the simple command to begin abackup of a database?

8. Using RMAN, what is one way to quickly test the successand view a list of backup sets from your backup?

9. What is the command to do a logical recovery of a singletable (supplier_parts & parts field) by using the DataPump Import Utility?

10. To reverse changes using an SQL statement called aflashback transaction, what would the syntax for thisstatement look like?

11. Using LogMiner, one must have enabled minimal supple-mental logging with archived redo logs. Show an exampleof setting up a log file using this utility.

Advanced Database Technology42

12. What are three of the best practices for Oracle database backups?

13. To audit the contents of the DBA_AUDIT_SESSION, produce a report that logs on, logs off, reads, and writes from this table.

14. Name the ten deliverables of the database administration role.

15. Name five standard operating procedures that might behelpful for everyday tasks of a database administrator.

Writing Guidelines1. Type your submission, double-spaced, in a standard

print font, size 12.

2. Include the following information at the top of your paper:

a. Name and complete mailing address

b. Student number

c. Course title (Advanced Database Technology)

d. Graded project number (40259100)

3. Read the assignment carefully, and answer each question.

4. Be specific. Limit your submission to the questionsasked and issues mentioned.

5. Proofread your work carefully. Check for correct spelling,grammar, punctuation, and capitalization.

Grading Criteria Your project will be evaluated according to the following criteria.

Content 80 percent

Written communication 10 percent

Format 10 percent

For a brief explanation of these criteria, refer to the first project.

Submitting Your ProjectUse the same procedures that you used to submit the previous projects.

Database Tuning

ASSIGNMENT 14: INSTANCETUNING AND SQL TUNINGRead the following assignment introduction. Then, readChapters 16–17, pages 357–416 in your textbook.

A systematic approach must be taken when troubleshootinga performance problem with the database because it may notbe the database as the primary cause. The five steps used toevaluate a performance problem are

1. Define the problem.

2. Investigate the problem.

3. Analyze the problem.

4. Solve the problem.

5. Implement the problem.

The best way to analyze a performance problem is findingwhere the database is spending its time. This is summarizedby the Top Five Timed Events section of the Statspack report.Statspack gets its data from the Oracle wait interface, thecollection of dynamic performance views that track all aspectsof database activity. The views include

n V$SYSSTAT

n V$SESSTAT

n V$SESSION_EVENT

n V$SYSTEM_EVENT

The Statspack repository can be mined for historical datathat can be graphed by using tools such as Microsoft Excel.Performance of individual queries can also be tracked over time.It’s also useful to see at a glance the top five timed events fora range of time periods. A stable database will exhibit distinctrepeating patterns such as the workload may peak during theday and subside in the evening.

43

Le

ss

on

4L

es

so

n 4

Advanced Database Technology44

Deviations from these patterns may be a sign something iswrong with the database. The Statspack reports for the affectedperiods can be analyzed and compared with the reports for thebaseline periods. Examples of Statspack reports to diagnose aproblem are

n SQL Ordered by CPU

n SQL Ordered by Elapsed Time

n SQL Ordered by Gets

n SQL Ordered by Reads

n Instance Activity Stats

n File Read Histogram Stats

n Segments by Logical Reads

n Segments by Physical Reads

The efficiency of an SQL statement is measured by the amountof computing resources used to produce the output. Thenumber of logical read operations is a good way to measurethe consumption of computing resources because it’s directlyproportional to the amount of resources consumed. EnterpriseManager and Toad can identify inefficient SQL statements by tracing a batch job or user session, and by examiningSTATSPACK reports. Failure to use advanced features suchas analytic functions, poor application development practices,poor logical and physical database design, and inadequatedatabase maintenance are all causes for inefficient SQL.

If you’re using Enterprise Edition and have a license for theTuning Pack, you can use SQL Tuning Advisor to help youwith SQL Tuning. The cost of executing a query plan can farexceed the cost of executing a query. Plan reuse is thereforecritical for database performance. Dynamic sampling, whichnecessitates the absence of statistics, can dramaticallyincrease the cost of creating a plan.

Hardware limitations and contention for limited resourcesplay a major role in performance. The primary key for a tableis always indexed. Indexes should be created on foreign keysunless the tables in question are small enough that the lackof an index won’t have an impact on performance.

Lesson 4 45

Hints for the optimizer can be embedded inside an SQL statement. Each hint partially constrains the optimizer. Adesirable query plan can be preserved by capturing the set of hints that describes it in a stored outline.

Query optimizer relies on statistical information on tables andindexes to do its job properly. A job called GATHER_STATS_JOBautomatically collects table and index statistics, and it runsduring a nightly maintenance window. The DBMS_STATSpackage contains a variety of procedures for customizing thestatistics collection strategy. System statistics aren’t collectedautomatically; they should be manually collected by usingthe GATHER_SYSTEM_STATS procedure.

Advanced Database Technology46

Self-Check 14

1. What are the typical five steps to solving performance problems?

__________________________________________________________

2. True or False? Finding out where the database is spending its time is the best logical place todetermine database performance.

3. What is the Oracle wait interface?

__________________________________________________________

4. What tool is beneficial for viewing mined data in a graph format in the STATSPACK repository?

__________________________________________________________

5. What’s the simplest way to identify an inefficient SQL statement?

__________________________________________________________

6. What things contribute to inefficient SQL?

__________________________________________________________

7. What are ways to improve SQL?

__________________________________________________________

8. What are ways to improve SQL?

__________________________________________________________

Check your answers with those on page 57.

47

Gra

de

d P

roje

ct

Gra

de

d P

roje

ct

DATABASE TUNING

Overview

Now that you’ve completed the Lesson 4 assignments, you’reready to complete this graded project. This graded project isbased on Lesson 4, which covers textbook Chapters 16–17.

Questions

1. What are the five methods for solving any performancetuning problem?

2. What is the most important section of the Statspack report,and why is this important to the first troubleshootingperformance diagnosis of finding out where the databaseis spending its time?

3. To help identify inefficiencies in an SQL statement wecan use the trace a job. What command could you use to start tracing in a session?

4. Name four possible causes of inefficient SQL.

5. Name some ways to improve SQL performance.

6. Give an example, syntactically, of examining the queryplan using the dbms_xplan.display_cursor procedure.

7. Once you’ve created indexes and generated statistics,you may use the SQL Tuning Advisor for new ideas onimproving SQL performance. What syntax is used to generate a recommendation report?

Writing Guidelines

1. Type your submission, double-spaced, in a standardprint font, size 12.

2. Include the following information at the top of your paper:

a. Name and complete mailing address

b. Student number

c. Course title (Advanced Database Technology)

d. Graded project number (40259200)

Advanced Database Technology48

3. Read the assignment carefully, and answer each question.

4. Be specific. Limit your submission to the questionsasked and issues mentioned.

5. Proofread your work carefully. Check for correct spelling,grammar, punctuation, and capitalization.

Grading Criteria

Your project will be evaluated according to the following criteria.

Content 80 percent

Written communication 10 percent

Format 10 percent

For a brief explanation of these criteria, refer to the first project.

Submitting Your Project

Use the same procedures that you used to submit the previous projects.

FINAL

Overview

Now that you’ve completed all the other requirements forAdvanced Database Technology, you’re ready to complete thisfinal graded project. Throughout this graded project, you’lluse skills that you’ve gained throughout all the lessons. Readall the questions carefully, and remember to include all of therequired components when you submit your solutions.

Questions

1. Using SQL, list the parts that are supplied by NEW YANKEE WORKSHOP, INC. as well as the OLD YANKEEWORKSHOP, INC.

2. What methodology sees processes in the application tiercommunicate not with dedicated Oracle Databaseprocesses but with a connection broker?

3. What is it known as when the scenario of both availabilityand performance is important and budgets are generous?This configuration combines RAC technology with standbytechnology and uses identically configured primary andsecondary sites.

4. What is the command syntax to start the listener as abasic database administration task?

5. What is the command to create an index for theemployee table that creates an index of employee_id and employee_name and names it emp_index_1?

6. What type of partitioning provides the ability to divide apartition into subpartitions using different criteria (thiscan make sense if a table is very large)?

7. What is the command to give the ability to start a sessionto ‘juser’ when necessary?

8. What is the best source of information while monitoringdatabase availability?

49

Gra

de

d P

roje

ct

Gra

de

d P

roje

ct

Advanced Database Technology50

9. What view keeps track of monitoring workload for a database profile that allows you to detect deviations and trends?

10. What command offers cumulative values for operatingsystem metrics such as CPU usage?

11. Your users are complaining that their application isbehaving sluggishly. How should you check the databaseenvironment for signs of trouble?

12. True or False? A cold backup occurs when a backup iscreated while a database is relatively accessible to usersand can be modified when the backup is underway.

13. What is an example of an SQL statement required toreverse changes?

14. What tool is used to manage log files?

15. What is the primary purpose of the ITSM?

16. What are the points that should be considered in thestructure of an SOP?

17. What gets data from the Oracle wait interface that’s acollection of dynamic performance views that track allaspects of database activity?

18. What is the first method to identify tuning candidates ininefficient SQL statements?

Writing Guidelines

1. Type your submission, double-spaced, in a standardprint font, size 12.

2. Include the following information at the top of your paper:

a. Name and complete mailing address

b. Student number

c. Course title (Advanced Database Technology)

d. Graded project number (40259300)

3. Read the assignment carefully, and answer each question.

4. Be specific. Limit your submission to the questionsasked and issues mentioned.

5. Proofread your work carefully. Check for correct spelling,grammar, punctuation, and capitalization.

Graded Project 51

Grading Criteria

Your project will be evaluated according to the following criteria.

Content 80 percent

Written communication 10 percent

Format 10 percent

For a brief explanation of these criteria, refer to the first project.

Submitting Your Project

Use the same procedures that you used to submit the previous projects.

Advanced Database Technology52

NOTES

Self-Check 11. e

2. c

3. h

4. j

5. n

6. g

7. m

8. i

9. l

10. a

11. k

12. d

13. f

14. b

Self-Check 21. From left to right

2. SQL doesn’t prohibit duplicates, which can cause queriesthat seem equivalent but produce different results andcan inhibit the process of query optimization.

3. It offers the entire suite of structured programmingmechanisms such as condition checking, loops, and subroutines. The use of these programs offers efficiency,control, and flexibility.

53

An

sw

er

sA

ns

we

rs

Self-Check Answers54

Self-Check 31. The most important file comes in two versions (pfile and

spfile), and it contains the settings used during databasestartup. It specifies details such as the amount of computermemory used during operation.

2. b, e, g, i, d, a, j, h, c, f

Self-Check 41. Database Configuration Assistant (DBCA)

2. The license is for Enterprise Edition, but no features ofthe Enterprise Edition are being used.

3. Maximum Available Architecture (MAA)

Self-Check 5 1. A client installation needs to be installed on computers

from which a connection is initiated. A server installationneeds to be installed on the host computer of a database.

2. No

Self-Check 61. Stopping and starting processes, and initializing services

2. To save a record of your work, and to create other databases with the same settings

3. True

4. Flash recovery area

5. General Purpose or Transaction Processing, CustomDatabase, and Data Warehouse

Self-Check Answers 55

Self-Check 71. Concatenated index

2. Partitions

3. Clusters

Self-Check 81. First character of the first name of the user, and the first

seven characters of the user’s last name

2. The GRANT command

3. The INSERT command

Self-Check 91. Examining the structure of a table and checking the

execution plan for a query

2. It may aid in the diagnosis of a problem.

3. The alert log

4. Recovery Manager (RMAN)

5. The V$SYSSTAT keeps track of hundreds of differentaspects of the database workload. This is good becauseyou can monitor and detect deviations and trends in theworkload of the database.

Self-Check 101. Define, investigate, analyze, solve, and implement

the solution.

2. Internet, Oracle documentation, Online forums, OracleTechnology Network, Ask Tom web site, Usenet, and theOracle-L mailing list

3. Automatic Diagnostic Repository (ADR)

4. ORA-01555: Snapshot too old, ORA-00060 deadlockdetected, ORA00600 internal error code, and ORA-07445exception encountered

Self-Check Answers56

Self-Check 111. Disk and tape

2. Hot backup is performed while users have access tothe database; cold is performed when the database isinaccessible.

3. True

4. Full and partial

5. Logical recovery

6. LogMiner

Self-Check 121. VALIDATE DATABASE

2. Database performance commonly degrades as the data-base grows large.

3. True

4. The AUD$ table owned by SYS stores audit records.

5. DBA_DATA_FILES and DBA_FREE_SPACE

Self-Check 131. Any three of the following:

n Connecting to a database

n Starting a database

n Stopping a database

n Backups and recovery

n Removing archived redo logs

n Standby database maintenance

n Adding space

n Health checks

n Adding a user

Self-Check Answers 57

n Resetting a password

n Clearing a lock

n Maintenance activities

2. Any three of the following:

n Service Level Management

n Financial Management

n IT Service Continuity Management

n Capacity Management

n Availability Management

n Incident Management

n Problem Management

n Change Management

n Configuration Management

n Release Management

3. False

4. Purpose, risks, labor and billing, Scheduling, and Prerequisites

Self-Check 141. Define the problem, investigate, analyze the data, solve,

and implement the solution

2. True

3. A collection of dynamic performance views that track allaspects of database activity

4. Microsoft Excel

5. Watch the operation of the database while executing aquery using a GUI tool such as Enterprise Manager orSQL Developer.

Self-Check Answers58

6. Failure to use advanced features of the SQL language,poor application development practices, logical and phys-ical database design, and inadequate databasemaintenance

7. Improve use of indexes and other paths to reach therequired data, use hints for the optimizer in the SQLstatement, and collect statistics for the query optimizerto do its job properly.

8. Improve use of indexes and other paths to reach therequired data.