Oracle11g 啟動數據庫實例 startup
1: nomount 模式:
描述:
該模式只會創建實例(即:創建oracle 實例的各種內存結構和服務進程),並不加載數據庫,也不會打開如何數據文件。
1 [oracle@localhost ~]$ sqlplus / as sysdba; ----以 sysdba身份登錄 2 3 SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 8 19:27:27 2016 4 5 Copyright (c) 1982, 2011, Oracle. All rights reserved. 6 7 8 Connected to: 9 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production 10 With the Partitioning, OLAP, Data Mining and Real Application Testing options 11 12 SQL> shutdown immediate; ---關閉數據庫 13 Database closed. 14 Database dismounted. 15 ORACLE instance shut down. 16 SQL> startup nomount; ----啟動數據庫 17 ORACLE instance started. 18 19 Total System Global Area 1221992448 bytes 20 Fixed Size 1344596 bytes 21 Variable Size 771754924 bytes 22 Database Buffers 436207616 bytes 23 Redo Buffers 12685312 bytes 24 SQL>
2:mount 模式
描述:
該模式將啟動實例、加載數據庫並保持數據庫的關閉狀態。mount 模式通常在進行數據維護時使用。比如:執行數據庫完全恢復操作、更改數據庫的歸檔模式;
3:open 模式:
描述:
該模式 將啟動實例、加載並打開數據庫,這是常規的啟動模式。用戶想要對數據庫進行多種操作,就必須使用OPEN模式啟動數據庫實例。
1 [oracle@localhost ~]$ sqlplus / as sysdba; 2 3 SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 8 19:58:48 2016 4 5 Copyright (c) 1982, 2011, Oracle. All rights reserved. 6 7 8 Connected to: 9 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production 10 With the Partitioning, OLAP, Data Mining and Real Application Testing options 11 12 SQL> startup 13 ORA-01081: cannot start already-running ORACLE - shut it down first 14 SQL> shutdown immediate; 15 ORA-01109: database not open 16 17 18 Database dismounted. 19 ORACLE instance shut down. 20 SQL> startup 21 ORACLE instance started. 22 23 Total System Global Area 1221992448 bytes 24 Fixed Size 1344596 bytes 25 Variable Size 771754924 bytes 26 Database Buffers 436207616 bytes 27 Redo Buffers 12685312 bytes 28 Database mounted. 29 Database opened. 30 SQL>
4:force 模式:
描述:
該模式 將終止實例並重新啟動數據庫,這種啟動模式具有一定的強制性;比如:在其他啟動模式失效時,可以測試使用這種啟動模式。
1 [oracle@localhost ~]$ sqlplus / as sysdba; 2 3 SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 8 20:37:40 2016 4 5 Copyright (c) 1982, 2011, Oracle. All rights reserved. 6 7 8 Connected to: 9 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production 10 With the Partitioning, OLAP, Data Mining and Real Application Testing options 11 12 SQL> startup force; 13 ORACLE instance started. 14 15 Total System Global Area 1221992448 bytes 16 Fixed Size 1344596 bytes 17 Variable Size 771754924 bytes 18 Database Buffers 436207616 bytes 19 Redo Buffers 12685312 bytes 20 Database mounted. 21 Database opened.
關閉數據庫實例 shutdown
關閉數據庫語法為;
1:NORmal方式
描述:
該模式 稱作為:正常關閉方式。如果對方關閉數據庫時間沒有限制,通常會使用這種方式來關閉數據庫。
2:transactional 方式
描述:
該模式 稱作為: 食物關閉方式;它首先任務是能夠保證當前所有的活動事務都可以被提交,並在在極可能短的時間內關閉數據庫。
其特點為:
1 [oracle@localhost ~]$ sqlplus / as sysdba; 2 3 SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 8 21:07:30 2016 4 5 Copyright (c) 1982, 2011, Oracle. All rights reserved. 6 7 8 Connected to: 9 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production 10 With the Partitioning, OLAP, Data Mining and Real Application Testing options 11 12 SYS@orcl> shutdown transactional 13 Database closed. 14 Database dismounted. 15 ORACLE instance shut down. 16 SYS@orcl> 17 18 19
3: immdediate 方式:
描述:
該模式 稱作為: 立即關閉方式;該方式能夠在盡可能短時間內關閉數據庫
其特點為:
4:abort 方式
描述:
該模式 稱作為: 終止關閉方式;終止關閉方式具有一定的強制性和破壞性。使用這個方式會強制中斷任何數據庫操作。這樣可能丟失一部分數據信息。影響數據庫的完整性;
其特點為:
1 [oracle@localhost ~]$ sqlplus / as sysdba; 2 3 SQL*Plus: Release 11.2.0.3.0 Production on Thu Dec 8 22:29:35 2016 4 5 Copyright (c) 1982, 2011, Oracle. All rights reserved. 6 7 Connected to an idle instance. 8 9 SYS@orcl> startup 10 ORACLE instance started. 11 12 Total System Global Area 1221992448 bytes 13 Fixed Size 1344596 bytes 14 Variable Size 771754924 bytes 15 Database Buffers 436207616 bytes 16 Redo Buffers 12685312 bytes 17 Database mounted. 18 Database opened. 19 SYS@orcl> shutdown abort 20 ORACLE instance shut down. 21 SYS@orcl> 22 23
-------------------------------------------------
-------------------------------------------------