您的位置:首页 > 数据库 > Oracle

Oracle11g 启动数据库实例、关闭数据库实例

2017-12-10 18:09 459 查看

  Oracle11g 启动数据库实例        startup

 

1: nomount 模式:

 

     描述:

            该模式只会创建实例(即:创建oracle 实例的各种内存结构和服务进程),并不加载数据库,也不会打开如何数据文件。

                

[oracle@localhost ~]$ sqlplus / as sysdba;  ----以 sysdba身份登录

SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 8 19:27:27 2016

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shutdown immediate;  ---关闭数据库
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup nomount;  ----启动数据库
ORACLE instance started.

Total System Global Area 1221992448 bytes
Fixed Size                  1344596 bytes
Variable Size             771754924 bytes
Database Buffers          436207616 bytes
Redo Buffers               12685312 bytes
SQL>

 

2:mount 模式   

描述:

            该模式将启动实例、加载数据库并保持数据库的关闭状态。mount 模式通常在进行数据维护时使用。比如:执行数据库完全恢复操作、更改数据库的归档模式;

 

3:open 模式:

描述:

            该模式 将启动实例、加载并打开数据库,这是常规的启动模式。用户想要对数据库进行多种操作,就必须使用OPEN模式启动数据库实例。

 

 

[oracle@localhost ~]$ sqlplus / as sysdba;

SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 8 19:58:48 2016

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> startup
ORA-01081: cannot start already-running ORACLE - shut it down first
SQL> shutdown immediate;
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.

Total System Global Area 1221992448 bytes
Fixed Size                  1344596 bytes
Variable Size             771754924 bytes
Database Buffers          436207616 bytes
Redo Buffers               12685312 bytes
Database mounted.
Database opened.
SQL>

 

4:force 模式:

描述:

            该模式  将终止实例并重新启动数据库,这种启动模式具有一定的强制性;比如:在其他启动模式失效时,可以测试使用这种启动模式。

[oracle@localhost ~]$ sqlplus / as sysdba;

SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 8 20:37:40 2016

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> startup force;
ORACLE instance started.

Total System Global Area 1221992448 bytes
Fixed Size                  1344596 bytes
Variable Size             771754924 bytes
Database Buffers          436207616 bytes
Redo Buffers               12685312 bytes
Database mounted.
Database opened.

 

关闭数据库实例   shutdown

 

关闭数据库语法为;

1:NORmal方式

描述:

            该模式  称作为:正常关闭方式。如果对方关闭数据库时间没有限制,通常会使用这种方式来关闭数据库。

 

 

 

2:transactional 方式

描述:

            该模式  称作为: 食物关闭方式;它首先任务是能够保证当前所有的活动事务都可以被提交,并在在极可能短的时间内关闭数据库。

其特点为:

[oracle@localhost ~]$ sqlplus / as sysdba;

SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 8 21:07:30 2016

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SYS@orcl> shutdown transactional
Database closed.
Database dismounted.
ORACLE instance shut down.
SYS@orcl>

 

 

3: immdediate 方式:

描述:

            该模式  称作为:  立即关闭方式;该方式能够在尽可能短时间内关闭数据库

其特点为:

 

 

4:abort 方式

描述:

            该模式  称作为:  终止关闭方式;终止关闭方式具有一定的强制性和破坏性。使用这个方式会强制中断任何数据库操作。这样可能丢失一部分数据信息。影响数据库的完整性;

其特点为:

 

[oracle@localhost ~]$ sqlplus / as sysdba;

SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 8 22:29:35 2016

Copyright (c) 1982, 2011, Oracle.  All rights reserved.

Connected to an idle instance.

SYS@orcl> startup
ORACLE instance started.

Total System Global Area 1221992448 bytes
Fixed Size                  1344596 bytes
Variable Size             771754924 bytes
Database Buffers          436207616 bytes
Redo Buffers               12685312 bytes
Database mounted.
Database opened.
SYS@orcl> shutdown abort
ORACLE instance shut down.
SYS@orcl>

 

 

 

 

-------------------------------------------------

 

 

 

-------------------------------------------------

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: