Home > Database > Mysql Tutorial > body text

技巧分享 Oracle数据库的启动和关闭

WBOY
Release: 2016-06-07 16:51:18
Original
1180 people have browsed it

Oracle数据库的启动和关闭方式 一、几种启动方式: 1、startup nomount非安装启动,这种方式启动下可执行:重建控制文件、重建数

Oracle数据库的启动和关闭方式

一、几种启动方式:

1、startup nomount非安装启动,这种方式启动下可执行:重建控制文件、重建数据库

启动instance,即启动SGA和后台进程,这种启动只需要init.ora文件。

2、startup mount dbname

安装启动,这种方式启动下可执行:数据库日志归档、数据库恢复、重新命名一些数据库文件

执行“nomount”,然后打开控制文件。

3、startup open dbname先执行“nomount”,然后执行“mount”,再打开包括Redo log文件在内的所有数据库文件,

这种方式下可访问数据库中的数据。

4、startup,等于以下三个命令startup nomount

alter database mount

alter database open

5、startup restrict约束方式启动

这种方式能够启动数据库,但只允许具有一定特权的用户访问

非特权用户访问时,会出现以下提示:

ERROR:

ORA-01035: ORACLE 只允许具有 RESTRICTED SESSION 权限的用户使用

6、startup force强制启动方式

当不能关闭数据库时,可以用startup force来完成数据库的关闭

先关闭数据库,再执行正常启动数据库命令

7、startup pfile=参数文件名

带初始化参数文件的启动方式

先读取参数文件,再按参数文件中的设置启动数据库

例:startup pfile=E:\Oracle\admin\oradb\pfile\init.ora

8、startup EXCLUSIVE

二、几种关闭方式:

1、shutdown normal

正常方式关闭数据库。

2、shutdown immediate

立即方式关闭数据库。

在SVRMGRL中执行shutdown immediate,数据库并不立即关闭,

而是在Oracle执行某些清除工作后才关闭(终止会话、释放会话资源),

当使用shutdown不能关闭数据库时,shutdown immediate可以完成数据库关闭的操作。

3、shutdown abort

直接关闭数据库,正在访问数据库的会话会被突然终止,

如果数据库中有大量操作正在执行,这时执行shutdown abort后,,重新启动数据库需要很长时间。 

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!