資料庫專業能力認證的第一堂課140.126.122.189/upload/1061/b10409a201766955261.pdf ·...

47
資料庫專業能力認證的第一堂課 Oracle Database 12: Backup and Recovery Oracle Database 12c: Managing Multitenant Architecture Oracle Database 12c: Install and Upgrade Workshop 中華大學資訊管理系 副教授 李之中 2017/06/05

Upload: others

Post on 15-Feb-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

資料庫專業能力認證的第一堂課 Oracle Database 12: Backup and Recovery

Oracle Database 12c: Managing Multitenant Architecture

Oracle Database 12c: Install and Upgrade Workshop

中華大學資訊管理系

副教授 李之中

2017/06/05

大綱

資料庫管理師

Oracle 12c 資料庫管理師認證

課程介紹

修課之前…

資料庫管理師

Database administrator, DBA

What Is a DBA?

A DBA ensures the ongoing operational functionality and efficiency of an organization's databases and applications.

For more information, refer to

張天慧,資料庫管理員的角色與職責,在: Oracle資料庫管理與維護,悅知文化,2008。http://www.delightpress.com.tw/book.aspx?book_id=sknd00001

Craig S. Mullins, Database Administration: The Complete Guide to Practices and Procedures, Addison Wesley, 2002.

資料庫管理師的職責

Huge Scope of DBA Responsibilities

Initial Design & Layout

Hardware configuration

Logical database design

Physical data layout

Auxiliary data structures

Configuration parameters

Security policies, groups, userids

資料庫管理師的職責

Huge Scope of DBA Responsibilities

Ongoing System Management

Backup & Recovery Management

Tapes, MTTR

Disaster Recovery

Dynamic Monitoring & Adjustment

Database statistics to collect and when

Clustering and Reorganization

Memory allocation, esp. buffer pool sizes

System / query status

Problem determination (deadlocks, bad plans, ...)

Visualization of all the above

Source: International Oracle User Group (IOUG) 2001 DBA Survey

Create & Configure

12 %

Load Data

6%

Ongoing System Management

55%

Software Maintenance

6%

Install 6%

Where DBA’s spend their time

每日例行工作(1/2)

1.確認所有Oracle資料庫狀態正常:

以正常方式登入所有資料庫以及從作業系統上檢測Oracle程序是否正常存在。

2.確認所有Oracle監聽器(Listener)狀態正常。

3.檢查作業系統空間使用狀態。

4.檢查Oracle警示檔案(Alert Log File)和追蹤檔案(Trace File)中的錯誤訊息,記錄任何新的ORA-錯誤訊息記錄,並尋求解決方案及列出排程解決。

每日例行工作(2/2)

5.檢查資料庫當日所有備份是否成功。

6.檢查表格空間的使用狀況: 可利用SQL指令查詢或Oracle工具Oracle Enterprise

Manager(OEM)檢查使用狀況。

7.監控資料庫運作狀況:此部分可利用Oracle

Statespack、OEM或Monitor Script等工具監控資料庫運作狀況。

每周例行工作(1/3)

1.根據每日的檢查表格空間的使用情況,找到數量增長很快的表格,協調程式開發人員,並採取因應如下的措施:

一.是否需要刪除無用的歷史資料?

二.是否需要擴展表格空間?

三.是否需要修改表格儲存參數?

每周例行工作(2/3)

2.延續每日監控資料庫運作狀況,及按照需求修改資料庫參數。

3.根據每日監控資料庫運作狀況,尋找關鍵,針對沒有效率的SQL語法進行SQL調教。

4.檢查是否有新增無效的物件。

5.檢查是否有無效的索引:

如果有,選擇適當時機重建。

6.檢查是否有表格空間碎片(Fragmentation):

每周例行工作(3/3)

6.檢查是否有表格空間碎片(Fragmentation):

所謂表格空間碎片,簡單舉例來說,假設有一個表格空間明明有 1GB,可是當有50MB的資料需要在此表格空間增加一個 50MB的擴充區段(Extent)時,卻無法增加?

因為這 1GB的空間是由一堆零碎細微的擴充區段組成,而擴充區段組成的要件之一是連續的空間。一直以來,表空間碎片是資料庫管理員揮之不去的陰影。因表空間碎片是作為影響資料庫性能的一大因素之一。

每月例行工作(1/4)

1.產生每月表格空間成長報告

2.針對表格及索引進行資料統計分析

當Oracle資料庫要執行SQL語法時,會依照資料統計分析的結果來產生執行計劃(Explain Plan),因此,統計分析的結果對Oracle資料庫的效能影響佔有相當的分量。

每月至少一次針對所有表格及索引進行資料統計分析。

每月例行工作(2/4)

3.每個月至少檢查一次是否有Chained Rows

Chained Rows分為兩種型態:

資料串鏈(Row Chaining):主要造成原因是每筆資料過長,無法容納在一個區塊裡面。

資料遷徙(Row Migration):主要是當資料要更新時,造成每筆資料過長,必須前移到另一個較大的連續區塊裡面。

每月例行工作(3/4)

4.根據每日及每周的監控統計,進行空間管理改進方案

所謂空間管理改進方案,是依照每日及每周的監控結果針對效能較繁重的物件,進行特殊的空間改善,以加快使用上的效能,例如將大型的表格(Large

Table)依照特殊屬性改成Partition Table或是Cluster

Table等。

每月例行工作(4/4)

5.尋找資料庫性能調整的機會

比對每天對資料庫性能的監控報告,確定是否有必要對資料庫性能進行調整。

DBA 證照

產品

Oracle 12c database R1

目標

Oracle Database 12c Administrator

Oracle Database 12c Administrator Certified

Professional

Certification Path:

Oracle Database 12g Administrator

Oracle Database 12c Administrator Certified Associate

Either(三選一)

Oracle Database 12c SQL 1Z0-071 or

Oracle Database 12c: SQL Fundamentals 1Z0-061 or

Oracle Database 11g: SQL Fundamentals I 1Z0-051

Oracle Database 12c: Administration (1Z0-062)

Oracle Database 12c Administrator Certified Professional

Oracle Database 12c: Advanced Administration (1Z0-063)

再加上一門 Hand on Course

Oracle Database 12c Administrator Certified

Professional HANDS-ON COURSE LIST

Oracle Database 12c: Admin, Install and Upgrade Accelerated

Oracle Database 12c: Administration Workshop

Oracle Database 12c: Backup and Recovery Workshop

Oracle Database 12c: Data Guard Administration

Oracle Database 12c: High Availability New Features

Oracle Database 12c: Install and Upgrade Workshop

Oracle Database 12c: Managing Multitenant Architecture

Oracle Database 12c: New Features for Administrators

Oracle Database 12c: Performance Management and Tuning

課程介紹

課程目標

此課程為 Oracle 12c 資料庫管理的進階課程,6學分課程中包含三門Oracle原廠課程,分別為

(1) Oracle Database 12c: Backup and Recovery

Workshop ,

(2) Oracle Database 12c: Managing Multitenant

Architecture,

(3) Oracle Database 12c: Install and Upgrade

Workshop

本課程之課程內容

(1)在Backup and Recovery Workshop 中將討論在如何進行

Oracle 12c 資料庫的資料備份與還原作業,包含RMAN的設定使用、磁帶機備份、Flashback作業等。

(2)在Managing Multitenant Architecture中將討論Oracle 12c

資料庫的多租戶架構,以及有關多租戶容器資料庫(multitenant container database)以及可插拔資料庫(pluggable

database)之觀念。

(3)而在Install and Upgrade Workshop中將討論Oracle 12c 資料庫的安裝以及如何進行12c資料庫的升級作業。

Course Objectives

Backup and Recovery Workshop

Develop appropriate backup and recovery procedures to address your business needs.

Implement backup and recovery settings and perform backup operations to disk and tape.

Employ Oracle Database recovery procedures to recover from media and other failures.

Diagnose and repair data failures.

Use Flashback Technologies and data duplication to complement backup and recovery procedures.

Secure the availability of your database by appropriate backup and recovery strategies.

Gain an understanding of the Oracle Database Cloud Service.

Course Objectives

Managing Multitenant Architecture

Understand the multitenant architecture.

Create and manage a multitenant container database and pluggable

databases.

Manage storage within a multitenant container database and pluggable

databases.

Manage security within a multitenant container database and pluggable

databases.

Monitor performance and manage resources within a multitenant

container database and pluggable databases.

Course Objectives

Managing Multitenant Architecture

Perform backup, recover and flashback operations on a multitenant

container database and pluggable databases.

Manage the CDB and PDBs in specific configurations like Data Guard,

Database Vault.

Perform particular operations like Oracle Data Pump transportation,

loading, encryption, auditing.

Gain an understanding of the Oracle Database Cloud Service.

Course Objectives

Install and Upgrade Workshop

Install Oracle Grid Infrastructure for a Standalone Server.

Use Oracle Restart to manage components.

Upgrade an existing Oracle Database to Oracle Database 12c.

Create a container database and provision pluggable databases.

Gain an understanding of the Oracle Database Cloud Service.

先修課程與課程

Required Prerequisites:

Knowledge of basic database administration

Oracle Database 12c: Administration Workshop (進階商用資料庫、資料庫管理實務)

Suggested Prerequisites:

Oracle Database 11g: SQL Fundamentals I (商用資料庫)

課程資訊

課程名稱:資料庫專業能力認證

授課老師:李之中(校師)

上課時間:二(ABC)、四(ABC)

上課地點:M222

課程網址:http://people.chu.edu.tw/~leecc

特殊限制:曾修習Oracle Database 11g:

Administration Workshop I (進階商用資料庫(大學部))或Oracle Database 12c: Administration

Workshop (資料庫管理實務(碩士班))課程。

Course Topics: Oracle Database 12c: Backup and Recovery

Introduction

Getting Started

Configuring for Recoverablility

Using the RMAN Recovery

Catalog

Backup Strategies and

Terminology

Performing Backups

Improving Your Backups

Using RMAN-Encrypted Backups

Diagnosing Database Failures

Restore and Recovery Concepts

Performing Recovery

RMAN and Oracle Secure

Backup

Performing Tape Backups and

Restores

Using Flashback Technologies

Using Flashback Database

Managing Backup Space or

Transporting Data

Duplicating a Database

RMAN Performance and Tuning

Backup and Recovery Workshop

Migrating Data by Using Oracle

Data Pump

Course Topics: Oracle Database 12c: Managing Multitenant Architecture

Introduction

Container and Pluggable Database Architecture

CDB and PDB Creation

Managing a CDB and PDBs

Managing Storage in a CDB and PDBs

Managing Security in a CDB and PDBs

Managing Availability

Managing Performance

Miscellaneous

Oracle Database Cloud Service: Overview

Course Topics: Oracle Database 12c: Install and Upgrade Workshop

Oracle Database 12c Overview

Installing Oracle Grid Infrastructure for a Standalone Server

Installing Oracle Database Software

Creating an Oracle Database by Using DBCA

Using Oracle Restart

Introduction to Upgrading to Oracle Database 12c

Preparing to Upgrade to Oracle Database 12c

Upgrading to Oracle Database 12c

Performing Post-Upgrade Tasks

Migrating Data by Using Oracle Data Pump

上課教材

Oracle University 原版教材 1. Maria Billings and Donna Keesling, Oracle Database 12c: Backup and

Recovery Workshop , Volume 1 Student Guide, D78850GC20, Edition 2.0,

March 2015.

2. Maria Billings and Donna Keesling, Oracle Database 12c: Backup and

Recovery Workshop , Volume 2 Student Guide, D78850GC20, Edition 2.0,

March 2015.

3. Maria Billings and Donna Keesling, Oracle Database 12c: Backup and

Recovery Workshop , Activity Guide, D78850GC20, Edition 2.0, March 2015.

4. Maria Billings and Donna Keesling, Oracle Database 12c: Managing

Multitenant Architecture, Student Guide, D78850GC20, Edition 2.0, March

2015.

5. Maria Billings and Donna Keesling, Oracle Database 12c: Managing

Multitenant Architecture, Activity Guide, D78850GC20, Edition 2.0, March

2015.

上課教材

Oracle University 原版教材 1. Maria Billings and Donna Keesling, Oracle Database 12c: Install and

Upgrade Workshop, Student Guide, D78850GC20, Edition 2.0, March 2015.

2. Maria Billings and Donna Keesling, Oracle Database 12c:Install and

Upgrade Workshop, Activity Guide, D78850GC20, Edition 2.0, March 2015.

參考資料 (理論)

參考書

Sam Lightstone, Toby Teorey, Tom Nadeau, Physical

Database Design: the database professional's guide to

exploiting indexes, views, storage, and more, Morgan

Kaufmann , 2007.

Stanford University Course

CS 245 Database System Principles

http://www.stanford.edu/class/cs245/

參考資料 (實務)

劉郁芳,曾祥信譯。Oracle Database 10g Linux

系統管理專家,學貫,2006。 http://www.xbook.com.tw/book/book.php?keyword=R935

何致億著。 Oracle9i實務管理講座-系統核心篇,美商麥格羅‧希爾,2002 http://www.books.com.tw/exep/prod/booksfile.php?item=001020

9066

Oracle實務觀念建立

Oracle管理之道

張天慧

Oracle為全球市占率最高的企業級商用資料庫軟體,本書內容提煉自作者多年的DBA實務,完整涵蓋身任企業資料庫管理職責者所應具備的知識與技能,提供所有深受巨型資料庫之苦的DBA,最佳的指引與經驗傳授。

38

Oracle實務觀念建立

張天慧,Oracle資料庫管理與維護,悅知文化,2008。

張先生現任職華碩集團昌碩科技(上海)有限公司DBA,曾任華碩電腦DBA、NCR專業顧問、台灣積體電路約聘DBA、遠傳電信DBA,以及和信電信DBA,具有美商甲骨文OCP

(Oracle Certified Professional)認證資格,並擁有8年以上資料庫開發與DBA經驗。

修這門課所需的額外費用

列印三份教材的費用,大約NT800元。

如果你要參加認證的話,認證考試費用為150

美金打˙75折(150 ×0.75 = 125),為125美金(台幣3,885元)。

最後,我想說的…

你為什麼要修這門課?

你對未來的生活有什麼期待嗎?

資料來源:iThome 2010年 IT人現況大調查,http://www.ithome.com.tw/itadm/article.php?c=63519

2013-03-21 在104的工作(1/2)

2013-03-21 在104的工作(2/2)

如何達成目標

在我看來沒有捷徑

將一件簡單的事做到極致就是絕招

你願意「十年磨一劍」嗎?

學習專業能力之外,理論也一樣重要

知其然,更要知其所以然

理論只有學校學得到

用經驗解決問題?

或是用知識解決問題?

產品的使用方式隨時都可能改變,但是理論不容易變

理論是內力,運用產品則是招式。

小無相功 + 少林寺七十二項絕技(天龍八部鳩摩智)

重要的理論知識

有關資料庫

資料庫 三層架構

關連式資料模型

資料的儲存方式

B+ tree

查詢處理

資料復原

並行控制

有關作業系統

程序管理

記憶體管理

磁碟機管理

一個好的DBA一定要有好的作業系統觀念,也要對資料庫實體層上的議題,有相當程度的了解。

請仔細研讀作業系統。

想了解資料庫實體層上的議題,請修習高等資料庫系統

最後

冬夜讀書示子聿

古人學問無遺力,少壯功夫老始成

紙上得來終覺淺,絕知此事要躬行

南宋陸游(放翁)

有任何問題嗎?