How a DatabaseIs Opened
Opening a mounted database makes itavailable for normal database operations. Any valid user can connect to an opendatabase and access its information. Usually, a database administrator opensthe database to make it available for general use.
When you open the database, OracleDatabase performs the following actions:
- Opens the online data files in tablespaces other than undo tablespaces
If a tablespace was offline when thedatabase was previously shut down (see"Online andOffline Tablespaces"), then the tablespace and its corresponding data fileswill be offline when the database reopens.
- Acquires an undo tablespace
If multiple undo tablespaces exists,then theUNDO_TABLESPACEinitialization parameter designates the undo tablespace to use. Ifthis parameter is not set, then the first available undo tablespace is chosen.
- Opens the online redo log files
See Also:
数据库由MOUNT 状态到open状态后就可以执行普通的数据库操作(对数据的增删改查)。对于一个open状态的数据库来说,任何有效的用户都可以进行连接并访问它的信息;通常来说,数据库管理员打开数据库供一般的用户使用;
打开数据库时的执行步骤如下:
l打开除undo表空间外的其他表空间的数据文件。如果在数据库关闭之前某个表空间处于离线状态,那么该表空间和相应的数据文件在本次打开时还是处于离线状态
l取得一个undo表空间。如果数据库有多个undo表空间存在,那么初始化变量undo_tablespace将指派要使用的undo表空间。如果该变量没有设置,那么将把第一个可用的undo表空间选中。
l打开在线归档日志文件。
By default, the database opens inread/write mode. In this mode, users can make changesto the data, generating redo in the online redo log. Alternatively, you canopen inread-only modeto prevent data modification by user transactions.
Note:
只读模式
默认情况下,数据库以read/write模式打开数据库,在这种模式下,用户可以修改数据,生成日志到日志文件中。相应地,你也可以以只读模式打开数据库以避免用户事务修改数据
By default, aphysicalstandby databaseopens in read-only mode. SeeOracle DataGuard Concepts and Administration.
Read-only mode restricts database accessto read-only transactions, which cannot write to data files or to online redolog files. However, the database can perform recovery or operations that changethe database state without generating redo. For example, in read-only mode:
- Data files can be taken offline and online. However, you cannot take permanent tablespaces offline.
- Offline data files and tablespaces can be recovered.
- The control file remains available for updates about the state of the database.
- Temporary tablespaces created with theCREATE TEMPORARY TABLESPACEstatement are read/write.
- Writes to operating systemaudit trails, trace files, and alert logs can continue.
See Also:
默认情况下,一个物理备库是以只读模式打开。
只读模式限制数据库访问为只读,不能写入数据文件或者在线日志文件,然而,可以在不生成redo日志的情况下执行恢复或者使其状态改变,举例来所,只读模式下:
l 可以使数据文件在线和离线,但是不能使表空间永久性离线;
l 离线数据文件和表空间可以被恢复;
l 对于数据库的状态,控制文件可以记录;
l 用create temporary tablespace语句创建的临时表空间可以进行读写操作
l 操作系统的写入跟踪、审计,审计文件及告警日志可以使用。
该系列翻译完毕。其中OCP题库里有这样一题:
You have issued a SHUTDOWN ABORT command to bring down your database instance.
Consider the steps that will be performed later when you open the database:
1. SGA is allocated.
2. Control file is read.
3. Redo log files are read.
4. Instance recovery is started.
5. Background processes are started.
6. Data files are checked for consistency.
7. Server parameter file or the initialization parameter file is read.
Which option has the correct order in which these steps occur?
正是对该系列流程的一个总结;7, 1, 5, 2, 3, 6, 4