本文摘自PHP中文网,作者hzc,侵删。
关于数据库的各种启动和关闭命令一直感觉有些混乱,现整理一下。
一、数据库的启动 :
Oracle 的启动分为三个步骤:分别是启动实例、加载数据库 、打开数据库。可以根据自己的实际需要来开启数据库
语法是startup
1、nomount 模式
1 2 3 4 5 6 7 8 | 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 模式
1 2 3 4 5 6 7 8 9 | 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 模式
1 2 3 4 5 6 7 8 9 10 | 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 模式
1 2 3 4 5 6 7 8 9 10 | 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数据库怎么打开的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
postgresql的now()与oracle的sysdate区别说明
oracle常用功能集锦
oracleplsql单行函数和组函数详解
oracle数据库中出现ora-12899错误怎么办
oracle表空间扩容详情
详解oracle 11g drcp连接方式的基本原理
oracle数据泵的导入与导出实例详解
oracle11g r2 安装教程完整版
oracle存储过程及调用
oracle 高速批量数据加载工具sqlloader使用说明
更多相关阅读请进入《oracle》频道 >>
机械工业出版社
本书主要讲述了数据模型、基于对象的数据库和XML、数据存储和查询、事务管理、体系结构等方面的内容。
转载请注明出处:木庄网络博客 » oracle数据库怎么打开