1.只读模式
# 首先进入数据库
startup
# 打开只读模式
alter database 数据库名 open read only
# 打开读写模式
alter database 数据库 open read write
2.受限模式
#直接打开受限模式
startup restrict
# 从open 状态转换为restrict
alter system enable restricted session;
3.数据库的四个模式
1. shutdown 关闭数据库模式
将ORACLE SERVER 中的实例和数据库全都关闭
shutdown immediate
2.nomount
启动实例,分配SGA,PGA,并且启动后台进程,读取参数文件
# 注意:无法在数据库启动时转换为nomount模式,必须将数据库先关闭
startup nomount
3.mount
实例通过读取参数文件,得到控制文件的位置,然后通过参数文件加载数据文件和重做日志文件,并将instance和database挂载
startup mount
# open 状态下转换为mount模式
alter database orcl mount;
4. open 模式
打开所有的数据库的文件
startup
alter databse open;