Your SlideShare is downloading. ×
0
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Overview of oracle database
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Overview of oracle database

766

Published on

Published in: Education, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
766
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
55
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • 1. 인사말 2. 강사소개 3. 강의 목적
  • 1. Architecture 의 중요성 2. Oracle8(TM) Server 와 Oracle8(TM) Server Enterprise Edition 의 차이 - Oracle8(TM) Server : Oracle Workgroup Server 의 대체명 . - Oracle8(TM) Server Enterprise Edition : Oracle7 Server 의 대체명 . 전사급의 OLTP 나 DW 와 같은 애플리케이션을 위해 강력한 인상을 줄 수 있도록 ” Enterprise ” 를 명칭에 삽입 ..
  • 1. Architecture 의 중요성 2. Oracle8(TM) Server 와 Oracle8(TM) Server Enterprise Edition 의 차이 - Oracle8(TM) Server : Oracle Workgroup Server 의 대체명 . - Oracle8(TM) Server Enterprise Edition : Oracle7 Server 의 대체명 . 전사급의 OLTP 나 DW 와 같은 애플리케이션을 위해 강력한 인상을 줄 수 있도록 ” Enterprise ” 를 명칭에 삽입 ..
  • 1. 오라클이란 ? 2. 오라클의 Overview 3. SGA 란 , SGA 의 구성요소 3 가지와 SGA 의 역할 4. Background Process 에 대해 ( 역할과 어떤것이 있는지 ) 5. Instance = SGA + Background Process 6. Server Process/User Process 7. File 의 구성요소와 간단한 역할 1) Fixed size 이 부분은 백그라운드 프로세스가 access 하는데 필요한 일반적인 정보를 포함하고 있는 부분으로서 user data 는 없으며 parameter 로 크게 또는 작게 지정 할 수 없다 . 따라서 항시 instance 내에서 일정한 크기를 갖으며 버젼별 ,os 별로 약간의 차이는 있다 . 2) Variable size 이 size 는 parameter file(initSID.ora) 의 SHARED_POOL_SIZE 에서 지정한 크기와 각종 파라미터로 지정한 값의 합으로 결정된다 . SHARED_POOL_SIZE 는 byte 단위로 지정하며 OS 의 shared memory segment 보다는 작아야 한다 . InitSID.ora file 에는 instance 와 관련된 여러 parameter 가 지정되어 있는데 이곳의 parameter 의 지정 값에 따라서 SGA 의 영역에 일정한 부분을 차지한다 . 따라서 SGA 의 크기에 영향을 주는 요소는 단순히 SHARED_POOL_SIZE 이외에 각종 parameter 에 의해 점유되는 부분을 고려해야 한다 . 일반적으로 각 parameter 값을 크게 할 수록 메모리 사용은 일정한 비율로 늘어나며 다음은 몇가지 예이다 . *DB_FILES - 10 증가시 약 6K 소모 *DML_LOCKS - 100 증가시 9.7K 소모 *PROCESSES - 10 증가시 19.5K 소모 *SEQUENCE_CACHE_ENTRIES - 10 증가시 약 1.17K 증가 *ROW_CACHE_ENQUEUES - 100 증가시 약 3.5K 증가 *SESSIONS - 10 증가시 약 5.3K 증가 : : 현재 각 parameter 에 의해 점유된 SGA 내의 점유된 메모리 영역의 크기는 V$SGASTAT 에서 조회하여 볼 수 있다 .(select * from v$sgastat;)
  • 3) Database Buffer Cache SGA 에서 disk 의 data 가 저장되는 곳으로서 performance 에 큰 영향을 준다 . 이곳의 size 가 작으므로 발생 할 수 있는 현상은 빈번한 disk i/o 이다 . 크기는 DB_BLOCK_BUFFERS 로 지정하며 buffer 의 갯수를 지정한다 .byte 산정은 DB_BLOCK_BUFFERS * DB_BLOCK_SIZE 로 산출된다 . 4) Log Buffers 이것은 redo log 용도로 사용될 메모리 내의 log buffer size 를 말 한다 . 크기는 byte 단위로 LOG_BUFFERS 로 지정한다 . 1. SGA 의 특징 - data 와 control information 을 저장한다 . - SGA 는 non-paged, non-swapped memory - 전체 메모리에 1/3 정도로 구성한다 . 2. 오라클 기본 메모리 구조 - software code areas : 실행되고 있거나 실행될 오라클을 위한 코드가 저장되는 곳 - the system global area (SGA) the database buffer cache, the redo log buffer, the shared pool - program global areas (PGA) : 프로세스 (Server,background) 에 대한 data 와 control 정보를 담고있다 .( stack areas, data areas ) - sort areas (SORT_AREA_SIZE 에서 지정 ) 3. Shared Pool 의 구성과 역할 - Identical SQL 문 (by Hashing algorithm)
  • 1. Dirty List : 변경은 되었으나 아직 디스크에는 반영안된 dirty buffer 를 가지고 있음 2. LRU List : 다음 3 가지로 구성되어 있다 . - Free Buffer : 사용가능 - Pinned Buffer : 현재 사용중 - Dirty Buffer : update 로 locking 되어진 상태 (Dirty List 로 옮겨지지 않은 버퍼 )  Dirty Buffer => Dirty List 로 간다 . * LRU end MRU end <---------------------------------------------------------------------> ----> free buffer 를 찾는다 . 사용하면 MRU end 로 보낸다 dirty buffer 를 만나면 dirty list 로 보낸다 .
  • - Can be by bypassed using the UNRECOVERABLE keyword in the CREATE TABLE, CREATE INDEX statement - Can be bypassed by the Oracle data loader - Recovery 를 위해 - Update, Delete, Insert 순으로 저장크기 - If an instance failure occurs, the redo log files are used to recover the modified data that was in memory. - These files are only used for recovery
  • 1. Background Process 의 종류 - PMON, SMON, DBWR, LGWR : mandatory processes - 위 4 개중 어느 하나가 죽어도 instance 는 죽는다 : Instance Restart - the other processes are optional 2. Server Process/User Process 3. Legend - LCKn : Lock process (parallel server system 에서 Instance 간의 locking 담당 ) - RECO : Recoverer process ( 분산 트랜잭션에 대한 failure 해결 ) - PMON : Process monitor - SMON : System monitor - CKPT : Checkpoint - ARCH : Archiver - DBWR : Database writer - LGWR : Log writer - Pnnn : Parallel processes - SNPn : Snapshot process (Replication)  Background Process 참조 (P51)
  • 1. Properties LGWR - 1 개의 인스턴스에는 1 개의 LGWR 이 있다 - Transaction 이 redo log file 에 기록된 후에 Commit 이 마무리된다 . ( 왜 ? 인스턴스 failure 대비 ) - 한 User 가 Commit 을 한후 LGWR flush 를 하기전 다른 유저가 commit 을 할 경우 commit 당 I/O 의 비율을 줄이기 위해 piggyback 된다 . ( 계속수행하고 에러발생시 재처리한다 ) - Long Transaction 일경우 1/3 이 차면 redo log buffer 를 비운다 . 2. Log Switch - log switch : LGWR 은 현재 redo log group => 다음 redo log write - log switch 시에는 check point 가 자동으로 수행된다 - Redo log 가 다 찾을경우 , DBA 가 직접 “ ALTER SYSTEM SWITCH LOGFILE” - 1 개의 멤버라도 괜챤으면 계속수행된다 . 3. Log Sequence #
  • * PMON 의 역할중 clean-up alter system kill session ‘ , ‘ => serial# 증가하는 경우
  • 0. When Do Checkpoint - every log switch - LOG_CHECKPOINT_TIMEOUT - LOG_CHECKPOINT_INTERVAL - instance shutdown (not abort) - ALTER SYSTEM CHECKPOINT (by DBA) - tablespace offline while at least one of its files is online 1. RECO : 분산 트랜잭션에 대한 Failure 시 해결한다 2. LCKn : Parallel Server system 에서 인스턴스간의 locking 을 담당한다 . 3. Pnnn ( Parallel Query process) : parallel query, parallel index creation, parallel data loading, parallel CREATE TABLE AS SELECT 4. SNPn (Snapshot process) : Automatic refreshes of snapshot (read-only replicated tables), the server job queues and replication queues 5. QMNn (Queue Monitor) : message queue 를 모니터 하는 Oracle Advanced Queuing 을 위한 프로세스 <Options> 1. The parallel query option 별도라이센스 2. The procedural option is required for snapshots. It is included with the Oracle7 licensed product. 3. The distributed option is required for distributed transactions. 별도 라이센스 4. The replication option 별도 라이센스
  • 1. Single Task, Two-Task - Single-Task : User(Application Code) 와 Server(Oracle Server Code) 가 하나의’ Process Batch 성 작업에서 30% 정도의 향상효과가 있다 . Re-make 해 주어야한다 .
  • 1. 각 파일의 기능과 역할 - Datafile : Database 의 모든 data 를 저장하는 곳이다 . Table, Index 와 같은 Logical 구조를 물리적으로 저장하는 곳이다 . - Redo Log Files : Recovery 를 위해존재한다 . 데이타베이스를 변경하는 모든 변화를 record 단위로 기록한다 . 적어도 2 개의 redo log group 이 있어야하며 , 그룹당 2 개이상의 멤버 각 그룹의 멤버는 같은 Size 와 같은 내용을 갖는다 . 모든 그룹의 멤버의 개수는 갖다 . - Control File : 데이타베이스의 물리적인 구조와 데이타베이스 Status 등을 저장한다 . Database file, log file, database name, Synchronization information 서로 다른 disk 에 적어도 2 개 이상을 갖도록 한다 . - Parameter File : 뒤 참조 - Alert File : chronological log of message and errors internal error (ORA-600), block corruption error(ORA-1578), dead lock errors(ORA-60), DDL, Server Manager statement(startup, shutdown..) BACKGROUND_DUMP_DEST - Trace File : 에러발생시 BACKGROUND_DUMP_DEST, USER_DUMP_DEST 2. Control file 은 다음과 같은 경우에 다시 생성한다 . . CONTROL FILE 이 손상되었는데 , 이용 가능한 BACKUP FILE 이 없을 경우 . 데이타베이스 이름을 변경할 경우 . DATA FILE, LOG FILE 의 MAX 갯수를 확장할 때  alter database backup controlfile to trace noresetlogs;
  • 1. Physical storage structure - Datafile : a physical datafile belonging to a single tablespace - Segment : a set of one or more extents that contains all the data for a specific structure within a tablespace - Extents : a set of contiguous data blocks in a database - Block : multiple physical file blocks allocated from an existing datafile 2. Logical storage structure - Tablespace : a logical repository for physically grouped data - Table / Clusters / Indexes
  • < Tablespace > 1. 각 tablespace 는 여러 개의 OS 파일을 가질수 있다 . 2. Tablespace 는 database 가 돌고있는 중에 online 할수 있다 . 3. SYSTEM, RBS 을 제외한 tablespace 는 offline 할 수 있다 . 4. Read-write <=> Read-only 변환 가능 5. 해당 tablespace 에 생성된 오브젝트는 다른 테이블스페이스에 할당되지 않는다 . <Tablespace Uses> 1. Controlling space allocation and assign space quotas to users 2. 각 tablespace 를 online, offline 하여 관리 3. Data storage 를 분산하면 I/O 경합이 줄어 효율이 향상될 것이다 . 4. 부분 backup 과 부분 recovery 가 가능하다 . 5. Static data 에 대해 read-only tablespace 로 할 수 있다 . < SYSTEM tablespace> 1. Database operation 을 위해 필요함 2. Data dictionary 정보 , stored procedures/package/trigger 의 definition 3. SYSTEM rollback segment 4. Can contain user data
  • < Non-system Tablespace > 1. Database 관리상 편하다 2. Rollback segment, temporary segment, application data/index, user space 3. Rollback segment tablespace 4. Temporary Tablespace : 영구적인 data, index 는 저장안함 , dba 가관리 ( V$SORT_SEGMENT ) 5. Resizing datafile (AUTOEXTEND option) 6. Read-only tablespace : online, no active tx, no active rbs, not online backup
  • 1. Block 의 구조 자세히 - Header : general block information - Table directory : information about the table - Row directory : row information about the actural rows in the block (1row 당 2bytes) - Free space : for insert or updates of rows, or for additional transaction entries - Row data : stores table or index data 2. Space Management Parameters - PCTFREE : udpate 를 위해 비워두는 공간 (default 10) - PCTUSED : pctused 밑으로 내려가면 freelist 에 등록되어 새로운 row insert(40) - INITRANS : block header 에 처음 할당되는 tx entries 의 개수 ( 각 tx entry 는 23bytes) - MAXTRANS : block 에 동시에 access 할 수 있는 tx 의 개수 (255 개까지 ) block 의 free space 를 사용한다 . 즉 , tx 이 많을 경우 pctfree 를 늘린다 3. Chaning and Migration - Analyze table table_name list chained rows; - utlchain.sql (create chained_rows)
  • 1. PCTFREE ={ (max# bytes per rows) - (#bytes inserted per rows) } / (max# of bytes per row) * 100 2. default : pctree 10, pctused 40 3. pctfree + pctused < 100 (90% recommanded) 4. Example (1) Setting a Lower PCTFREE - block 사용율을 높인다 ( 사용될 블럭의 수를 줄인다 ) - block reorg 로 인해 process cost 가 는다 - row migration 가능성이 높다 (2) Setting a Higer PCTFREE - update 를 위해 여유공간을 많이 둔다 ( 사용될 블럭의 수가 많이든다 ) - block reorg 가 필요없어서 process cost 가 적다 - chain row 를 줄일수 있다 (3) Setting a Lower PCTUSED - block 이 free 될 가능성이 작아 process cost 를 줄인다 - unused space 가 많아 진다 (4) Setting a Higher PCTUSED - block 이 free 될 가능성이 높아 process cost 가 는다 - space usage 가 높아진다
  • 1. Storage Parameter - INITIAL : 5 blocks NEXT : 5blocks MAXEXTENTS - MINEXTENTS PCTINCREEASE OPTIMAL - FREELISTS FREELIST GROUPS(OPS) 2. Storage Parameter 가 쓰이는 곳 - table, clusters, indexes, rollback segments, tablespaces(default setting only) 3. Object level > tablspace level > system level 4. initial -> next -> next*(1+pctincrease/100)
  • 1. 각각의 Segment 역할
  • Parallel Server - Transparent Application Failover, Global fixed views, Performance enhancements RDBMS - Recover Manager, Index Only Table, Reverse Key Indexes, New ROWID Format - Password Management, Deferred Constraints Check - Raised Size Ceiling, Migration Utility, Rename index, Enforced Constraints - Enhanced Character set support, Unicode support, SQL*Loader API - Query Process Monitor Distributed - Networking, Heterogeneous Services Replication - Primary Key Snapshot, Parallel Propagation, Replicated LOB <Oracle8 Summary> 1. Oracle8 meets the needs of VLDB and OLTP environments 2. Object technology is available in the Oracle8 Server 3. Network Computing Architecture provides a comprehensive framework for the future of computing
  • Transcript

    • 1. Overview of Oracle Database Samar K Prasad Lead DBA
    • 2. Part 1. Introduction to Database System
      • Introduction to Database
      • History of RDBMS
      • Entity-Relationship Modeling
      • Database Language
    • 3. Introduction to Database
      • File-Based Approach
        • Each program defines and manages its own data
        • Limitation
          • Separation and isolation of data
          • Duplication of data
          • Data dependence
          • Incompatibility of files
          • Fixed queries/proliferation of application program
      • Database Approach
        • A shared collection of logically related data, designed to meet the information needs of an organization
    • 4.
      • Database Management System(DBMS)
        • A software system that enables users to define, create and maintain the database and provides controlled access to database
          • DDL
          • DML : procedural, non-procedural
          • Control : security, integrity, concurrency control,
              • recovery control, user-accessible catalog
      • Components of the DBMS Environment
        • Hardware - Software - Data - Procedures - People
    • 5.
      • Advantages of DBMS
        • - Control of data redundancy - Economy of scale
        • - Data consistency - Balance of conflicting requirements
        • - More information from the same amount of data
        • - Sharing of data - Improved data accessibility and responsiveness
        • - Improved data integrity - Increased productivity
        • - Improved security - Improved maintenance through data independence
        • - Enforcement of standards - Increased concurrency
        • - Improved backup and recovery services
      • Disadvantages of DBMS
        • - Complexity, Size, Cost of DBMSs, Additional H/W costs
        • - Cost of conversion, Performance, Higher impact of a failure
    • 6.
      • Three-Level Database Architecture
        • External Level
          • The users’ view of the database
        • Conceptual Level
          • The community view of the database
        • Internal Level
          • The physical representation of the database on the computer
    • 7.
      • Functions of a DBMS
        • 1. Data storage, retrieval, and update
        • 2. A user-accessible catalog
        • 3. Transaction support
        • 4. Concurrency control services
        • 5. Recovery services
        • 6. Authorization services
        • 7. Support for data communication
        • 8. Integrity services
        • 9. Services to promote data independence
        • 10. Utility services
    • 8.
      • Components of a DBMS
      Application Programs Queries Database Schema DML preprocessor Query processor DDL compiler Program object code Database manager Dictionary manager Access methods File manager System buffers DBMS Programmers Users DBA Database and system catalog
    • 9.
      • Components of Database Manager
      Authorization control Integrity checker Command processor Query optimizer Transaction manager Scheduler Buffer manager Recovery manager Data Manager
    • 10. History of RDBMS
      • History of DBMS
        • 1960s - Apollo moon-landing project, GUAM
        • mid 1960s - IMS by IBM (hierarchical DBMS)
        • mid 1960s - IDS by GE (network DBMS)
        • 1965 - CODASYL(Conference on Data SYStems Language)
        • 1967 -DBTG(Data Base Task Group)
        • 1970 - E.F.Codd of the IBM Research Lab.
        • Late 1970s - System R project at IBM
        • 1980s - commercial relational DBMS(DB2, Oracle, Informix..)
        • Now - OODBMS, ORDBMS
    • 11.
      • Terminology
        • Relation : a relation is a table with columns and rows
        • Attribute : an attribute is a named column of a relation
        • Domain : a domain is the set of allowable values for one or more attributes
        • Tuple : a tuple is a row of a relation
        • Degree : the degree of a relation is the number of attributes it contrains
        • Cardinality : the cardinality of a relation is the number of tuples it contains
        • Relational database : a collection of normalized relation
    • 12.
      • Properties of Relations
        • The relation has a name that is distinct from all other relation names
        • Each cell of the relation contains exactly on atomic value
        • Each attribute has a distinct name
        • The values of an attribute are all from the same domain
        • The order of attributes has no significance
        • Each tuple is distinct; there are no duplicate tuples
        • The order of tuples has no significance, theoretically
    • 13.
      • When is a DBMS Relational?
        • Foundational rules
          • Rule 0 : Foundational rule Rule 12 : Nonsubversion rule
        • Structural rules
          • Rule 1 : Information representation Rule 6 : View updateing
        • Integrity rules
          • Rule 3 : Systematic treatment of null values Rule 10 : Integrity independance
        • Data manipulation rules
          • Rule2 : Guaranteed access Rule 4 : Dynamic online catalog based on the relational model
          • Rule5 : Comprehensive data sublanguage Rule7 : High-level insert, update, delete
        • Data independence rules
          • Rule8 : Physical data independence Rule 9 : Logical data independence
          • Rule11 : Distribution independence
    • 14. Entity-Relationship Modeling
      • Concepts of the E-R Modeling
        • Entity Types
        • An object or concept that is identified by the enterprise as having an independent existence
        • Attributes
        • A property of an entity or a relationship type
        • Relationship Types
        • A meaningful association among entity types
    • 15.
      • Normalization
        • A technique for producing a set of relations with desirable properties, given the data requirements of an enterprise
        • UNF is a table that contains one or more repeating groups
        • 1NF is a relation in which the intersection of each row and column contains one and only one value
        • 2NF is a relation that is in 1NF and every non-primary-key attribute is fully functionally dependent on the primary key.
        • 3NF is a relation that is in 1NF, 2NF in which no non-primary-key attribute is transitively dependent on the primary key
        • BCNF is a relation in which every determinant is a candidate key
        • 4NF is a relation that is in BCNF and contains no trivial multi-valued dependency
        • 5NF is a relation that contains no join dependency
    • 16.
      • Conceptual Database Design
        • The process of constructing a model of the information used in an enterprise, independent of all physical considerations
      • Logical Database Design
        • The process of constructing a model of the information used in an enterprise based on a specific data model, but independent of a particular DBMS and other physical considerations.
      • Physical Database Design
        • The process of producing a description of the implementation of the database on secondary storage; it describes the storage structures and access methods used to archieve efficient access to the data
    • 17. Database Language
      • SQL
        • 1974 - SEQUEL by D.Chamberlin (IBM)
        • 1975 - SQUARE by Boyce (System R project)
        • 1976 - SEQUEL/2 (SQL) by Chamberlin and Boyce)
        • late 1970 - SQL(Oracle), QUEL(Ingres)
        • 1982 - Relational Database Language(RDL) : ANSI
        • 1987 - ISO standard
        • 1989 - Integrity Enhancement Feature (ISO)
        • 1992 - SQL2(SQL92) : ISO
    • 18.
      • DML
        • SELECT
        • INSERT
        • UPDATE
        • DELETE
      • DDL
        • CREATE(DROP) SCHEMA
        • CREATE(ALTER, DROP) DOMAIN
        • CREATE(ALTER, DROP) TABLE
        • CREATE(DROP) VIEW
        • CREATE(DROP) INDEX
    • 19.
      • Advanced SQL
        • View
        • Integrity Enhancement Feature
          • Primary key
          • Unique
          • Foreign key
        • Access Control
        • Embedded SQL
        • Host Language Variables
        • Application Programming Interface
        • Dynamic SQL
    • 20. Part 2. Understanding Oracle Database
      • Overview of oracle Database Architecture
      • Memory Structure
      • Process Structure
      • Storage Structure
      • New Features
    • 21. Overview of Oracle Architecture SGA KByte 1,200,000 KByte KByte 2,100 KByte PMON LGWR ARCH TL-812 Archive Log Mode(50M) * Fixed Size : 70 Kbyte * Variavle Size : 490 MByte 4,000,000 KByte * Total SGA Size : 1700 Mbyte DBW0 CKPT SMON RECO D000 S000 P000 Shared SQL Area Database Buffer Cashe Redo Log Buffer Data File Raw Device Server USER
    • 22. Memory Structure : Shared Pool Shared Pool Library Cache Dictionary Cache Control Structures for example: Character Set Conversion Memory Network Security Attributes and so on ..
      • Shared Pool Contents
      • - Text of the SQL or PL/SQL statement
      • - Parsed form of the SQL or PL/SQL statement
      • - Execution plan for the SQL or PL/SQL
      • statements
      • - Data dictionary cache containing rows of data
      • dictionary information
      • Library Cache
      • - shared SQL area
      • - private SQL area
      • - PL/SQL procedures and package
      • - control structures : lock and library cache handles
      • Dictionary Cache
      • - names of all tables and views in the database
      • - names and datatypes of columns in database tables
      • - privileges of all Oracle users
      • SHARED_POOL_SIZE
      Reusable Runtime Memory Shared SQL Area PL/SQL Procedures and Package Control Structures for examples; Locks Library Cache handles and so on ...
    • 23. Memory Structure :Database Buffer Cache
      • Database Buffer Cache holds copies of data blocks read from disk
      • All users concurrently connected to the system share access to the buffer cache
      • Dirty List
      • LRU List
      • Size = DB_BLOCK_SIZE * DB_BLOCK_BUFFERS
      SGA Shared Pool Shared SQL Area Database Buffer Cache
    • 24. Memory Structure :Redo Log Buffer
      • Circular buffer containing information about changes made to the database
      • save it redo entry
      • Redo Entries is used when Database Recovery
      • DBWR write contents of Redo Log Buffer to Online Redo Log
      • LOG_BUFFER
      change vector #1 change vector #1 change vector #1 redo record
    • 25. Oracle Processes Snnn Dedicated Server Process Users DBWR SGA Database Buffer Cache Redo Log Buffer Data Files Redo Log Files Control Files Offline Storage Device LCK0 RECO PMON SMON CKPT User Process Dnnn LGWR ARCH SNPn Pnnn
    • 26. Background Process
      • DBWR (Database Writer)
      • - write all dirty buffers to datafiles
      • - Use a LRU algorithm to keep most recently used blocks in memory
      • - Defers write for I/O optimization
        • dirty list reaches a threshold length
        • A process scnas a specifed number of buffer in the LRU without finding free buffer
        • A time-out occurs
        • DBWR checkpoint occurs
      • LGWR (Log Writer)
      • - writes redo log entries to disk
        • Commit occurs
        • The redo log buffers pool becomes one-third full
        • DBWR completes cleaning the buffer blocks at a checkpoint
        • LGWR time-out
      • - A commit confirmation is not issued until the tx has been recorded in the rego
      • log file
    • 27. Cont’d
      • PMON (Process Monitor)
      • - Cleans up abnormally terminated connection
      • - Rolls back uncommited transactions
      • - Releases locks held by a terminated process
      • - Frees SGA resources allocated to the failed processes
      • - Database maintenance
      • SMON (System Monitor)
      • - Performs automatic instance recovery
      • - Reclaims space used by temporary segments no longer in use
      • - Merges contiguous area of free space in the datafile
    • 28. Cont’d
      • CKPT (Check Point)
      • - is enabled by setting the parameter CHECKPOINT_PROCESS=TRUE
      • - If enabled, take over LGWR’s task of updating files at a checkpoint
      • - Updates header of datafiles and control files at the end of checkpoint
      • - More frequent checkpoint reduce recovery time from instance failure
      • - CKPT improve the performance of database with many database files
      • ARCH (Archiver)
      • - Copies redo log files to tape or disk for media failure
      • - Operates only when a log switch occurs
      • - Is optional and is only needed when in ARCHIVELOG mode
      • - May write to a tape drive or to a disk
      • LCKn (Lock), Dnnn (Dispatcher), Snnn (Server),
      • RECO (Recover), Pnnn (Parallel), SNPn (Job Queue),
      • QMNn (Queue Monitor),
    • 29. Server/User Process
      • User Processes
      • - A user process is used when a user runs an application program
      • - Runs the tool/application and is considered the client
      • - Passes SQL to the server process and receives the results
      • Server Processes
      • - A server process must place the data in the database buffer cache
      • - Parce and execute SQL statements
      • - Read data blocks from disk into the shred database buffers of the SGA
      • - Return the results of SQL statements to the user process
        • Parse : check syntax, security access, object resolution, optimization
        • Execute : applies the parse tree to the data, perform a physical read and change
        • Fetch : Passes data to the user (only SELECT)
    • 30. Oracle Files
      • Datafile
      • Redo Log Files
      • Control Files
      • Parameter File
      • Archive File
      • Log File (alert*.log, sqlnet.log, listener.log...)
      • Trace File
    • 31. Storage Architecture
      • Physical storage structures
        • Data files
        • Segments
        • Extents
        • Blocks
      • Logical storage structures
        • Tablespaces
        • Tables / Clusters / Indexes
        • Rows
        • Columns
    • 32. Physical Storage Architecture
      • Relationship among Segments, Extents, and Blocks
      Extent 24K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K 2K Extent 72K Segment 96K Database Blocks
    • 33. Logical Storage Architecture
      • Relationship between tablespaces and datafiles
      USER Tablespace System Tablespace Database DATA3.ORA DATA1.ORA DATA2.ORA
    • 34. Cont’d
      • Objects stored in tablespaces
      Table Table Table INDEX INDEX INDEX INDEX INDEX INDEX INDEX INDEX INDEX INDEX Tablespace (one or more datafiles) Database Files (Physical structures associated with only one tablespace) Objects (stored in tablespace may span serveral datafiles)
    • 35. Block General Block Information (Block add, Segment type) 85 ~ 100 bytes Table info in Cluster Row info in Block (2 byte per row) using when New Row Insert or Update (pctfree, pctused) Table or Index Data Header Table Dictionary Row Dictionary Free Space Row Data
    • 36. PCTFREE / PCTUSED PCTFREE 20% Free space PCTUSED PCTFREE = 20 PCTUSED = 40 61% Free space
      • Insert new row until 80%
      • 20% use when Update
      • Can insert new row when below 60%
      • When Usage is below 40% (61% Free
      • space), block is listed in FREELIST
    • 37. Extent
      • A set of contiguous database blocks within a datafile.
      • Extent are allocated when.
      • - The segment is created (INITIAL EXTENT)
      • - The segments grows (NEXT EXTENT)
      • - The table is altered to allocate extents.
      • Extent are de-allocated when the
      • - The segment is dropped and truncated.
      • - The segment is larger than optimal and contains free extents
      • (for rollback segments only)
      • Each segment is created with at least on extend( initial extent )
      • ( Rollback segment : 2)
      • ALTER TABLE table_name DEALLOCATE UNUSED
    • 38. Segment
      • a set of one or more extents that contains all the data for a specific type of logical storage structure within a tablespace
      • Data Segment
      • - A collection of extents that holds all of the data for a table or a cluster
      • Index Segment
      • - A collection of extents that holds all of the index data for search optimization on large tables and clusters
      • Rollback Segment
      • - A collection of extents that holds rollback data for rollback, read-consistency, or recovery
      • Temporary segment
      • - A collection of extents that holds data belonging to temporary tables created during a sort operation
      • Bootstrap segment
      • - An extent that contains dictionary definitions for dictionary tables to be loaded when the database is opened.
    • 39. Oracle8 New Feature VLDB, Warehouse Parallel DML Parallel Index Scans Star Query Optimization OLTP Objects Advanced Queuing XA rewrite Memory reduction Serially reusable memory New OCI Interface Improve Function Performance Partitioning Parallel Backup/Recovery Incremental Backup Point-in-time Recovery Object Relational Database Object Type Object View Network Computing Simple User Integration Simple Maintenance Simple Development
    • 40. Oracle8i New Features Data Warehousing OLTP Application Development Security
      • Summary management
      • Analytic function
      • Hash and Composite Paritioning
      • Resource Management
      • Transportable tablespace
      • Functional index, virtual column
      • Publish and subscribe capabilities
      • Database event trigger
      • Single table hash cluster
      • Object type column in partition table
      • Partitioned index-organized table
      • Stable optimizer execution plans
      • Oracle Jserver, VM in Database
      • Java stored procedure, function..
      • SQLJ: embedded SQL in Java
      • WebDB
      • Virtual Private Database
      • LDAP integration
      • N-tier authentication/authorization
      • SSL and X.509v3, RAIDUS support
      • Data encrypt, decrypt
    • 41. Oracle 9i - The eBusiness Platform
      • Oracle9i continues Oracle8i's focus on the Internet by providing a series of specific capabilities and product bundles targeted at eBusiness environments. In addition, Oracle9i continues to add features and capabilities that extends existing investment in mission-critical infrastructure. Oracle9i has been designed with focus on certain key development areas.
      Key Infrastructure Area
      • Availability
      • Scalability and Performance
      • Security
      • Development Platform
      • Manageability
      • Windows2000 Integration
      Key Application Area
      • Internet Contents Management
      • B2B and B2C eBusiness
      • Packaged Application
      • Business Intelligence
    • 42. Oracle Client/Server Architecture NETWORK Server A Server b Client Application Server/Server Client/Server
      • Benefit of Client/Server Component
      • - Database S/W work on Server
      • - Minimize network resource
      • - concurrency, consistency, transparency
      - Only Server upgrade to increase size - Minimize Client H/W spec - concurrency, consistency, transparency
    • 43. SQL*Net
      • What is SQL*Net?
      • - Oracle’s Client/Server middleware product
      • - transparent connection from client tool to DB ( from on DB to another )
      • - works across multiple network protocol and operation system
      • What is TNS?
      • - Transparent Network Substrate
      • - Oracle’s Network applications to access the underlying network protocols transparently
      • - TNS-based application, Oracle Protocol Adapters, Network software like TCP/IP
      • Configuration File
      • - TNSNAME.ORA ( Client )
      • - TNSNAV.ORA ( Client )
      • - SQLNET.ORA ( Client, Server )
      • - LISTENER.ORA ( Server )
    • 44. SQL*Net Configuration
      • TNSNAME.ORA
      • info =
      • (DESCRIPTION=
      • (ADDRESS_LIST=
      • (ADDRESS=
      • (PROTOCOL=tcp)
      • (HOST=brinfoa01)
      • (PORT=1521)
      • )
      • )
      • (CONNECT_DATA=
      • (SID=BRBINFO1)
      • )
      • )
      • LISTENER.ORA
      • LISTENER=
      • (ADDRESS_LIST=
      • (ADDRESS=
      • (PROTOCOL=tcp)
      • (HOST=brinfoa01)
      • (PORT=1521)
      • )
      • )
      • SID_LIST_LISTENER=
      • (SID_LIST=
      • (SID_DESC=
      • (SID_NAME=BRBINFO1)
      • (ORACLE_HOME=/oracle7/oracle7)
      • (ENVS='EPC_DISABLED=TRUE')
      • )
      • )
      • STARTUP_WAIT_TIME_LISTENER=0
      • CONNECT_TIMEOUT_LISTENER=0
      • LOG_DIRECTORY_LISTENER=/oracle7/oracle7/network/log
      • LOG_FILE_LISTENER=listener
      • TRACE_LEVEL_LISTENER=OFF
      • SQLNET.ORA
      • # SQLNET.EXPIRE_TIME = 0
      • SQLNET.AUTHENTICATION_SERVICES=(none, beq)
    • 45. Net8
      • Networking Challenge
      • Support large mission-critical client/server, and provide migration path towards distributed object architecture
      • Net8 Focus
        • 1. Scalability : Connection Pooling, Multiplexing(Connection Manager)
        • 2. Manageability : Configuration-free installation option,
        • Centralized client administration, Automated client configuration
        • 3. Security : Oracle Security Server
    • 46. ODBC / oo4o / JDBC
      • ODBC (Open Database Connectivity )
      • - Provide a way for client program (eg VB, Excel, Access) to access database
      • - is a standardized API, developed according to the specification of the SQL
      • Access Group, than allows one to connect to SQL database
      • oo4o (Oracle Object for OLE)
      • - a middleware product manufactured by Oracle that allows native access to Oracle7
      • databases from client applications via the Microsoft OLE standard
      • - OLE 2.0 Automation Server, Oracle Data Control, Two C++ Class Library
      • JDBC (Java Database Connectivity )
      • - a set of classes and interfaces written in Java to allow other Java programs to send
      • SQL statements to a relational database management system
      • - JDBC Thin for Java applets, JDBC OCI for Java application
    • 47.
      • Samar K. Prasad
      • Lead DBA

    ×