做爰高潮a片〈毛片〉,尤物av天堂一区二区在线观看,一本久久A久久精品VR综合,添女人荫蒂全部过程av

最新文章專題視頻專題問答1問答10問答100問答1000問答2000關(guān)鍵字專題1關(guān)鍵字專題50關(guān)鍵字專題500關(guān)鍵字專題1500TAG最新視頻文章推薦1 推薦3 推薦5 推薦7 推薦9 推薦11 推薦13 推薦15 推薦17 推薦19 推薦21 推薦23 推薦25 推薦27 推薦29 推薦31 推薦33 推薦35 推薦37視頻文章20視頻文章30視頻文章40視頻文章50視頻文章60 視頻文章70視頻文章80視頻文章90視頻文章100視頻文章120視頻文章140 視頻2關(guān)鍵字專題關(guān)鍵字專題tag2tag3文章專題文章專題2文章索引1文章索引2文章索引3文章索引4文章索引5123456789101112131415文章專題3
問答文章1 問答文章501 問答文章1001 問答文章1501 問答文章2001 問答文章2501 問答文章3001 問答文章3501 問答文章4001 問答文章4501 問答文章5001 問答文章5501 問答文章6001 問答文章6501 問答文章7001 問答文章7501 問答文章8001 問答文章8501 問答文章9001 問答文章9501
當(dāng)前位置: 首頁 - 科技 - 知識(shí)百科 - 正文

淺析RAC下SPFILE文件修改之整理三篇文章

來源:懂視網(wǎng) 責(zé)編:小采 時(shí)間:2020-11-09 15:03:25
文檔

淺析RAC下SPFILE文件修改之整理三篇文章

淺析RAC下SPFILE文件修改之整理三篇文章:關(guān)于RAC下spfile淺析_整理于_2014.4.17 第一篇:RAC下SPFILE文件修改 在RAC下spfile位置的修改與單節(jié)點(diǎn)環(huán)境不完全一致,有些地方需要特別注意,否則可能修改會(huì)失敗。 下面用一個(gè)例子說明:SPFILE放在ASM中一個(gè)不正確的目錄(+ARCH)中,現(xiàn)在想把它放在另
推薦度:
導(dǎo)讀淺析RAC下SPFILE文件修改之整理三篇文章:關(guān)于RAC下spfile淺析_整理于_2014.4.17 第一篇:RAC下SPFILE文件修改 在RAC下spfile位置的修改與單節(jié)點(diǎn)環(huán)境不完全一致,有些地方需要特別注意,否則可能修改會(huì)失敗。 下面用一個(gè)例子說明:SPFILE放在ASM中一個(gè)不正確的目錄(+ARCH)中,現(xiàn)在想把它放在另

關(guān)于RAC下spfile淺析_整理于_2014.4.17 第一篇:RAC下SPFILE文件修改 在RAC下spfile位置的修改與單節(jié)點(diǎn)環(huán)境不完全一致,有些地方需要特別注意,否則可能修改會(huì)失敗。 下面用一個(gè)例子說明:SPFILE放在ASM中一個(gè)不正確的目錄(+ARCH)中,現(xiàn)在想把它放在另外一個(gè)

關(guān)于RAC下spfile淺析_整理于_2014.4.17

第一篇:RAC下SPFILE文件修改

在RAC下spfile位置的修改與單節(jié)點(diǎn)環(huán)境不完全一致,有些地方需要特別注意,否則可能修改會(huì)失敗。

下面用一個(gè)例子說明:SPFILE放在ASM中一個(gè)不正確的目錄(+ARCH)中,現(xiàn)在想把它放在另外一個(gè)目錄(+DBSYS)下。

以下是具體步驟:

1. 原spfile位置

SQL> show parameter spfile

NAME TYPE VALUE

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

spfile string +ARCH/dwrac/spfiledwrac.ora

2. 拷貝spfile到其他目錄

由于在ASM中,不能直接cp,需要通過迂回的辦法實(shí)現(xiàn)。

sys@dwrac2> create pfile='/tmp/pfile.ora'from spfile;

File created.

sys@dwrac2> createspfile='+DBSYS/dwrac/spfiledwrac.ora' from pfile='/tmp/pfile.ora';

File created.

3. 修改所有節(jié)點(diǎn)$ORACLE_HOME/dbs/init下的參數(shù)文件

[oracle@dwdb04 dbs]$ vi initdwrac2.ora

SPFILE='+ARCH/dwrac/spfiledwrac.ora'

==>

SPFILE='+DBSYS/dwrac/spfiledwrac.ora'

4. 通過sqlplus方式重啟實(shí)例

sys@dwrac2> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

sys@dwrac2> startup

ORACLE instance started.

Total System Global Area 5.2429E+10 bytes

Fixed Size 2193872 bytes

Variable Size 3707766320 bytes

Database Buffers 4.8671E+10 bytes

Redo Buffers 48136192 bytes

Database mounted.

Database opened.

sys@dwrac2> show parameter spfile

NAME TYPE VALUE

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

spfile string +DBSYS/dwrac/spfiledwrac.ora

可以發(fā)現(xiàn),spfile已經(jīng)修改成功。

5. 但是如果用過srvctl重啟數(shù)據(jù)庫,發(fā)現(xiàn)spfile又變回來了:

[oracle@dwdb02 dbs]$ srvctl stop instance-d dwrac -i dwrac1,dwrac2,dwrac3,dwrac4

[oracle@dwdb02 dbs]$ srvctl start instance-d dwrac -i dwrac1,dwrac2,dwrac3,dwrac4

[oracle@dwdb02 dbs]$ sqlplus "/assysdba"

sys@dwrac2> show parameter spfile

NAME TYPE VALUE

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

spfile string +ARCH/dwrac/spfiledwrac.ora

6. 原因及解決

這是為什么呢?實(shí)際上在RAC環(huán)境中,我們更多時(shí)候是用srvctl來管理RAC資源,而srvctl的信息來自ocr,包括spfile的位置信息。我們剛才那樣做雖然修改了參數(shù)文件的位置,但是ocr并不知道,它還用原來的文件啟動(dòng)數(shù)據(jù)庫。

我們可以用srvctl查看數(shù)據(jù)庫的配置信息來確認(rèn):

[oracle@dwdb01 dbs]$ srvctl config database-d dwrac -a

dwdb01 dwrac1 /oracle/product/10.2.0/db

dwdb02 dwrac2 /oracle/product/10.2.0/db

dwdb03 dwrac3 /oracle/product/10.2.0/db

dwdb04 dwrac4 /oracle/product/10.2.0/db

DB_UNIQUE_NAME: dwrac

DB_NAME: dwrac

ORACLE_HOME: /oracle/product/10.2.0/db

SPFILE: +ARCH/dwrac/spfiledwrac.ora

DOMAIN: null

DB_ROLE: null

START_OPTIONS: null

POLICY: AUTOMATIC

ENABLE FLAG: DB ENABLED

可以看到,SPFILE的位置指向是+ARCH。解決方法是通過srvctl修改SPFILE的位置。

[oracle@dwdb01 dbs]$ srvctl modify database-d dwrac -p '+DBSYS/dwrac/spfiledwrac.ora'

[oracle@dwdb01 dbs]$ srvctl config database-d dwrac -a

dwdb01 dwrac1 /oracle/product/10.2.0/db

dwdb02 dwrac2 /oracle/product/10.2.0/db

dwdb03 dwrac3 /oracle/product/10.2.0/db

dwdb04 dwrac4 /oracle/product/10.2.0/db

DB_UNIQUE_NAME: dwrac

DB_NAME: dwrac

ORACLE_HOME: /oracle/product/10.2.0/db

SPFILE: +DBSYS/dwrac/spfiledwrac.ora

DOMAIN: null

DB_ROLE: null

START_OPTIONS: null

POLICY: AUTOMATIC

ENABLE FLAG: DB ENABLED

[oracle@dwdb01 dbs]$ srvctl stop database-d dwrac

[oracle@dwdb01 dbs]$ srvctl start database-d dwrac

sys@dwrac2> show parameter spfile

NAME TYPE VALUE

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

spfile string +DBSYS/dwrac/spfiledwrac.ora

可以看到,此時(shí)Oracle是用新的spfile啟動(dòng)的。

7.總結(jié)

在RAC環(huán)境下修改spfile:

1. 需要修改$ORACLE_HOME/dbs下的相關(guān)文件,指向新文件

2. 需要用srvctl修改config信息,指向新文件

第二篇:Oracle ASM存儲(chǔ)Spfile解析

以下來自論壇:

在之前的文章《Oracle Restart啟動(dòng)數(shù)據(jù)庫實(shí)例故障一例》(http://space.itpub.net/17203031/viewspace-774622)中,筆者解決了一個(gè)由于使用create pfilefrom spfile引起的Restart無法啟動(dòng)數(shù)據(jù)庫實(shí)例的故障。

嚴(yán)格的說,筆者并沒有完全將其解決。主要體現(xiàn)在Spfile的使用和存放上。

1、問題簡述

Oracle Database安裝在ASM存儲(chǔ)的時(shí)候,默認(rèn)都是使用ASM保存Spfile參數(shù)文件。與早期的pfile文件不同,Spfile是具有二進(jìn)制格式,能夠支持部分參數(shù)的動(dòng)態(tài)調(diào)整。

所以,我們出現(xiàn)問題的時(shí)候,發(fā)現(xiàn)Restart的配置信息中包括了ASM中的Spfile參數(shù)內(nèi)容。

[oracle@SimpleLinux ~]$ srvctl config database -d ora11g

Database unique name: ora11g

Database name:

Oracle home: /u01/app/oracle/product/11.2.0/db_1

Oracle user: oracle

Spfile: +DATA/ORA11G/spfileora11g.ora

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Database instance: ora11g

Disk Groups: DATA,RECO

Services:

我們之前的修復(fù)方法,就是將spfile內(nèi)容置空,讓數(shù)據(jù)庫實(shí)例啟動(dòng)使用默認(rèn)路徑$ORACLE_HOME/dbs的spfile和pfile參數(shù)進(jìn)行檢索。

SQL> show parameter spfile

NAME TYPE VALUE

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

spfile string /u01/app/oracle/product/11.2.0

/db_1/dbs/spfileora11g.ora

但是此時(shí),我們在ASM路徑上是存在spfile上的。

ASMCMD> pwd

+DATA/ORA11G

ASMCMD> ls

CONTROLFILE/

DATAFILE/

ONLINELOG/

PARAMETERFILE/

TEMPFILE/

spfileora11g.ora

在這種情況下,如果配置了ASM目錄的spfile啟動(dòng)標(biāo)志,啟動(dòng)Restart會(huì)報(bào)錯(cuò)。

[oracle@SimpleLinux ~]$ srvctl modify database -d ora11g-p +DATA/ora11g/spfileora11g.ora

[oracle@SimpleLinux ~]$ srvctl start database -d ora11g

PRCR-1079 : Failed to start resource ora.ora11g.db

CRS-5010: Update of configuration file "/u01/app/oracle/product/11.2.0/db_1/dbs/initora11g.ora"failed: details at "(:CLSN00014:)" in"/u01/app/grid/product/11.2.0/grid/log/simplelinux/agent/ohasd/oraagent_grid/oraagent_grid.log"

CRS-5017: The resource action "ora.ora11g.db start" encounteredthe following error:

CRS-5010: Update of configuration file"/u01/app/oracle/product/11.2.0/db_1/dbs/initora11g.ora" failed:details at "(:CLSN00014:)" in "/u01/app/grid/product/11.2.0/grid/log/simplelinux/agent/ohasd/oraagent_grid/oraagent_grid.log"

. For details refer to "(:CLSN00107:)" in"/u01/app/grid/product/11.2.0/grid/log/simplelinux/agent/ohasd/oraagent_grid/oraagent_grid.log".

CRS-2674: Start of 'ora.ora11g.db' on 'simplelinux' failed

2、分析和思考

一起冷靜想想~

Pfile和spfile是參數(shù)文件經(jīng)歷的兩個(gè)階段。在umount階段,Oracle是通過參數(shù)$ORACLE_HOME和$ORACLE_SID進(jìn)行目錄定位,定位到$ORACLE_HOME/dbs或者$ORACLE_HOME/database,到里面尋找制定規(guī)則的參數(shù)文件。

Oracle首先會(huì)去尋找Spfile,之后才會(huì)去找Pfile。我們通過create spfile和create pfile可以實(shí)現(xiàn)兩者的轉(zhuǎn)化。

一個(gè)比較常見的問題案例是:如果我們把啟動(dòng)參數(shù)改錯(cuò)了,啟動(dòng)不了了,那么怎么辦?標(biāo)準(zhǔn)的做法是通過create pfilefrom spfile,拿到一個(gè)文本格式的參數(shù)pfile。在里面修改啟動(dòng)參數(shù),糾正錯(cuò)誤。啟動(dòng)時(shí)候,使用startuppfile=xxx使用“指定的pfile”啟動(dòng)數(shù)據(jù)庫實(shí)例,再通過create spfile from pfile將變化固化下來。

Oracle Restart提供的配置參數(shù)spfile其實(shí)是很詭異的。從直觀上看,好像是有startup數(shù)據(jù)庫實(shí)例,后面可以自己去指定參數(shù)文件,類似于startupspfile=xxx的作用。但是實(shí)際上,startup是不支持spfile這樣的參數(shù)的。

如果這個(gè)參數(shù)是用于指定,那么在Restart啟動(dòng)的時(shí)候我們已經(jīng)設(shè)置爭取的spfile位置,指定位置上面也有文件。但是根本沒有效果,Oracle還是尋找參數(shù)文件。

那么,就只有一種可能性:即使Oracle使用Restart啟動(dòng),也不是依靠指定的spfile,還是按照原有的規(guī)則運(yùn)行。

網(wǎng)絡(luò)上有一種方法,說的是如果我們需要指定一個(gè)spfile啟動(dòng)文件的時(shí)候,應(yīng)該怎么做。答案是建立一個(gè)空的pfile文件,里面直接指定SPFILE參數(shù)的文件位置。

綜合幾種思路,我們可以設(shè)想到Spfile保存在ASM里面,同時(shí)讓Restart和sqlplus啟動(dòng)時(shí)候可以訪問到ASMSpfile的方法。

3、配置ASM上SPFILE啟動(dòng)

首先是創(chuàng)建出ASM上的spfile。注意:創(chuàng)建spfile的時(shí)候一定是從pfile創(chuàng)建,所以需要轉(zhuǎn)換一下。

SQL> startuppfile=/u01/app/oracle/product/11.2.0/db_1/dbs/initora11g.ora

ORACLE instance started.

Total System Global Area 263639040bytes

Fixed Size 1344312bytes

Variable Size 134221000bytes

Database Buffers 125829120bytes

Redo Buffers 2244608bytes

Database mounted.

Database opened.

SQL> show parameter spfile

NAME TYPE VALUE

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

spfile string

SQL> create spfile='+DATA/ORA11G/spfileora11g.ora'from pfile;

File created.

此時(shí),我們在ASM里面可以看到生成的spfile二進(jìn)制文件。

ASMCMD> ls -l

Type Redund Striped Time Sys Name

Y CONTROLFILE/

Y DATAFILE/

Y ONLINELOG/

Y PARAMETERFILE/

Y TEMPFILE/

N spfileora11g.ora => +DATA/ORA11G/PARAMETERFILE/spfile.267.829130539

第二部是創(chuàng)建維護(hù)一個(gè)“轉(zhuǎn)發(fā)”參數(shù)文件。

SQL> shutdown immediate;

Database closed.

Database dismounted.

ORACLE instance shut down.

[oracle@SimpleLinux ~]$ cd $ORACLE_HOME

[oracle@SimpleLinux db_1]$ cd dbs

[oracle@SimpleLinux dbs]$ ls -l

total 28

-rw-rw---- 1 oracle asmadmin 1544 Sep 12 12:58 hc_ora11g.dat

-rw-r--r-- 1 oracle oinstall 2851 May 15 2009 init.ora

-rwxr-x--- 1 oracle oinstall 959 Oct 18 09:51 initora11g.ora

-rwxrwx--- 1 oracle oinstall 887Sep 29 09:31 initora11g.ora.bk

-rw-r----- 1 oracle asmadmin 24Sep 12 12:58 lkORA11G

-rw-r----- 1 oracle oinstall 1536 Sep 12 13:11 orapwora11g

-rw-r----- 1 oracle asmadmin 2560 Oct 18 09:57spfileora11g.ora

在里面要完成兩件事情,一個(gè)是將dbs目錄下面的spfile刪除。因?yàn)橐罁?jù)Oracle啟動(dòng)的原則,是先找spfile,之后再找pfile。第二件是修改文本參數(shù)文件,作為轉(zhuǎn)發(fā)。

[oracle@SimpleLinux dbs]$ mv spfileora11g.ora spfileora11g.ora.bk

[oracle@SimpleLinux dbs]$ cat initora11g.ora

SPFILE='+DATA/ora11g/spfileora11g.ora’ –注意:不能包括*前綴或者SID前綴

[oracle@SimpleLinux dbs]$ ls -l

total 28

-rw-rw---- 1 oracle asmadmin 1544 Sep 12 12:58 hc_ora11g.dat

-rw-r--r-- 1 oracle oinstall 2851 May 15 2009 init.ora

-rwxr-x--- 1 oracle oinstall 41Oct 18 10:07 initora11g.ora

-rwxrwx--- 1 oracle oinstall 887Sep 29 09:31 initora11g.ora.bk

-rw-r----- 1 oracle asmadmin 24Sep 12 12:58 lkORA11G

-rw-r----- 1 oracle oinstall 1536 Sep 12 13:11 orapwora11g

-rw-r----- 1 oracle asmadmin 2560 Oct 18 09:57 spfileora11g.ora.bk

使用srvctl關(guān)閉和啟動(dòng)數(shù)據(jù)庫。

[oracle@SimpleLinux dbs]$ srvctl start database -d ora11g

[oracle@SimpleLinux dbs]$ srvctl config database -d ora11g

Database unique name: ora11g

Database name:

Oracle home: /u01/app/oracle/product/11.2.0/db_1

Oracle user: oracle

Spfile: +DATA/ora11g/spfileora11g.ora

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Database instance: ora11g

Disk Groups: DATA,RECO

Services:

[oracle@SimpleLinux dbs]$ srvctl status database -d ora11g

Database is running.

數(shù)據(jù)庫中,spfile參數(shù)被設(shè)置為ASM路徑。

SQL> show parameter spfile;

NAME TYPE VALUE

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

spfile string +DATA/ora11g/spfileora11g.ora

故障徹底解決。

4、結(jié)論

綜合上面的實(shí)驗(yàn),我們可以看到ASM下Spfile使用的方法。ASM下的Spfile并不是拋棄原有的啟動(dòng)規(guī)則,而是借助原有的pfile進(jìn)行了目標(biāo)轉(zhuǎn)接。之后筆者查看MOS中的對應(yīng)方案,官方推薦的也是這樣的做法。

這樣就需要一個(gè)前提,就是dbs或者database目錄中不能包括spfile。如果包括了,Oracle設(shè)置的轉(zhuǎn)接機(jī)制就被替換掉了。

另一個(gè)問題是我們一直看到的錯(cuò)誤提示信息,提示參數(shù)文件initora11g.ora格式不能識(shí)別。筆者的理解是,原始的文件是筆者使用create pfilefrom spfile創(chuàng)建出來的,默認(rèn)的SPFILE=XXX的內(nèi)容被覆蓋。而Oracle Restart不能識(shí)別這種非轉(zhuǎn)接內(nèi)容文件,所以報(bào)錯(cuò)。

第三篇:Oracle Restart啟動(dòng)數(shù)據(jù)庫實(shí)例故障一例

網(wǎng)絡(luò)整理:

Oracle Restart是11gR2中推出的重要高可用(HighAvailability)特性。在Single Instance情況下,Clusterware形成一個(gè)可用性維護(hù)框架,Oracle組件服務(wù)都是在這個(gè)維護(hù)管理框架上進(jìn)行管理。

Oracle Restart從職責(zé)上負(fù)責(zé)兩方面的功能,一個(gè)是Oracle各個(gè)服務(wù)組件的自動(dòng)啟動(dòng)。鑒于組件間復(fù)雜的依賴關(guān)系,使用Restart自動(dòng)的進(jìn)行啟動(dòng)順序調(diào)節(jié)是比較好的一種策略。另一個(gè)功能是高可用支持,如果某一個(gè)組件意外被終止運(yùn)行,比如異常中斷,Oracle Restart是可以定期的檢查“治下”組件的生存情況,一旦檢查出問題就會(huì)進(jìn)行自動(dòng)的啟動(dòng)。

目前單實(shí)例Oracle使用Oracle Restart支持的組件內(nèi)容有:監(jiān)聽器Listener、Oracle實(shí)例和數(shù)據(jù)庫、ASM實(shí)例、ASM磁盤組、數(shù)據(jù)庫服務(wù)Service和ONS(OracleNotification Service)。

本篇記錄筆者遇到的一個(gè)故障場景,不甚復(fù)雜,和行業(yè)大牛們大作不敢相比。權(quán)當(dāng)思路記錄,留待需要的朋友不時(shí)之需。

1、問題故障出現(xiàn)

在一臺(tái)11gR2的Oracle上,筆者部署了單實(shí)例ASM實(shí)例和磁盤組結(jié)構(gòu),并且在上面部署了SingleInstance Oracle。由于是測試使用,筆者在上面進(jìn)行過一些測試和實(shí)驗(yàn),今天啟動(dòng)服務(wù)器之后,發(fā)現(xiàn)問題。

grid@SimpleLinux simplelinux]$ uptime

13:58:13 up 2:24, 1 user, load average: 0.03, 0.02, 0.00

[grid@SimpleLinux simplelinux]$ ps -ef |grep pmon

grid 3212 1 0 11:35 ? 00:00:01 asm_pmon_+ASM

grid 27724 27685 0 13:58 pts/0 00:00:00 grep pmon

根據(jù)標(biāo)準(zhǔn)的Oracle Restart配置,ASM實(shí)例、ASM磁盤組和數(shù)據(jù)庫實(shí)例都是在Restart管理范圍,應(yīng)該是隨著服務(wù)器啟動(dòng)而自動(dòng)啟動(dòng)。但是從實(shí)際情況看,ASM實(shí)例已經(jīng)自動(dòng)啟動(dòng),數(shù)據(jù)庫實(shí)例沒有啟動(dòng)。

同RAC結(jié)構(gòu)一樣,Restart也是借助服務(wù)器啟動(dòng)過程中,以ohasd為首的高可用守護(hù)進(jìn)程進(jìn)行步步啟動(dòng)動(dòng)作。

這種情況下,查看日志信息是最好的選擇,看看那個(gè)環(huán)節(jié)出現(xiàn)問題。

[grid@SimpleLinux simplelinux]$ pwd

/u01/app/grid/product/11.2.0/grid/log/simplelinux

[grid@SimpleLinux simplelinux]$ ls -l |grep alert

-rw-rw---- 1 grid oinstall 14494Oct 17 11:35 alertsimplelinux.log

對grid和clusterware的日志,都是保留在$ORACLE_HOME/log下的目錄從中。Alert.log是主日志,也是檢查的起始點(diǎn)。通常是里面發(fā)現(xiàn)的問題,進(jìn)行進(jìn)一步的分析動(dòng)作。

[ohasd(2744)]CRS-2767:Resource staterecovery not attempted for 'ora.diskmon' as its target state is OFFLINE

2013-10-17 11:35:34.373

[cssd(3130)]CRS-1601:CSSD Reconfigurationcomplete. Active nodes are simplelinux .

2013-10-17 11:35:50.094

[/u01/app/grid/product/11.2.0/grid/bin/oraagent.bin(3072)]CRS-5010:Updateof configuration file "/u01/app/oracle/product/11.2.0/db_1/dbs/initora11g.ora"failed: details at "(:CLSN00014:)" in"/u01/app/grid/product/11.2.0/grid/log/simplelinux/agent/ohasd/oraagent_grid/oraagent_grid.log"

2013-10-17 11:35:55.645

[/u01/app/grid/product/11.2.0/grid/bin/oraagent.bin(3072)]CRS-5010:Updateof configuration file"/u01/app/oracle/product/11.2.0/db_1/dbs/initora11g.ora" failed:details at "(:CLSN00014:)" in"/u01/app/grid/product/11.2.0/grid/log/simplelinux/agent/ohasd/oraagent_grid/oraagent_grid.log"

2013-10-17 11:35:55.806

[ohasd(2744)]CRS-2807:Resource'ora.ora11g.db' failed to start automatically.

我們定位到了問題片段,從上面標(biāo)紅的內(nèi)容看。Clusterware在啟動(dòng)dismon服務(wù)之后,試圖啟動(dòng)數(shù)據(jù)庫,也就是ora.ora11g.db。在訪問一個(gè)參數(shù)文件(注意是pfile)過程中,發(fā)現(xiàn)問題。

進(jìn)一步檢查指出的oraagent_grid.log日志,也沒有過多的信息提示。

2013-10-17 11:35:50.049:[ora.ora11g.db][3013430160] {0:0:2} [start] sclsnInstAgent::sUpdateOratab fileupdated with dbName ora11g value /u01/app/oracle/product/11.2.0/db_1:N

2013-10-17 11:35:50.049:[ora.ora11g.db][3013430160] {0:0:2} [start] sclsnInstAgent::sUpdateOratab CSSunlock

2013-10-17 11:35:50.090:[ora.ora11g.db][3013430160] {0:0:2} [start] (:CLSN00014:)Failed to open file/u01/app/oracle/product/11.2.0/db_1/dbs/initora11g.ora

2013-10-17 11:35:50.091: [ AGENT][3013430160] {0:0:2}UserErrorException: Locale is

2013-10-17 11:35:50.091:[ora.ora11g.db][3013430160] {0:0:2} [start] clsnUtils::error Exception type=2string=

CRS-5010: Update of configuration file"/u01/app/oracle/product/11.2.0/db_1/dbs/initora11g.ora" failed:details at "(:CLSN00014:)" in "/u01/app/grid/product/11.2.0/grid/log/simplelinux/agent/ohasd/oraagent_grid/oraagent_grid.log"

從信息上看,是對pfile沒有能夠打開。

2、一次不成功的嘗試

從日志信息上,看到是不能夠打開文本參數(shù)控制文件。初步猜測是文件權(quán)限原因,下面進(jìn)行檢查。

[grid@SimpleLinux oraagent_grid]$ cd/u01/app/oracle/product/11.2.0/db_1/dbs/

[grid@SimpleLinux dbs]$ ls -l

total 20

-rw-rw---- 1 oracle asmadmin 1544 Sep 1212:58 hc_ora11g.dat

-rw-r--r-- 1 oracle oinstall 2851 May15 2009 init.ora

-rw-r----- 1 oracle oinstall 887 Sep 29 09:31 initora11g.ora

-rw-r----- 1 oracle asmadmin 24 Sep 12 12:58 lkORA11G

-rw-r----- 1 oracle oinstall 1536 Sep 1213:11 orapwora11g

[grid@SimpleLinux dbs]$ id oracle

uid=500(oracle) gid=500(oinstall)groups=500(oinstall),501(dba),502(oper),602(asmdba)

[grid@SimpleLinux dbs]$ id grid

uid=501(grid) gid=500(oinstall)groups=500(oinstall),501(dba),600(asmadmin),601(asmoper),602(asmdba)

權(quán)限內(nèi)容是oracle用戶讀寫、組用戶讀。從權(quán)限上看,grid和oracle讀取和修改的問題不算特別嚴(yán)重。但是還是進(jìn)行測試嘗試。

[oracle@SimpleLinux dbs]$ chmod 770initora11g.ora

[oracle@SimpleLinux dbs]$ ls -l

total 20

-rw-rw---- 1 oracle asmadmin 1544 Sep 1212:58 hc_ora11g.dat

-rw-r--r-- 1 oracle oinstall 2851 May15 2009 init.ora

-rwxrwx--- 1 oracle oinstall 887 Sep 29 09:31 initora11g.ora

-rw-r----- 1 oracle asmadmin 24 Sep 12 12:58 lkORA11G

-rw-r----- 1 oracle oinstall 1536 Sep 1213:11 orapwora11g

嘗試啟動(dòng)數(shù)據(jù)庫。

[grid@SimpleLinux ~]$ srvctl start database-d ora11g

PRCR-1079 : Failed to startresource ora.ora11g.db

CRS-5010: Update of configurationfile "/u01/app/oracle/product/11.2.0/db_1/dbs/initora11g.ora" failed:details at "(:CLSN00014:)" in"/u01/app/grid/product/11.2.0/grid/log/simplelinux/agent/ohasd/oraagent_grid/oraagent_grid.log"

CRS-5017: The resource action"ora.ora11g.db start" encountered the following error:

CRS-5010: Update of configurationfile "/u01/app/oracle/product/11.2.0/db_1/dbs/initora11g.ora" failed:details at "(:CLSN00014:)" in"/u01/app/grid/product/11.2.0/grid/log/simplelinux/agent/ohasd/oraagent_grid/oraagent_grid.log"

. For details refer to"(:CLSN00107:)" in "/u01/app/grid/product/11.2.0/grid/log/simplelinux/agent/ohasd/oraagent_grid/oraagent_grid.log".

CRS-2674: Start of'ora.ora11g.db' on 'simplelinux' failed

啟動(dòng)失敗。那么,試著使用傳統(tǒng)sqlplus命令行方式啟動(dòng)是否可行?

[oracle@SimpleLinux ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.3.0 Production onThu Oct 17 14:17:11 2013

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

SQL> conn / as sysdba

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 263639040 bytes

Fixed Size 1344312 bytes

Variable Size 134221000 bytes

Database Buffers 125829120 bytes

Redo Buffers 2244608 bytes

Database mounted.

Database opened.

SQL> quit

Disconnected from Oracle Database 11gEnterprise Edition Release 11.2.0.3.0 - Production

With the Partitioning, Automatic StorageManagement, OLAP, Data Mining

and Real Application Testing options

[oracle@SimpleLinux ~]$ ps -ef | grep pmon

grid 3212 1 0 11:35 ? 00:00:02 asm_pmon_+ASM

oracle 27979 1 0 14:17 ? 00:00:00 ora_pmon_ora11g

oracle 28106 27921 0 14:17 pts/0 00:00:00 grep pmon

[oracle@SimpleLinux ~]$ srvctl statusdatabase -d ora11g

Database is running.

啟動(dòng)成功,使用sqlplus命令行可以啟動(dòng),但是Oracle Restart啟動(dòng)就會(huì)失敗。那么問題在哪兒?

3、Spfile vs. Pfile

從直觀上看,Oracle Restart啟動(dòng)的時(shí)候是希望訪問到參數(shù)文件pfile。從直觀的感覺上,好像被替代很長時(shí)間的pfile為什么會(huì)被提及。利用已經(jīng)啟動(dòng)的數(shù)據(jù)庫實(shí)例,看一下當(dāng)前使用的是什么參數(shù)文件。

SQL> show parameter spfile

NAME TYPE VALUE

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

spfile string

SQL>

當(dāng)前啟動(dòng)是利用pfile啟動(dòng)的,剛剛我們對$ORACLE_HOME/dbs的檢索也沒有看到spfile文件。Oracle啟動(dòng)過程中,是默認(rèn)先根據(jù)環(huán)境變量“拼湊”的路徑查找spfile,之后才是pfile。系統(tǒng)spfile參數(shù)為空,說明當(dāng)前使用的是pfile。

但是,對應(yīng)到Oracle Restart里面的啟動(dòng)信息,似乎有些差別。

[grid@SimpleLinux ~]$ srvctl configdatabase -d ora11g

Database unique name: ora11g

Database name: ora11g

Oracle home:/u01/app/oracle/product/11.2.0/db_1

Oracle user: oracle

Spfile:+DATA/ora11g/spfileora11g.ora

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Database instance: ora11g

Disk Groups: DATA,RECO

Services:

明顯出現(xiàn)不同。這個(gè)時(shí)候,筆者想起之前進(jìn)行過實(shí)驗(yàn),在ASM環(huán)境下進(jìn)行spfile和pfile的生成操作。懷疑是這個(gè)過程中,存在Restart和實(shí)例信息的不匹配。

想出了第二種修復(fù)策略。

SQL> create spfile from pfile;

File created.

SQL> startup force

ORACLE instance started.

Total System Global Area 263639040 bytes

Fixed Size 1344312 bytes

Variable Size 134221000 bytes

Database Buffers 125829120 bytes

Redo Buffers 2244608 bytes

Database mounted.

Database opened.

SQL> show parameter spfile

NAME TYPE VALUE

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

spfile string /u01/app/oracle/product/11.2.0

/db_1/dbs/spfileora11g.ora

設(shè)置恢復(fù)現(xiàn)有的spfile作為啟動(dòng)參數(shù)文件。試圖讓Restart和實(shí)例信息一致。

[oracle@SimpleLinux ~]$ srvctl modifydatabase -d ora11g-p /u01/app/oracle/product/11.2.0/db_1/dbs/spfileora11g.ora

[oracle@SimpleLinux ~]$ srvctl configdatabase -d ora11g

Database unique name: ora11g

Database name: ora11g

Oracle home:/u01/app/oracle/product/11.2.0/db_1

Oracle user: oracle

Spfile: /u01/app/oracle/product/11.2.0/db_1/dbs/spfileora11g.ora

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Database instance: ora11g

Disk Groups: DATA,RECO

Services:

實(shí)驗(yàn)啟動(dòng),故障依然。

[oracle@SimpleLinux tmp]$ srvctl startdatabase -d ora11g

PRCR-1079 : Failed to start resourceora.ora11g.db

CRS-5010: Update of configuration file"/u01/app/oracle/product/11.2.0/db_1/dbs/initora11g.ora"failed: details at "(:CLSN00014:)" in"/u01/app/grid/product/11.2.0/grid/log/simplelinux/agent/ohasd/oraagent_grid/oraagent_grid.log"

CRS-5017: The resource action"ora.ora11g.db start" encountered the following error:

CRS-5010: Update of configuration file"/u01/app/oracle/product/11.2.0/db_1/dbs/initora11g.ora" failed:details at "(:CLSN00014:)" in"/u01/app/grid/product/11.2.0/grid/log/simplelinux/agent/ohasd/oraagent_grid/oraagent_grid.log"

. For details refer to"(:CLSN00107:)" in"/u01/app/grid/product/11.2.0/grid/log/simplelinux/agent/ohasd/oraagent_grid/oraagent_grid.log".

CRS-2674: Start of 'ora.ora11g.db' on'simplelinux' failed

第二次修復(fù)嘗試以失敗告終,Oracle Restart依然尋找那個(gè)pfile。但是筆者獲得了方向,就是系統(tǒng)問題在于Restart中對數(shù)據(jù)庫啟動(dòng)參數(shù)文件的不一致。

4、問題解決

Oracle Restart是一個(gè)很復(fù)雜的體系,在沒有經(jīng)驗(yàn)和資料的情況下,筆者也不能證明說是Oracle Bug之類的。

一種思路可以進(jìn)行嘗試。對于Oracle Restart,各種組件都是在上面可插拔的。根據(jù)需要,我們可以進(jìn)行動(dòng)態(tài)的配置注冊過程。從之前的情況看,數(shù)據(jù)庫本身是沒有問題的,應(yīng)該就是配置過程中的故障。那么,modify配置是有問題的。可不可以將database ora11g剔除出Restart體系,之后再添加過來。

Srvctl的add和remove命令可以幫助我們實(shí)現(xiàn)功能。而且在add過程中,只有-o參數(shù)是強(qiáng)制的,輸入ORACLE_HOME目錄。

[oracle@SimpleLinux dbs]$ srvctl removedatabase -d ora11g

Remove the database ora11g? (y/[n]) y

[oracle@SimpleLinux dbs]$ srvctl add database -d ora11g -o/u01/app/oracle/product/11.2.0/db_1

[oracle@SimpleLinux dbs]$ srvctl configdatabase -d ora11g

Database unique name: ora11g

Database name:

Oracle home: /u01/app/oracle/product/11.2.0/db_1

Oracle user: oracle

Spfile:

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Database instance: ora11g

Disk Groups:

Services:

Spfile為空。試著重新啟動(dòng)。

[oracle@SimpleLinux dbs]$ srvctl start database -d ora11g

[oracle@SimpleLinux dbs]$ ps -ef | greppmon

grid 3215 1 0 14:47 ? 00:00:00 asm_pmon_+ASM

oracle 5265 1 0 15:22 ? 00:00:00 ora_pmon_ora11g

oracle 5386 3578 0 15:22 pts/0 00:00:00 grep pmon

[oracle@SimpleLinux dbs]$ srvctl configdatabase -d ora11g

Database unique name: ora11g

Database name:

Oracle home:/u01/app/oracle/product/11.2.0/db_1

Oracle user: oracle

Spfile:

Domain:

Start options: open

Stop options: immediate

Database role: PRIMARY

Management policy: AUTOMATIC

Database instance: ora11g

Disk Groups: DATA,RECO

Services:

啟動(dòng)成功!最后嘗試看看reboot系統(tǒng)時(shí),能否自動(dòng)啟動(dòng)。

--重新啟動(dòng)系統(tǒng)

[root@SimpleLinux simplelinux]# ps -ef | grep pmon

grid 3213 1 015:27 ? 00:00:00 asm_pmon_+ASM

oracle 3270 1 015:27 ? 00:00:00 ora_pmon_ora11g

root 3336 3042 015:27 pts/0 00:00:00 grep pmon

[grid@SimpleLinux ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 17-OCT-2013 15:32:07

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

STATUS of the LISTENER

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

Alias LISTENER

Version TNSLSNRfor Linux: Version 11.2.0.3.0 - Production

Start Date 17-OCT-2013 15:27:06

Uptime 0 days 0hr. 5 min. 0 sec

Trace Level off

Security ON: LocalOS Authentication

SNMP OFF

Listener Parameter File /u01/app/grid/product/11.2.0/grid/network/admin/listener.ora

Listener Log File /u01/app/grid/diag/tnslsnr/SimpleLinux/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=SimpleLinux.localdomain)(PORT=1521)))

Services Summary...

Service "+ASM" has 1 instance(s).

Instance "+ASM", statusREADY, has 1 handler(s) for this service...

Service "ora11g" has 1 instance(s).

Instance"ora11g", status READY, has 1 handler(s) for this service...

Service "ora11gXDB" has 1 instance(s).

Instance "ora11g",status READY, has 1 handler(s) for this service...

The command completed successfully

SQL> show parameter spfile

NAME TYPE VALUE

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

spfile string /u01/app/oracle/product/11.2.0/db_1/dbs/spfileora11g.ora

問題解決。

5、結(jié)論和反思

從直觀的感覺看,這應(yīng)該是Restart和原有命令協(xié)調(diào)的一個(gè)故障。原有create pfile之后,Restart似乎不能夠支持pfile的啟動(dòng)了。另外,在修復(fù)過程中,我們始終看到不能對spfile修改參數(shù)生效,也是一個(gè)疑惑點(diǎn)。

能夠肯定的是,在添加數(shù)據(jù)庫ora11g的時(shí)候,沒有明確指定啟動(dòng)spfile的位置,那么應(yīng)該是進(jìn)入了自動(dòng)檢索目錄spfile-pfile的過程。所以系統(tǒng)得到修復(fù)。

聲明:本網(wǎng)頁內(nèi)容旨在傳播知識(shí),若有侵權(quán)等問題請及時(shí)與本網(wǎng)聯(lián)系,我們將在第一時(shí)間刪除處理。TEL:177 7030 7066 E-MAIL:11247931@qq.com

文檔

淺析RAC下SPFILE文件修改之整理三篇文章

淺析RAC下SPFILE文件修改之整理三篇文章:關(guān)于RAC下spfile淺析_整理于_2014.4.17 第一篇:RAC下SPFILE文件修改 在RAC下spfile位置的修改與單節(jié)點(diǎn)環(huán)境不完全一致,有些地方需要特別注意,否則可能修改會(huì)失敗。 下面用一個(gè)例子說明:SPFILE放在ASM中一個(gè)不正確的目錄(+ARCH)中,現(xiàn)在想把它放在另
推薦度:
標(biāo)簽: 整理 文件 文章
  • 熱門焦點(diǎn)

最新推薦

猜你喜歡

熱門推薦

專題
Top
主站蜘蛛池模板: 民权县| 虹口区| 岑巩县| 牡丹江市| 武强县| 沧州市| 临泉县| 韩城市| 新邵县| 马鞍山市| 晋城| 贵定县| 任丘市| 天水市| 新竹市| 平舆县| 大同县| 益阳市| 科技| 墨脱县| 延寿县| 石柱| 全南县| 渭南市| 阿尔山市| 邵东县| 大关县| 深州市| 廊坊市| 安达市| 罗田县| 康定县| 津南区| 镇赉县| 松滋市| 新丰县| 兖州市| 山东| 平顺县| 长阳| 库伦旗|