Physical and logical structures
An Oracle database system—identified
by an alphanumeric system identifier or SID[4]—comprises at least one instance of the application, along
with data storage. An instance—identified persistently by an instantiation
number (or activation id: SYS.V_$DATABASE.ACTIVATION#)—comprises a set of
operating-system processes
and memory-structures
that interact with the storage.
(Typical processes include PMON (the process monitor) and SMON (the system
monitor).) Oracle documentation can refer to an active database instance as a
"shared memory realm".[5]
Users of Oracle databases refer to
the server-side memory-structure as the SGA (System Global Area). The SGA
typically holds cache
information such as data-buffers, SQL commands, and user
information. In addition to storage, the database consists of online redo logs (or logs), which hold transactional
history. Processes can in turn archive the online redo
logs into archive logs (offline redo logs), which provide the basis (if
necessary) for data recovery
and for the physical-standby forms of data
replication using Oracle Data Guard.
If the Oracle database
administrator has implemented Oracle RAC (Real Application Clusters),
then multiple instances, usually on different servers,
attach to a central storage array.
This scenario offers advantages such as better performance, scalability and
redundancy. However, support becomes more complex, and many sites do not use
RAC. In version 10g, grid computing introduced shared resources
where an instance can use (for example) CPU
resources from another node (computer) in the grid.
The Oracle DBMS can store and
execute stored procedures
and functions within itself. PL/SQL (Oracle Corporation's proprietary
procedural extension to SQL), or the object-oriented language Java
can invoke such code objects and/or provide the programming structures for
writing them.
Storage
The Oracle RDBMS stores data
logically in the form of tablespaces and physically in the form of
data files ("datafiles").[6] Tablespaces can contain various
types of memory segments,
such as Data Segments, Index Segments, etc. Segments in turn comprise one or
more extents.
Extents comprise groups of contiguous data blocks. Data blocks form the basic
units of data storage.
A DBA can impose maximum quotas on
storage per user within each tablespace.[7]
Partitioning
Newer versions of the database can also
include a partitioning
feature: this allows the partitioning of tables based on different set of keys.
Specific partitions can then be easily added or dropped to help manage large
data sets.
Monitoring
Oracle database management tracks
its computer data
storage with the help of information stored in the SYSTEM tablespace. The SYSTEM tablespace contains the data dictionary—and often (by default) indexes and clusters.
A data dictionary consists of a special collection of tables that
contains information about all user-objects
in the database. Since version 8i, the Oracle RDBMS also supports
"locally managed" tablespaces that store space management information
in bitmaps in their own headers
rather than in the SYSTEM
tablespace (as happens with the default "dictionary-managed" tablespaces).
Version 10g and later introduced the SYSAUX tablespace, which contains some of the tables formerly
stored in the SYSTEM
tablespace, along with objects for other tools such as OEM,
which previously required its own tablespace.[8]
Disk files
|
|
|
Disk files primarily represent one of the following structures:
- Data and index files: These files provide the physical storage of data, which can consist of the data-dictionary data (associated to the tablespace SYSTEM), user data, or index data. These files can be managed manually or managed by Oracle itself ("Oracle-managed files"). Note that a datafile has to belong to exactly one tablespace, whereas a tablespace can consist of multiple datafiles.
- Redo log files, consisting of all changes to the database, used to recover from an instance failure. Note that often a database will store these files multiple times, for extra security in case of disk failure. The identical redo log files are said to belong to the same group.
- Undo files: These special datafiles, which can only contain undo information, aid in recovery, rollbacks, and read-consistency.
- Archive log files: These files, copies of the redo log files, are usually stored at different locations. They are necessary (for example) when applying changes to a standby database, or when performing recovery after a media failure. It is possible to archive to multiple locations.
- Tempfiles: These special datafiles serve exclusively for temporary storage data (used for example for large sorts or for global temporary tables)
- Control file, necessary for database startup. "A binary file that records the physical structure of a database and contains the names and locations of redo log files, the time stamp of the database creation, the current log sequence number, checkpoint information, and so on."[9]
At the physical level, data files comprise one or more data blocks,
where the block size
can vary between data files.
Data files can occupy pre-allocated
space in the file system of a computer server, utilize raw disk directly, or
exist within ASM
logical volumes.[10]
Database schema
Most Oracle database installations
traditionally came with a default schema called SCOTT. After the installation process sets up sample tables, the
user can log into the database with the username scott and the password tiger. The name of the SCOTT schema originated with Bruce Scott, one of the first
employees at Oracle (then Software Development Laboratories), who had a cat
named Tiger.[11]
- SYS (essential core database structures and utilities)
- SYSTEM (additional core database structures and utilities, and privileged account)
- OUTLN (utilized to store metadata for stored outlines for stable query-optimizer execution plans.[14])
- BI, IX, HR, OE, PM, and SH (expanded sample schemas[15] containing more data and structures than the older SCOTT schema).
System Global Area
Main article: System Global Area
Each Oracle instance uses a System Global Area
or SGA—a shared-memory
area—to store its data and control-information.[16]
Each Oracle instance allocates itself
an SGA when it starts and de-allocates it at shut-down time. The information in
the SGA consists of the following elements, each of which has a fixed size,
established at instance startup:
- Datafiles
Every Oracle database has one or
more physical datafiles, which contain all the database data. The data of
logical database structures, such as tables and indexes, is physically stored
in the datafiles allocated for a database.
Datafiles have the following
characteristics:
- One or more datafiles form a logical unit of database storage called a tablespace.
- A datafile can be associated with only one tablespace.
- Datafiles can be defined to extend automatically when they are full.
Data in a datafile is read, as
needed, during normal database operation and stored in the memory cache of
Oracle Database. For example, if a user wants to access some data in a table of
a database, and if the requested information is not already in the memory cache
for the database, then it is read from the appropriate datafiles and stored in
memory.
Modified or new data is not
necessarily written to a datafile immediately. To reduce the amount of disk
access and to increase performance, data is pooled in memory and written to the
appropriate datafiles all at once
- the redo log buffer: this stores redo entries—a log of changes made to the database. The instance writes redo log buffers to the redo log as quickly and efficiently as possible. The redo log aids in instance recovery in the event of a system failure.
- the shared pool: this area of the SGA stores shared-memory structures such as shared SQL areas in the library cache and internal information in the data dictionary. An insufficient amount of memory allocated to the shared pool can cause performance degradation.
- the Large pool Optional area that provides large memory allocations for certain large processes, such as Oracle backup and recovery operations, and I/O server processes
- Database buffer cache: Caches blocks of data retrieved from the database
- KEEP buffer pool: A specialized type of database buffer cache that is tuned to retain blocks of data in memory for long periods of time
- RECYCLE buffer pool: A specialized type of database buffer cache that is tuned to recycle or remove block from memory quickly
- nK buffer cache: One of several specialized database buffer caches designed to hold block sizes different from the default database block size
- Java pool:Used for all session-specific Java code and data in the Java Virtual Machine (JVM)
- Streams pool: Used by Oracle Streams to store information required by capture and apply
When you start the instance by using
Enterprise Manager or SQL*Plus, the amount of memory allocated for the SGA is
displayed.[17]
Library cache
The library cache[18]
stores shared SQL, caching the parse tree and the execution plan for every
unique SQL statement. If multiple applications issue the same SQL statement,
each application can access the shared SQL area. This reduces the amount of
memory needed and reduces the processing-time used for parsing and execution
planning.
Data dictionary cache
The data dictionary comprises a set of tables
and views that
map the structure of the database.
Oracle databases store information
here about the logical and physical structure of the database. The data
dictionary contains information such as:
- user information, such as user privileges
- integrity constraints defined for tables in the database
- names and datatypes of all columns in database tables
- information on space allocated and used for schema objects
The Oracle instance frequently
accesses the data dictionary to parse SQL statements.
Oracle operation depends on ready access to the data dictionary—performance
bottlenecks in the data dictionary affect all Oracle users. Because of this,
database administrators must make sure that the data dictionary cache[19] has sufficient capacity to cache
this data. Without enough memory for the data-dictionary cache, users see a
severe performance degradation. Allocating sufficient memory to the shared pool
where the data dictionary cache resides precludes these particular performance problem.
Program Global Area
The Program Global Area[20][21]
or PGA memory-area of an Oracle instance contains data and control-information
for Oracle's server-processes.
The size and content of the PGA
depends on the Oracle-server options installed. This area consists of the
following components:
- stack-space: the memory that holds the session's variables, arrays, and so on
- session-information: unless using the multithreaded server, the instance stores its session-information in the PGA. In a multithreaded server, the session-information goes in the SGA.)
- private SQL-area: an area that holds information such as bind-variables and runtime-buffers
- sorting area: an area in the PGA that holds information on sorts, hash-joins, etc.
DBAs can monitor PGA usage via the V$SESSTA(T system view.
Dynamic performance views
The dynamic performance views (also
known as "fixed views") within an Oracle database present information
from virtual tables (X$ tables)[22]
built on the basis of database memory.[23]
Database users can access the V$ views (named after the prefix of their
synonyms) to obtain information on database structures and performance.
Process architectures
Oracle processes
The Oracle RDBMS typically relies on
a group of processes running simultaneously in the background
and interacting to monitor and expedite database operations. Typical operating
environments might include - temporarily or permanently - some of the following
individual processes (shown along with their abbreviated nomenclature):[24]
- advanced queueing processes (Qnnn)[25]
- archiver processes (ARCn)
- checkpoint process (CKPT) *REQUIRED*
- coordinator-of-job-queues process (CJQn): dynamically spawns slave processes for job-queues
- database writer processes (DBWn) *REQUIRED*
- dispatcher processes (Dnnn): multiplex server-processes on behalf of users
- main Data Guard Broker monitor process (DMON)[26]
- job-queue slave processes (Jnnn)[27]
- log-writer process (LGWR) *REQUIRED*
- log-write network-server (LNSn): transmits redo logs in Data Guard environments
- logical standby coordinator process (LSP0): controls Data Guard log-application
- media-recovery process (MRP): detached recovery-server process
- memory-manager process (MMAN): used for internal database tasks such as Automatic Shared Memory Management
- memory-monitor process (MMON): process for automatic problem-detection, self-tuning and statistics-gathering[28]
- memory-monitor light process (MMNL): gathers and stores Automatic Workload Repository (AWR) data
- mmon slaves (Mnnnn—M0000, M0001, etc.): background slaves of the MMON process[29]
- process-monitor process (PMON) *REQUIRED*
- process-spawner (PSP0): spawns Oracle processes
- queue-monitor coordinator process (QMNC): dynamically spawns queue monitor slaves[30]
- queue-monitor processes (QMNn)
- recoverer process (RECO)
- remote file-server process (RFS) - in Oracle Data Guard, a standby recipient of primary redo-logs[31]
- shared server processes (Snnn): serve client-requests
- system monitor process (SMON) *REQUIRED*
User processes, connections and
sessions
Oracle Database terminology
distinguishes different computer-science
terms in describing how end-users interact with the database:
- user processes involve the invocation of application software[32]
- a connection refers to the pathway linking a user process to an Oracle instance[33]
- sessions consist of specific connections to an Oracle instance.[34] Each session within an instance has a session identifier or "SID"[35] (distinct from the system-identifier SID).
Concurrency and locking
Oracle databases control
simultaneous access to data resources with locks
(alternatively documented as "enqueues").[36] The databases also utilize
"latches" - low-level serialization mechanisms to protect shared data
structures in the System Global Area.[37]
Configuration
Database administrators control many
of the tunable variations in an Oracle instance by means of values in a
parameter file.[38] This file in its ASCII default
form ("pfile") normally has a name of the format init<SID-name>.ora. The default binary equivalent server parameter file
("spfile") (dynamically reconfigurable to some extent)[39] defaults to the format spfile<SID-name>.ora. Within an SQL-based environment, the views V$PARAMETER[40]
and V$SPPARAMETER[41]
give access to reading parameter values.
Administration
The "Scheduler"
(DBMS_SCHEDULER package, available from Oracle 10g onwards) and the Job
subsystem (DBMS_JOB package) permit the automation of predictable processing.[42]
Oracle Resource Manager aims to
allocate CPU resources between users and groups of users when such resources
become scarce.[43]
Oracle Corporation stated in product
announcements that manageability for DBAs had improved from Oracle9i to 10g.
Lungu and Vătuiu (2008) assessed the relative manageability by performing
common DBA tasks and measuring timings. [44] They performed their tests on a
single Pentium CPU (1.7 GHz) with 512 MB RAM,running Windows Server 2000.
From Oracle9i to 10g, installation improved 36%,day-to-day administration 63%,
backup and recovery 63%, and performance diagnostics and tuning 74%, for a
weighted total improvement of 56%. The researchers concluded that
"Oracle10g represents a giant step forward from Oracle9i in making the
database easier to use and manage".
Network access
Oracle Net Services
allow client or remote applications to access Oracle databases via network sessions
using various protocols.
Internationalization
Oracle Database software comes in 63
language-versions (including regional variations such as British English and
American English). Variations between versions cover the names of days and
months, abbreviations, time-symbols (such as A.M. and A.D.), and sorting.[45]
Oracle Corporation has translated
Oracle Database error-messages into Arabic, Catalan, Chinese, Czech, Danish,
Dutch, English, Finnish, French, German, Greek, Hebrew, Hungarian, Italian,
Japanese, Korean, Norwegian, Polish, Portuguese, Romanian, Russian, Slovak,
Spanish, Swedish, Thai and Turkish.[46]
Oracle Corporation provides database
developers with tools and mechanisms for producing internationalized database
applications: referred to internally as "Globalization".[47][48]
Version numbering
Oracle products follow a custom
release numbering and naming convention. With the Oracle RDBMS 10g
release, Oracle Corporation began using the "10g" label in all
versions of its major products, although some sources refer to Oracle
Applications Release 11i as Oracle 11i.[clarification
needed] The suffixes "i", "g" and
"c" do not actually represent a low-order part of the version number,
as letters typically represent in software industry version numbering; that is,
there is no predecessor version of Oracle 10g called Oracle 10f.
Instead, the letters stand for "internet", "grid" and
"cloud", respectively.[60] Consequently many simply drop
the "g" or "i" suffix when referring to specific versions
of an Oracle product.
Major database-related products and
some of their versions include:
- Oracle Application Server 10g (also known as "Oracle AS 10g"): a middleware product;
- Oracle Applications Release 11i (aka Oracle e-Business Suite, Oracle Financials or Oracle 11i): a suite of business applications;
- Oracle Developer Suite 10g (9.0.4);
- Oracle JDeveloper 10g: a Java integrated development environment;
Since version 2, Oracle's RDBMS
release numbering has used the following codes:
- Oracle v2 : 2.3
- Oracle v3 : 3.1.3
- Oracle v4 : 4.1.4.0-4.1.4.4
- Oracle v5 : 5.0.22, 5.1.17, 5.1.22
- Oracle v6 : 6.0.17-6.0.36 (no OPS code), 6.0.37 (with OPS)
- Oracle7: 7.0.12–7.3.4
- Oracle8 Database: 8.0.3–8.0.6
- Oracle8i Database Release 1: 8.1.5.0–8.1.5.1
- Oracle8i Database Release 2: 8.1.6.0–8.1.6.3
- Oracle8i Database Release 3: 8.1.7.0–8.1.7.4
- Oracle9i Database Release 1: 9.0.1.0–9.0.1.5 (Patchset as of December 2003)
- Oracle9i Database Release 2: 9.2.0.1–9.2.0.8 (Patchset as of April 2007)
- Oracle Database 10g Release 1: 10.1.0.2–10.1.0.5 (Patchset as of February 2006)
- Oracle Database 10g Release 2: 10.2.0.1–10.2.0.5 (Patchset as of April 2010)
- Oracle Database 11g Release 1: 11.1.0.6–11.1.0.7 (Patchset as of September 2008)
- Oracle Database 11g Release 2: 11.2.0.1–11.2.0.4 (Patchset as of August 2013)
- Oracle Database 12c Release 1: 12.1 (Patchset as of June 2013)
- Oracle Database 12c Release 1: 12.1.0.2 (Patchset as of July 2014)
The version-numbering syntax within
each release follows the pattern:
major.maintenance.application-server.component-specific.platform-specific.
For example, "10.2.0.1 for
64-bit Solaris" means: 10th major version of Oracle, maintenance level 2,
Oracle Application Server (OracleAS) 0, level 1 for Solaris 64-bit.
The Oracle Database Administrator's Guide
offers further information on Oracle release numbers.
Marketing editions
Over and above the different
versions of the Oracle database management software developed over time, Oracle
Corporation subdivides its product into varying "editions" -
apparently for marketing and license-tracking reasons. (Do not confuse the
marketing "editions" with the internal virtual versioning
"editions" introduced with Oracle 11.2).[61] In approximate order of
decreasing scale:
- Enterprise Edition[62] (EE) includes more features than the "Standard Edition", especially in the areas of performance and security. Oracle Corporation licenses this product on the basis of users or of processors, typically for servers running 4 or more CPUs. EE has no memory limits, and can utilize clustering using Oracle RAC software.
- Standard Edition[63] (SE) contains base database functionality. Oracle Corporation licenses this product on the basis of users or of processors, typically for servers running from one to four CPUs. If the number of CPUs exceeds 4 CPUs, the user must convert to an Enterprise license. SE has no memory limits, and can utilize clustering with Oracle RAC at no additional charge.
- Standard Edition One,[64] (SE1[65] or SEO) introduced with Oracle 10g, has some additional feature-restrictions. Oracle Corporation markets it for use on systems with one or two CPUs. It has no memory limitations.
Host platforms
Prior to releasing Oracle 9i
in 2001, Oracle Corporation ported its database product to a wide variety of
platforms. Subsequently Oracle Corporation consolidated on a smaller range of
operating-system platforms.
As of November 2011, Oracle
Corporation supported the following operating systems and hardware platforms
for Oracle Database 11g (11.2.0.2.0):[74]
- zLinux64
- Microsoft Windows (32-bit)
- Microsoft Windows (x64)
- Linux x86
- Linux x86-64
- Solaris (SPARC)
- Solaris (x86-64)
- HP-UX Itanium
- HP-UX PA-RISC (64-bit)
- AIX (PPC64)
- OpenVMS (IA64) [75]
In 2011, Oracle Corporation
announced the availability of Oracle Database Appliance, a pre-built,
pre-tuned, highly available clustered database server built using two SunFire
X86 servers and direct attached storage.
Some Oracle Enterprise edition
databases running on certain Oracle-supplied hardware can utilize Hybrid Columnar
Compression for more efficient storage.[76]
Related software
Oracle products
- Oracle Database Firewall[77] analyzes database traffic on a network to prevent threats such as SQL injection.[78]
Database options
Oracle Corporation refers to some
extensions to the core functionality of the Oracle database as "database
options".[79] As of 2013 such options include:
- Active Data Guard (extends Oracle Data Guard physical standby functionality in 11g)
- Advanced Compression (compresses tables, backups and redo-data)[80]Advanced Security (adds data encryption methods for both data at rest and on the network)
- Content database (provides a centralized repository for unstructured information)
- Data Mining ( ODM) (mines for patterns in existing data)
- Database Vault (enforces extra security on data access)
- In-Memory Database Cache (utilizes TimesTen technology)
- Label Security (enforces row-level security)
- Management Packs (various). For example:
- Oracle Answers (for ad-hoc analysis and reporting)
- Oracle Application Express, a no-cost environment for database-oriented software-development[83]
- Oracle GoldenGate 11g (distributed real-time data acquisition)
- Oracle Multitenant - a container database holding pluggable databases (PDBs) (from 12c)[84]
- Oracle OLAP (adds analytical processing)
- Oracle Programmer (provides programmatic access to Oracle databases via precompilers, interfaces and bindings)[85]
- Oracle Real Application Testing (new at version 11g)—including Database Replay (for testing workloads) and SQL Performance Analyzer (SPA) (for preserving SQL efficiency
- Oracle Spatial and Graph (includes 2D,3D and Raster geospatial data types, indexes, and spatial analytics and data models used in business applications and geographic information systems (GIS)) as well as World Wide Web Consortium Resource Description Framework (RDF) graph management and analysis
- Oracle Text (standard SQL to index, search, and analyze text and documents stored in the Oracle database) [87]
- Oracle XML DB, a no-cost component in each edition of the database that provides high-performance technology for storing and retrieving native XML
- Oracle Warehouse Builder (in various forms and sub-options)
- Partitioning (granularizes tables and indexes for efficiency)
- Real Application Clusters (RAC) (coordinates multiple database servers, together accessing the same database)
- Records database (a records management application)
- Transparent Gateway for connecting to non-Oracle systems. Offers optimized solution, with more functionality and better performance than Oracle Generic Connectivity.
- Total Recall (optimizes long-term storage of historical data)
This list is incomplete;
you can help by expanding it.
Suites
In addition to its RDBMS,
Oracle Corporation has released several related suites of tools and
applications relating to implementations of Oracle databases. For example:
- Oracle Application Server, a J2EE-based application server, aids in developing and deploying applications that use Internet technologies and a browser.
- Oracle Collaboration Suite contains messaging, groupware and collaboration applications.
- Oracle Developer Suite contains software development tools, including JDeveloper.
- Oracle E-Business Suite collects together applications for enterprise resource planning (including Oracle Financials), customer relationship management and human resources management (Oracle HR).
- Oracle Enterprise Manager (OEM) used by database administrators (DBAs) to manage the DBMS, and recently in version 10g, a web-based rewrite of OEM called "Oracle Enterprise Manager Database Control". Oracle Corporation has dubbed the super-Enterprise-Manager used to manage a grid of multiple DBMS and Application Servers "Oracle Enterprise Manager Grid Control".
- Oracle Programmer/2000, a bundling of interfaces for 3GL programming languages, marketed with Oracle7 and Oracle8.[90][91]
- Oracle WebCenter Suite[92]
Database "features"
Apart from the clearly defined
database options, Oracle databases may include many semi-autonomous software
sub-systems, which Oracle Corporation sometimes refers to as
"features" in a sense subtly different from the normal usage of the
word. For example, Oracle Data Guard
counts officially as a "feature", but the command-stack within
SQL*Plus, though a usability feature, does not appear in the list of
"features" in Oracle's list.[original
research?] Such "features" may include (for
example):
- Automatic Workload Repository (AWR), providing monitoring services to Oracle database installations from Oracle version 10. Prior to the release of Oracle version 10, the Statspack facility[94] provided similar functionality.
- Clusterware
- Data Aggregation and Consolidation
- Data Guard for high availability
- Generic Connectivity for connecting to non-Oracle systems.
- Data Pump utilities, which aid in importing and exporting data and metadata between databases[95]
- SQL*Loader, utility that facilitates high performance data loading.
- Database Resource Manager (DRM), which controls the use of computing resources.[96]
- Fast-start parallel rollback[97]
- Fine-grained auditing (FGA) (in Oracle Enterprise Edition)[98] supplements standard security-auditing features[99]
- Flashback for selective data recovery and reconstruction[100]
- iSQL*Plus, a web-browser-based graphical user interface (GUI) for Oracle database data-manipulation (compare SQL*Plus)
- Oracle Data Access Components (ODAC), tools that consist of:[101]
- Oracle Data Provider for .NET (ODP.NET)[102]
- Oracle Developer Tools (ODT) for Visual Studio
- Oracle Providers for ASP.NET
- Oracle Database Extensions for .NET
- Oracle Provider for OLE DB
- Oracle Objects for OLE
- Oracle Services for Microsoft Transaction Server
- Oracle-managed files (OMF) -- a feature allowing automated naming, creation and deletion of datafiles at the operating-system level.
- Oracle Multimedia (known as "Oracle interMedia" before Oracle 11g) for storing and integrating multimedia data within a database[103]
- Oracle Spatial and Graph
- Recovery Manager (rman) for database backup, restoration and recovery
- SQL*Plus, a program that allows users to interact with Oracle database(s) via SQL and PL/SQL commands on a command-line. Compare iSQL*Plus.
- Universal Connection Pool (UCP), a connection pool based on Java and supporting JDBC, LDAP, and JCA[104]
This list is incomplete;
you can help by expanding it.
Tools
Users can develop their own applications
in Java
and PL/SQL using tools such as:
Other databases marketed by Oracle
Corporation
By acquiring other technology in the
database field, Oracle Corporation can also offer:
- TimesTen, a memory-resident database that can cache transactions and synchronize data with a centralized Oracle database server. It functions as a real-time infrastructure software product intended for the management of low-latency, high-volume data, of events and of transactions.
- BerkeleyDB, a simple, high-performance, embedded database
- Oracle Rdb, a legacy relational database for the OpenVMS operating-system
- MySQL a relational database purchased as part of Oracle Corporation's takeover of its immediate previous owner, Sun Microsystems
No comments:
Post a Comment