Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 101. 2 Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define.

Similar presentations


Presentation on theme: "Chapter 101. 2 Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define."— Presentation transcript:

1 Chapter 101

2 2 Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define and manipulate data and PL/SQL to control the flow of SQL, allow the use of variable & error handling procedures Oracle Instance which is made up of the various processes (both system and user) to support a specific instance.

3 Chapter 103 Oracle Database Structure One or more Data files Two or more Log files called redo files. This files are used in recovery and trace the source of specific transaction. One or more Control files which contain the database name, related file names and locations and the creation timestamp.

4 Chapter 104 Oracle Database Structure (con’t) Trace Files and alert Log A database is defined in terms of Schema Objects and Tablespaces. –Schema Objects contain definitions of tables, views, sequences, stored procedures indexes, clusters and database links. –Tablespaces, segments and extents are the terms used to describe the physical storage.

5 Chapter 105 Oracle Instance System Global Area (SGA): Real memory area where database information is shared by users. For performance it should be as large as possible.

6 Chapter 106 System Global Area SGA is further divided into 3 areas. –Database buffer cache: Most recently accessed data blocks from the database. –Redo log buffer –Shared pool, contains shared memory constructs; such as, shared SQL area which is made up of parse trees of SQL queries & execution plans for executing SQL statements.

7 Chapter 107 Oracle Instance Processes User processes: A user process is created for the execution of some application. Program Global Area (PGA): Contains data and control information for the server processes. Oracle Processes: A Process or Thread of control which is assigned a private memory area in which it runs.

8 Chapter 108 Oracle Processes Oracle creates Server Processes to handle requests. This is a multithreaded server operation for efficiency rather than creating a separate process for each request to the server.

9 Chapter 109 Oracle Background Processes Database Writer (DBWR): Writes those blocks that were modified from the cache to the disk Log Writer (LGWR): Writes from the log buffer to the online disk log file. Checkpoint (CKPT): Refers to an event during which all the modified buffers in the SGA since the last checkpoint are written to the data files. It works with DBWR.

10 Chapter 1010 Oracle Background Processes System Monitor(SMON): Performs instance recovery, manages storage areas by making the space contiguous & recovers transactions. Process Monitor(PMON): Performs process recovery when a user process fails. It manages the cache and other resources used by a user process.

11 Chapter 1011 Oracle Background Processes Archiver (ARCH): Archives on-line log files to archival storage location; such as, disk or tape ( if configured to do so). Recoverer Process(RECO): Resolves distributed transactions that are pending due to a network or system failure in a Distributed database.

12 Chapter 1012 Oracle Background Processes Dispatchers (Dnnn): In a multi-threaded server configurations, routes requests from the connected user processes to available shared server processes. There is 1 dispatcher per standard communication protocol supported. Lock Processes(LCKn): Used for inter- instance locking when Oracle in Parallel Mode

13 Chapter 1013 Oracle Startup & Shutdown Starting an Instance: This is where the SGA is allocated, the background processes are created and the instance is initialized. Mounting the Database: This associates a database with an instance. This is one step that is required to make the database available to users.

14 Chapter 1014 Oracle Startup & Shutdown Opening a database: This is the second operation needed to make the database available to users. It opens the on-line data files and the log files. The reverse of the above procedure is used to shutdown the database. These are ALL actions done by the DBA.

15 Chapter 1015 Schema Objects TABLES: Tables are the basic unit that is used in Oracle to store data. It conforms with the relational model. Each column has a column name, datatype and width. Views: View are virtual tables which on defined either on other views or tables.

16 Chapter 1016 Schema Objects Synonyms: Direct references to objects. They are used to provide public access to an object while masking its real name or owner. Private synonyms may be created that are only available to that user. Program Unit: Procedures, functions or packages written in PL/SQL

17 Chapter 1017 Schema Objects Sequence: A special provision of a data type in Oracle for attribute value generation. Indexes: An index can be generated on one or more columns of a table as requested using SQL.

18 Chapter 1018 Schema Objects Cluster: A group of records from one or more tables physically stored in a mixed file. This is to improve performance. Such as using an Index Cluster. Database Links: Named objects in Oracle that establish paths from one database to another. (Used in distributed databases.)

19 Chapter 1019 Oracle’s Data Dictionary This is made up of a read-only set of tables that store the Metadata. Access to the information in these tables is usually done through views. These views begin with one of three special prefixes: USER,DBA, or ALL.

20 Chapter 1020 Item in the Data Dictionary Names of users Security Information: Privileges and roles. Schema Object Information Integrity constraints Space Allocation & Utilization of the database objects. Statistics on attributes, tables and predicates. Access audit trail information.

21 Chapter 1021 Triggers There are some business rules that we wish to actively enforce every time some action is done; such as, insert, delete or update. In Oracle this is done through the use of triggers. Triggers either enforce additional constraints or perform additional actions.

22 Chapter 1022 Storage Each Database is divided into one or more different tablespaces. As a minimum there is always a System and Users tablespace. These tablespaces are stored in one or more data files. These data files are associated with only one database.

23 Chapter 1023 Physical Storage Physical Storage is organized in terms of data blocks, extents and segments. Data blocks are the finest (smallest) size of storage. They are also called logical blocks, page or Oracle blocks. An Extent is a specific number of contiguous data blocks. A Segment is a set of extents for a data structure.

24 Chapter 1024 Data Blocks A Data Block has the following components: –Header: Contains the general block information such as block address & type of segment. –Table Directory: Contains information about tables that have data in the data block. –Row Directory: Contains information about the actual rows.

25 Chapter 1025 Data Blocks (con’t) –Row Data: Uses the bulk of the space of the Data Block. A row may span multiple blocks. –Free Space: Space allocated for row updates and new rows.

26 Chapter 1026 Extents The amount of space initial allocated to an extent is determine by the ‘Create’ command. Incremental extents are allocated when the initial one becomes full and their size is determined by ‘Create’ command. All extents allocated to index exist as long as the index exists.

27 Chapter 1027 Segments There are four types of Segments: –Data segments: Each non-clustered table and each cluster has a Single data segment. –Index segments: Each index has a single index segment. –Temporary segments: Used by SQL as a temporary work area. –Rollback segments: Used for undoing transactions.


Download ppt "Chapter 101. 2 Oracle Server An Oracle Server consists of an Oracle database (stored data, control and log files.) The Server will support SQL to define."

Similar presentations


Ads by Google