Oracle Database Instance

Introduction to the Oracle Database Instance


A database instance is a set of memory structures that manage database files. A database is a set of physical files on disk created by the CREATE DATABASE statement. The instance manages its associated data and serves the users of the database.

数据库实例是用例管理数据库文件的一系列的内存组件,数据库是使用【create database】语句创建的在磁盘上的一系列的物理文件。实例管理数据库相关联的数据并为数据库的用户服务。


Every running Oracle database is associated with at least one Oracle database instance. Because an instance exists in memory and a database exists on disk, an instance can exist without a database and a database can exist without an instance

每个正在运行的数据库至少需要关联一个数据库实例,因为实例是存在与内存中的,数据库存在于磁盘,一个实例可以没有数据库而存在,但一个数据库必须关联一个实例

Database Instance Structure


When an instance is started, Oracle Database allocates a memory area called the system global area (SGA) and starts one or more background processes. The SGA serves various purposes, including the following:
■Maintaining internal data structures that are accessed by many processes and threads concurrently
■Caching data blocks read from disk
■Buffering redo data before writing it to the online redo log files
■Storing SQL execution plans
The SGA is shared by the Oracle processes, which include server processes and background processes, running on a single computer. The way in which Oracle processes are associated with the SGA varies according to operating system.
A database instance includes background processes. Server processes, and the process memory allocated in these processes, also exist in the instance. The instance continues to function when server processes terminate.
Figure 13–1 shows the main components of an Oracle database instance.


当实例启动时,Oracle数据库分配了一个叫做SGA(system global area)的内存区域,并且启动了多个后台进程,SGA有很多用途,如下所示:
1、维护很多进程访问的内部数据结构并保证数据的一致性
2、将数据从磁盘中读取并进行缓存
3、在重做日志数据写入到在线日志文件之前进行缓存
4、存储执行计划信息
SGA是由Oracle进程之间进行共享的,包括服务器进程、后台进程(运行一个单独的机器),根据操作系统的不同,进程和SGA的关联方式也不相同。
数据库实例的配置分为两种情况:
1、单实例
2、集群-RAC(Oracle Real Application Cluster)
无论是单实例,还是集群,在同一时刻下,一个实例只能关联一个数据库

数据库的启动阶段:
这里写图片描述
1.Instance started without mounting database.
The instance is started, but is not yet associated with a database.
2.Database mounted
The instance is started and is associated with a database by reading its control file . The database is closed to users.
3.Database open
The instance is started and is associated with an open database. The data contained in the data files is accessible to authorized users.

1、实例已经启动但没有关联数据库
2、通过读取控制文件,实例已经启动并且关联了数据库,但数据库对用户仍然是关闭的。
3、实例已经启动,数据库已经打开,数据文件中的数据对授权用户是可访问的。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值