oracle数据库怎么打开

关于数据库的各种启动和关闭命令一直感觉有些混乱,现整理一下。

一、数据库的启动 :

Oracle 的启动分为三个步骤:分别是启动实例、加载数据库 、打开数据库。可以根据自己的实际需要来开启数据库

语法是startup

1、nomount 模式

SQL> startup nomount
ORACLE instance started.

Total System Global Area  830930944 bytes
Fixed Size                  2257800 bytes
Variable Size             536874104 bytes
Database Buffers          285212672 bytes
Redo Buffers                6586368 bytes

这种启动方式只创建实例(即创建Oracle实例的各种内存结构和服务进程),并不加载数据库也不会打开数据文件。

这种模式一般适用于在创建数据库和控制文件。

2、mount 模式

SQL> startup mount
ORACLE instance started.

Total System Global Area  830930944 bytes
Fixed Size                  2257800 bytes
Variable Size             536874104 bytes
Database Buffers          285212672 bytes
Redo Buffers                6586368 bytes
Database mounted.

这种模式将启动实例,加载数据库并保存数据库的关闭模式

一般用于数据库维护时,比如:执行数据库完全恢复操作,更改数据库的归档模式等

3、open 模式

SQL> startup
ORACLE instance started.

Total System Global Area  830930944 bytes
Fixed Size                  2257800 bytes
Variable Size             536874104 bytes
Database Buffers          285212672 bytes
Redo Buffers                6586368 bytes
Database mounted.
Database opened.

这种模式就是将启动实例,加载并打开数据库。 这是常规的打开数据库的方式,只要用户想要对数据库进行多种操作,必须采取这种方式打开,(用open模式打开数据库)startup后面不需要加参数的。

4、force 模式

SQL> startup force
ORACLE instance started.

Total System Global Area  830930944 bytes
Fixed Size                  2257800 bytes
Variable Size             536874104 bytes
Database Buffers          285212672 bytes
Redo Buffers                6586368 bytes
Database mounted.
Database opened.

这种模式将终止实例并重新启动数据库(open),这种模式具有一定的强制性(比如在其他启动模式失效的时候可以尝试这种模式)

推荐教程: 《Oracle教程》

以上就是oracle数据库怎么打开的详细内容,更多请关注www.sxiaw.com其它相关文章!