oracle啟動與關閉的幾種模式

來源:互聯網
上載者:User

標籤:oracle啟動與關閉的幾種模式

nomount階段
oracle  啟動nomount過程他會載入參數檔案(spfiledid.ora spfile.ora initsid.ora 然後根據參數分配記憶體 會開啟alert檔案寫日誌)
>startup nomount
>show parameter spfile #如果有值這就是spfile啟動
>select name,value from v$parameter where name=‘spfile‘  #如果有值就是spfile啟動

>ho rm /dbs/spfileorcl.ora  #如果刪除這個檔案啟動資料庫會報這樣的錯誤
>startup force nomount
ora-01078:failure in processing system parameters  #會有這樣的錯誤

這就需用找備份的spfile檔案來拉起資料庫
>startup pfile=xxx/initorcl.ora nomount  
拉起資料庫以後再建立spfile檔案
>create spfile from pfile=‘xxxx/initorcl.ora‘  #這樣就建立好了spfile檔案

這個oracle啟動只是把instance啟動了 後天進程啟動了 把SGA的記憶體配置了 處於nomount階段
---------------------------------------------------------------
nomount階段(資料庫裝載階段)是可以修改參數的
上面的nomount階段完成以後 就可以執行mount階段了
>alter database mount    #這個就是把資料庫開啟到mount階段

mount階段的啟動資料庫就會去讀取控制檔案
>show parameter control_file  #這個是控制檔案
mount階段可以對資料庫的物理結構進行操作:
alter database 指令
啟用和禁用重做日誌歸檔
執行資料庫恢複
create database 指令
drop database 指令

-------------------------------------------------------
資料庫開啟階段
判斷資料檔案是否存在
判斷資料庫檔案的狀態
開啟聯機資料檔案
開啟聯機重做記錄檔

>alter database open  #這個是開啟資料庫了

>select open_mode from v$database; #這個是查詢資料當前的狀態

啟動的指令有以下這些:
startup [force][open][pfile=xx][nomount][mount][restrict][revover]

[database]

open:使使用者得以訪問資料庫
mount:為某些DBA活動裝載資料庫但不允許訪問資料庫
nomount:建立SGA並啟動後台進程但不允許訪問資料庫
pfile=xxx:允許使用預設參數檔案配置常式
force:強制執行
restrict:只允許具有restrict session許可權的使用者訪問資料庫
recover:在啟動資料庫時開始介子恢複

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

關閉資料庫
是將緩衝區快取中更改重做日誌緩衝區快取中的條目寫入資料檔案和聯機重做日誌
關閉所有聯機資料檔案和聯機重做記錄檔
卸載資料庫
關閉其控制檔案
關閉執行個體
alert 檔案和追蹤檔案將關閉
SGA被回收且後天進程被終止

shutdown [normal|transactional | immediate|abort]


詳細請進入個人部落格地址:
http://www.oracleandmysql.com/article-detials/1


oracle啟動與關閉的幾種模式

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.