Course Objectives
In this course, you gain experience in:
• Using Recovery Manager (RMAN) for advanced backup and recovery
• Employing database monitoring practices for memory, performance, and storage
• Managing resources, job schedules, security, and globalization issues
Oracle Database 10g: The Database for the Grid
• Automatic Storage Management
• Portable clusterware
• Real Application Clusters and automatic workload management
• Resource Manager
• Oracle Streams
• Centralized management with Enterprise Manager Grid Control
• Oracle Database 10g new self-management features
The most common background processes are the following:
• System Monitor (SMON): Performs crash recovery when the instance is started following a failure
• Process Monitor (PMON): Performs process cleanup when a user process fails
• Database Writer (DBWn): Writes modified blocks from the database buffer cache to the data files on the disk
• Checkpoint (CKPT): Updates all the data files and control files of the database to indicate the most recent checkpoint
• LogWriter (LGWR): Writes redo log entries to the disk
• Archiver (ARCn): Copies redo log files to an archival storage when a log switch occurs
Reviewing Oracle Instance Management
1. An instance has started on the computer running Oracle (often called the host or database server).
2. A computer running an application (a local computer or client workstation) runs the application in a user process. The client application attempts to establish a connection to the instance by using the Oracle Net Services driver.
3. The instance detects the connection request from the application and connects to a server process on behalf of the user process.
4. The user updates a row.
5. The server process receives the statement and checks whether it is already in the shared pool of the SGA. If a shared SQL area is found, the server process checks the user’s access privileges to the requested data, and the previously existing shared SQL area is used to process the statement. If the statement is not in the shared pool, then a new shared SQL area is allocated for the statement, so that it can be parsed and processed.
6. The server process retrieves any necessary data values from the actual data file (table) or from data blocks that are stored in the SGA.
7. The server process modifies the table data in the SGA.
8. When the transaction is committed, the LGWR process immediately records the transaction in the redo log file.
9. The DBWn process writes modified blocks to the disk when doing so is efficient.
10. The server process sends a success or error message across the network to the application.
Throughout this entire procedure, the other background processes run, watching for conditions that require intervention.
Physical Database Structure
The files that constitute an Oracle database are organized into the following:
• Control files: Contain data about the database itself (that is, physical database structure information). These files are critical to the database. Without them, you cannot open data files to access the data within the database.
• Data files: Contain the user or application data of the database
• Online redo log files: Allow for instance recovery of the database. If the database crashes and does not lose any data files, then the instance can recover the database with the information in these files.
The following additional files are important to the successful running of the database:
• Parameter file: Is used to define how the instance is configured when it starts up
• Password file: Allows users to connect remotely to the database and perform administrative tasks
• Backup files: Are used for database recovery. You typically restore a backup file when a media failure or user error has damaged or deleted the original file.
• Archive log files: Contain an ongoing history of the data changes (redo) that are generated by the instance. Using these files and a backup of the database, you can recover a lost data file. That is, archive logs enable the recovery of restored data files.
• Trace files: Each server and background process can write to an associated trace file. When an internal error is detected by a process, the process dumps information about the error to its trace file. Some of the information written to a trace file is intended for the database administrator, whereas other information is for Oracle Support Services.
• Alert log files: Also known as alert logs, these are special trace files. The alert log of a database is a chronological log of messages and errors. Oracle recommends reviewing these files.
Logical and Physical Database Structures
An Oracle database is a collection of data that is treated as a unit. The general purpose of a database is to store and retrieve related information. The database has logical structures and physical structures.
Tablespaces
A database is divided into logical storage units called tablespaces, which group related logical structures together. For example, tablespaces commonly group all of an application’s objects to simplify some administrative operations. You may have a tablespace for application data and an additional one for application indexes.
Databases, Tablespaces, and Data Files
The relationship among databases, tablespaces, and data files is illustrated in the slide. Each database is logically divided into one or more tablespaces. One or more data files are explicitly created for each tablespace to physically store the data of all logical structures in a tablespace. If it is a TEMPORARY tablespace, instead of a data file, the tablespace has a temporary file.
Schemas
A schema is a collection of database objects that are owned by a database user. Schema objects are the logical structures that directly refer to the database’s data. Schema objects include such structures as tables, views, sequences, stored procedures, synonyms, indexes, clusters, and database links. In general, schema objects include everything that your application creates in the database.
Data Blocks
At the finest level of granularity, an Oracle database’s data is stored in data blocks. One data block corresponds to a specific number of bytes of physical database space on the disk. A data block size is specified for each tablespace when it is created. A database uses and allocates free database space in Oracle data blocks.
Extents
The next level of logical database space is called an extent. An extent is a specific number of contiguous data blocks (obtained in a single allocation) that are used to store a specific type of information.
Segments
The level of logical database storage above an extent is called a segment. A segment is a set of extents allocated for a certain logical structure. For example, the different types of segments include:
• Data segments: Each nonclustered, non-index-organized table has a data segment. All of the table’s data is stored in the extents of its data segment. For a partitioned table, each partition has a data segment. Each cluster has a data segment. The data of every table in the cluster is stored in the cluster’s data segment.
• Index segments: Each index has an index segment that stores all of its data. For a partitioned index, each partition has an index segment.
• Undo segments: One UNDO tablespace is created by the database administrator to temporarily store undo information. The information in an undo segment is used to generate read-consistent database information and, during database recovery, to roll back uncommitted transactions for users.
• Temporary segments: Temporary segments are created by the Oracle database when a SQL statement needs a temporary work area to complete execution. When the statement finishes execution, the temporary segment’s extents are returned to the instance for future use. Specify a default temporary tablespace for every user or a default temporary tablespace, which is used databasewide.
The Oracle database dynamically allocates space. When the existing extents of a segment are full, additional extents are added. Because extents are allocated as needed, the extents of a segment may or may not be contiguous on the disk.
-- EOF --
This work is licensed under a CC A-S 4.0 International License.