Oracle RAC 環境 引數檔案的啟動順序
Oracle RAC啟動時,如何找到引數檔案位置的。
在單機環境下,Oracle查詢啟動引數檔案的順序是 spfile<Oracle_SID>.ora ---> spfile>.ora ---->.init<Oracle_SID>.ora
下面我們測試在RAC環境下的引數檔案查詢順序
我們將ASM中的引數檔案複製至$ORACLE_HOME/dbs/目錄下 ,並改名為spfileorcl1.ora,在ASM中的檔名為 spfileorcl.ora
[oracle@rac1 dbs]$ echo $ORACLE_SID orcl1 [oracle@rac1 dbs]$ pwd /u01/app/oracle/product/11.2.0/dbhome_1/dbs [oracle@rac1 dbs]$ ll total 24 -rw-rw---- 1 oracle asmadmin 1544 Jan 10 22:04 hc_orcl1.dat -rw-r--r-- 1 oracle oinstall 2851 May 15 2009 init.ora -rw-r----- 1 oracle oinstall 37 Dec 23 18:31 initorcl1.ora -rw-r----- 1 oracle oinstall 1536 Dec 23 17:55 orapworcl1 -rw-r----- 1 oracle oinstall 4608 Jan 10 22:03 spfileorcl1.ora [oracle@rac1 dbs]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Thu Jan 10 22:25:00 2019 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 784998400 bytes Fixed Size 2257352 bytes Variable Size 616566328 bytes Database Buffers 163577856 bytes Redo Buffers 2596864 bytes Database mounted. Database opened. SQL> show parameter spfile NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ spfile string /u01/app/oracle/product/11.2.0 /dbhome_1/dbs/spfileorcl1.ora
資料庫啟動成功。使用/u01/app/oracle/product/11.2.0 /dbhome_1/dbs/spfileorcl1.ora 引數檔案
修改sspfileorcl1.ora 檔名為 spfile.ora 重啟資料庫 [oracle@rac1 dbs]$ mv spfileorcl1.ora spfile.ora [oracle@rac1 dbs]$ ll total 24 -rw-rw---- 1 oracle asmadmin 1544 Jan 10 22:25 hc_orcl1.dat -rw-r--r-- 1 oracle oinstall 2851 May 15 2009 init.ora -rw-r----- 1 oracle oinstall 37 Dec 23 18:31 initorcl1.ora -rw-r----- 1 oracle oinstall 1536 Dec 23 17:55 orapworcl1 -rw-r----- 1 oracle oinstall 4608 Jan 10 22:28 spfile.ora [oracle@rac1 dbs]$ SQL> shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL> startup ORACLE instance started. Total System Global Area 784998400 bytes Fixed Size 2257352 bytes Variable Size 616566328 bytes Database Buffers 163577856 bytes Redo Buffers 2596864 bytes Database mounted. Database opened. SQL> show parameter spfile NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ spfile string /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfile.ora
資料庫啟動成功,使用 /u01/app/oracle/product/11.2.0/dbhome_1/dbs/spfile.ora檔案
修改spfile.ora 檔名為spfile1.ora 重啟資料庫 [oracle@rac1 dbs]$ mv spfile.ora spfile1.ora SQL> startup ORACLE instance started. Total System Global Area 784998400 bytes Fixed Size 2257352 bytes Variable Size 616566328 bytes Database Buffers 163577856 bytes Redo Buffers 2596864 bytes Database mounted. Database opened. SQL> show parameter spfile NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ spfile string +DATA01/orcl/spfileorcl.ora
也啟動成功,使用的是ASM裡的引數檔案
我們將ORACLE_SID修改成任意值,啟動資料庫 export ORACLE_SID=orcl11 SQL> startup ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initorcl11.ora'
提示找不到 initorcl11.ora 檔案,其中orcl11是我們剛剛修改的ORACLE_SID值,那麼我們看看正確的檔案initorcl1.ora的檔案是什麼呢。
[oracle@rac1 dbs]$ cat initorcl1.ora SPFILE='+DATA01/orcl/spfileorcl.ora'
原來是指向ASM磁碟中的檔案地址。使用這個檔案,可以把引數檔案指向任意一個地方。
- 總結:
在Oracle RAC環境下,Oracle在啟動的過程中查詢啟動引數檔案與單機環境下是一樣的:
spfile<Oracle_SID>.ora ---> spfile>.ora ---->init<Oracle_SID>.ora
在使用ASM儲存啟動引數檔案的時候,引數檔案的位置被儲存在了init<Oracle_SID>.ora檔案中
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/2317695/viewspace-2375484/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle啟動例項時使用引數檔案的順序Oracle
- ORACLE RAC 的啟動和關閉順序Oracle
- Oracle在啟動時會按以下的順序查詢引數檔案(WINDOWS平臺):OracleWindows
- Hadoop叢集環境啟動順序Hadoop
- Unix環境和Windows環境下Oracle引數檔案位置:WindowsOracle
- 【STARTUP】Oracle資料庫啟動過程中引數檔案的使用的順序及注意事項Oracle資料庫
- nls引數、環境變數以及函式等起作用的順序!變數函式
- Oracle RAC引數檔案管理Oracle
- [20180131]啟動時引數檔案的優先順序.txt
- Shell啟動檔案與環境變數(轉)變數
- Oracle RAC修改引數檔案位置Oracle
- Oracle RAC引數設定優先順序別問題分析Oracle
- MySQL讀取配置檔案的順序、啟動方式、啟動原理MySql
- Oracle 10g RAC正常關閉及啟動順序Oracle 10g
- RAC環境下單例項啟動Oracle資料庫重建控制檔案案例單例Oracle資料庫
- Linux啟動時讀取配置檔案的順序Linux
- RAC環境中的TNSNAMES檔案
- (轉)Oracle中的啟動引數檔案:spfile和pfileOracle
- RAC環境重建控制檔案
- 【Oracle】RAC11gR2Grid啟動順序及啟動故障診斷思路Oracle
- 【RAC】Oracle RAC叢集環境下日誌檔案結構Oracle
- RAC環境中的快照控制檔案
- RAC環境中的密碼檔案密碼
- 程式初始(二)——程式優先順序,環境變數變數
- Oracle RAC啟動歸檔時需要設定CLUSTER_DATABASE引數嗎?OracleDatabase
- C/C++多引數函式引數的計算順序與壓棧順序C++函式
- 超大記憶體環境下的Oracle RAC引數設定建議記憶體Oracle
- oracle的引數檔案Oracle
- oracle pfile spfile啟動順序 優先順序 spfilesid 〉 spfile 〉 initsidOracle
- Mysql關於my.cnf引數檔案的讀取順序及各項配置的覆蓋優先順序MySql
- Windows XP 指定啟動專案的順序(轉)Windows
- RAC環境中的初始化檔案
- oracle 11G引數檔案之伺服器引數檔案(spfile)與例項啟動的關係Oracle伺服器
- Oracle DG主備啟動關閉順序Oracle
- Linux 修改核心啟動預設引導順序Linux
- Oracle 引數檔案Oracle
- MongoDB啟動檔案配置引數詳解MongoDB
- linux啟動順序Linux