




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、SHUTDOWN NORMAL:不允許新的連接、等待會話結束、等待事務結束、做一個檢查點并關閉數據文件。啟動時不需要實例恢復。SHUTDOWN TRANSACTIONAL:不允許新的連接、不等待會話結束、等待事務結束、做一個檢查點并關閉數據文件。啟動時不需要實例恢復。SHUTDOWN IMMEDIATE:不允許新的連接、不等待會話結束、不等待事務結束、做一個檢查點并關閉數據文件。沒有結束的事務是自動rollback的。啟動時不需要實例恢復。 SHUTDOWN ABORT:不允許新的連接、不等待會話結束、不等待事務結束、不做檢查點且沒有關閉數據文件。啟動時自動進行實例恢復。oracle的啟動過程
2、 Oracle 的啟動需要經歷四個狀態(tài),SHUTDOWN 、NOMOUNT 、MOUNT 、OPEN、 SHUTDOWN狀態(tài) 第一狀態(tài)沒什么好解釋的,oracle的所有文件都靜靜的躺在磁盤里,一切都還未開始,屬于關機狀態(tài) NOMOUNT狀態(tài)
3、; Starting the instance (nomount)* Reading the initialization file from $ORACLE_HOME/dbs in the following order:-first spfileSID.ora-if not found then, spfile.ora-if not found then, initSID.oraSpeci
4、fying the PFILE parameter with STARTUP overrides the default behavior.* Allocating the SGA* Starting the background processes * Opening the alertSID.log file and the trace filesThe database must be named with the DB_NAME parameter either in the initialization Parame
5、ter file or in the STARTUP command.- * 讀取環(huán)境變量下dbs目錄下的參數文件(spfile/pfile) ora10localhost dbs$ pwd/ora10/product/10.2.0/db_1/dbsora10localhost dbs$ ll-rw-r- 1 ora10 dba 3584 07-19 22:07 spfilechongshi.ora-rw-r- 1 ora10 dba 3584 07-23 22:00 spfile.ora-rw-r-r- 1 ora10 dba 1106
6、 07-19 21:47 initchongshi.ora查找參數文件的順序如上面列表的,讀取優(yōu)先級spfilechongshi.ora > spfile.ora>initchongshi.ora 如果三個文件都找不到的話,那么將啟動失敗。* 啟動算法,分配內存 * 啟動后臺進程* 開放alertSID.log文件和跟蹤文件 ora10localhost dbs$ sqlplus SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 24 22:33:54 2012Copy
7、right (c) 1982, 2005, Oracle. All rights reserved.Enter user-name: /as sysdbaConnected to an idle instance.SQL> startup nomount;ORACLE instance started.Total System Global Area 205520896 bytesFixed Size 1218532 bytesVariabl
8、e Size 79693852 bytes Database Buffers 121634816 bytes Redo Buffers 2973696 bytes 現在就處在一個nomount狀態(tài)。 mount狀態(tài) &
9、#160; Mounting a database includes the following tasks: * Associating a database with a previously started instance * Locating and opening the co
10、ntrol files specified in the parameter file * Reading the control files to obtain the names and status of the data files and online redo log files.However,no checks are performed to verify the existence of the data files and online redo log files at this time. -* 把一個數據庫和啟動的實例關聯起來 * 在參
11、數文件(spfile/pfile)中找到控制文件進行讀取 查看參數文件: ora10localhost dbs$ strings spfileora10.ora | more .*.control_files='/ora10/product/oradata/ora10/control01.ctl','/ora10/product/ora data/ora10/control02.ctl','/ora10/product/oradata/ora10/control03.ctl' .
12、60;控制文件: ora10localhost $ cd /ora10/product/oradata/ora10/ ora10localhost ora10$ ll 總計 954196 -rw-r- 1 ora10 dba 7061504 07-23 23:01 control01.ctl -rw-r- 1 ora10 dba 7061504 07-23 23:01 control02.ctl -rw-r- 1 ora10 dba 7061504 07-23 23:01 co
13、ntrol03.ctl * 讀取控制文件,獲得的數據文件和聯機重做日志文件,然而,在這個時候沒有進行檢查以驗證存在的數據文件和聯機重做日志文件 ora10localhost dbs$ sqlplus SQL*Plus: Release 10.2.0.1.0 - Production on Tue Jul 24 23:02:28 2012 Copyright (c) 1982, 2005, Oracle. All rights reserved. Enter user-name: /as sysdba Connected t
14、o an idle instance. SQL> startup mount; ORACLE instance started. Total System Global Area 205520896 bytes Fixed Size 1218532 bytes Variable Size 79693852 by
15、tes Database Buffers 121634816 bytes Redo Buffers 2973696 bytes Database mounted. 現在進入了數據庫的mount狀態(tài),我們通過mount啟動的時候,下面會多一句提示“Database mounted.” 數據庫準備就緒。 open狀態(tài) &
16、#160; opening the database includes the following tasks opening the online data log files opening the onling redo log files If any of the da
17、tafiles or noline redo log files are not present when you attempt to open the database ,the oracle server returns an error.During this final stage,the oracle server verfies that all the data files and online redo log files can be opened and checks the consistency of the database . If necessary , the
18、 SMON background process initiates instance recovery.- 打開數據庫包括下列任務: 打開在線數據日志文件 打開聯機重做日志文件 如果任何數據文件或非線性重做日志文件不存在,當您試圖打開的數據庫,服務器返回錯誤。 在這最后階段,該服務器驗證所有數據文件和聯機重做日志文件可以打開并檢查數據庫的一致性。如果需要,該系統(tǒng)監(jiān)控進程(SMON)開始實例恢復。數據庫關閉的三種方式
19、160; 1、shutdown normal 正常方式關閉數據庫。 2、shutdown immediate 立即方式關閉數據庫。 在SVRMGRL中執(zhí)行shutdown immediate,數據庫并不立即關閉, 而是在Oracle執(zhí)行某些清除工作后才關閉(終止會話、釋放會話資源), 當使用shutdown不能關閉數據庫時,shutd
20、own immediate可以完成數據庫關閉的操作。 3、shutdown abort 直接關閉數據庫,正在訪問數據庫的會話會被突然終止, 如果數據庫中有大量操作正在執(zhí)行,這時執(zhí)行shutdown abort后,重新啟動數據庫需要很長時間。ORACLE數據庫的啟動過程一、啟動數據庫到nomount狀態(tài) ORACLE首先尋找參數文件,根據參數文件中的設置,創(chuàng)建實例,分配內存,啟動后臺進程。 查找參數文件順序:spfileSID.ora,spfi
21、le.ora,initSID.ora;沒找到則報錯,啟動不了Instance; 啟動該狀態(tài)后可能通過show parameter 查看相關參數;但不能訪問DB的結構信息,如select * from v$database;則報錯。二、啟動數據庫到mount狀態(tài) ORACLE據參數文件獲得控制文件的位置,讀取并鎖定控制文件; 在這一步驟中,需要計算mount id并記錄在控制文件中,然后開始啟動心跳,每三秒更新一次控制文件。 同時該過程也需要口令文件,默認是在$ORACLE_HOME/dbs目錄下,缺省的名稱為:orapw<sid>。如果不存在則查找orapw文件,兩者都不存在則報錯: ORA-01990: error opening password file '$ORACLE_HOME/dbs/orapw'
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 農村板車出售合同范例
- 公司注銷業(yè)務合同范本
- 中醫(yī)診所招聘合同范本
- 單位出售土地合同范本
- 公司車定維修合同范本
- 共享出租場地合同范本
- 勞務聯營合同范例
- 加油站出租合同范本
- 企業(yè)賦能合同范本
- 二手房房東出租合同范例
- 智能農業(yè)除草機器人研究現狀與趨勢分析
- 社會救助公共基礎知識題庫及答案
- 《論文所用框架圖》課件
- 人教版三年級下冊說課標、說教材
- 《民法典》背景下違約精神損害賠償制度適用問題
- 松下機器人操作手冊
- 數字電路邏輯設計(第3版)PPT全套完整教學課件
- 中國商貿文化 貨幣簡史
- 境外道路貨物運輸應急預案
- 高中校本課程-網絡營銷概述教學設計學情分析教材分析課后反思
- 管理學-北京師范大學中國大學mooc課后章節(jié)答案期末考試題庫2023年
評論
0/150
提交評論