在ASM下建立spfile 出現DB_UNKOWN
文章來源於metalink。
出現DB_UNKNOWN的真實原因就在於在diskgroup上建立spfile的時候,沒有開啟rdbms(在此區別asm)資料庫。其實,spfile檔案出現在db_unkown裡還是出現在
如下描述:
Applies to:
Oracle Server - Enterprise Edition - Version: 10.1.0.2 to 11.1.0.7
This problem can occur on any platform.
Symptoms
On 10.2.0.1 in Production:
-- Suppose that the database instance name is "osmdr"
-- In the database instance
When trying to create a new spfile from a pfile under sqlplus
SQL> create SPFILE='+DATA/osmdr/spfileosmdr.ora' from pfile='/home/oracle/osmdr.init';
File created.
SQL>create SPFILE='+DATA/osmdr/spfileosmdr.ora' from PFILE='/home/oracle/osmdr.init'; File created
Under ASM , the spileosmdr.ora is link to the wrong location under ASM
ASMCMD> ls -alr
Type Redund Striped Time Sys Name
N spfileosmdr.ora =>
+DATA/DB_UNKNOWN/PARAMETERFILE/SPFILE.272.613162051
ASMCMD>
Q. Why it will create +DATA/DB_UNKNOW instead of +DATA/osmdr ?
The same question can be like that
Q. Why does the spfile get created in the directory DB_UNKNOWN?
IT'S EXPECTED BEHAVIOR
Cause
-- Considering the TESTCASE hereunder
The string "DB_UNKNOWN/PARAMETERFILE/SPFILE" is a generic system tag for the proxied spfile creation. This will be used in case the database instance has no open client session to the ASM instance at the time of the 'create spfile' command. That is, the ASM instance is not aware of the db name and therefore uses "DB_UNKNOWN".
Please see the TESTCASE section above that demonstrates two scenarios; [
【A】where the DB_UNKNOWN
directory structure gets created
【B】where the PARAMETERFILE
directory structure gets created
Solution
[A] No open database connection to the ASM instance
-- In the ASM instance
SQL> select * from v$asm_client;
no rows selected
-- In the database instance
SQL> show parameter db_name
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string V1020
SQL> select * from v$asm_client;
no rows selected
SQL> create spfile='+DG1' from pfile;
File created.
-- In asmcmd
-- The DB_UNKNOWN directory structure gets created
ASMCMD> pwd
+dg1
ASMCMD> ls
DB_UNKNOWN/
V1020/
ASMCMD> ls DB_UNKNOWN/
PARAMETERFILE/
ASMCMD> ls DB_UNKNOWN/PARAMETERFILE/
SPFILE.259.613339345
或者 在
PARAMETERFILE /spfile****檔案。如下
SQL> create spfile='+DG1/V1020/spfileV1020.ora' from pfile;
ASMCMD> pwd
V1020
ASMCMD> ls -lta
Type Redund Striped Time Sys Name
Y TEMPFILE/
Y ONLINELOG/
Y DATAFILE/
Y CONTROLFILE/
N spfileV1020.ora => +DG1/DB_UNKNOWN/PARAMETERFILE/spfile.259.613339813
-- Remove the parameter file from the ASM diskgroup
ASMCMD> rm DB_UNKNOWN/PARAMETERFILE/SPFILE.259.613339345
-- Now the DB_UNKNOWN directory structure gets automatically removed (刪除檔案的同時,目錄也被刪除了)
[B]open database connection to the ASM instance
-- In the database instance
-- Open a connection to the ASM instance by accessing a datafile in an ASM diskgroup
-- In this example, a tablespace with a datafile in an ASM diskgroup is onlined
(其實不用特意去訪問資料檔案來達到連線的效果,好像rdbms應該可以建立到ASM的session連線,可以從V$asm_client檢視可以看到)
SQL> alter tablespace ts1 online;
Tablespace altered.
SQL> select * from v$asm_client;
GROUP_NUMBER INSTANCE_NAM DB_NAME STATUS SOFTWARE
------------ ------------ -------- ------------ -
1 +ASM V1020 CONNECTED 10.2.0.3.0 10.2.0.0.0
-- In the ASM instance
SQL> select * from v$asm_client;
GROUP_NUMBER INSTANCE_NAM DB_NAME STATUS SOFTW
------------ ------------ -------- -----------
1 V1020 V1020 CONNECTED 10.2.0.3.0 10.2.0.1.0
-- In the database instance
SQL> create spfile='+DG1' from pfile;
File created.
-- In asmcmd
ASMCMD> pwd
+dg1
ASMCMD> ls
V1020/
ASMCMD> ls V1020/
DATAFILE/
PARAMETERFILE/
ASMCMD> ls V1020/PARAMETERFILE/
spfile.259.613339813
-- Result:
- The spfile is located in the directory
- No DB_UNKNOWN directory structure got created
或者 在
SQL> create spfile='+DG1/V1020/spfileV1020.ora' from pfile;
ASMCMD> pwd
+dg1
ASMCMD> ls
V1020/
ASMCMD> ls V1020/
DATAFILE/
PARAMETERFILE/
spfileV1020.ora'
ASMCMD> ls -lta
Type Redund Striped Time Sys Name
Y TEMPFILE/
Y PARAMETERFILE/
Y ONLINELOG/
Y DATAFILE/
Y CONTROLFILE/
N spfileV1020.ora => +DG1/LV1020/PARAMETERFILE/spfile.259.613339813
ASMCMD> ls V1020/PARAMETERFILE/
spfile.259.613339813
ASMCMD> ls V1020/PARAMETERFILE/
spfile.259.613339813
最後別忘了在$ORACLE_HOME/dbs/iniit
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/27042095/viewspace-742036/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ASM下遷移spfileASM
- 【ASM】ASM啟動無法找到spfile問題原因ASM
- 2.4.8 Step 7: 建立spfile
- 將spfile從ASM裡遷移到檔案系統ASM
- 2.7.4 建立伺服器引數(SPFILE)伺服器
- ASM 磁碟組的建立及擴容ASM
- 2.7.8 匯出伺服器引數檔案(SPFILE)伺服器
- RAC和ASM環境下打patchASM
- 透過ASM 反射實現IOCASM反射
- Oracle啟動找不到spfile或者pfile提示ORA-01078,利用init.ora手工建立Oracle
- 在IDEA下使用JUnit出現的問題與解決辦法Idea
- 在 Windows 下建立卷(volume),可以使用以下步驟:在 Windows 下使用 PowerShell 建立卷,可以使用以下程式碼:在 Windows 下使用 CMD 建立卷,可以使用以下步驟和命令:Windows
- 在Windows下如何建立指定的虛擬環境Windows
- asm內聯語句在編譯不支援的情況下的解決辦法ASM編譯
- 2.7.5 SPFILE初始化引數
- RAC環境修改spfile的位置
- [20201221]spfile設定問題.txt
- Oracle RAC環境下ASM磁碟組擴容OracleASM
- ThinkPHP V6.0.12在php8.1下驗證碼出現問題PHP
- 4.3.4.1 在不使用Oracle OMF的情況下建立CDBOracle
- laravel建立定時任務並在windows下執行LaravelWindows
- 巡檢昨天到現在asm 、系統、資料庫等錯誤日誌 shell指令碼ASM資料庫指令碼
- [BUG反饋]求解決 linux下 多圖上傳 在ie下可以 但是 在 谷歌下就會報錯出現302的錯誤資訊Linux谷歌
- 求出現在字串1而沒有出現在字串2中的字元字串字元
- 2.7 使用spfile管理伺服器引數伺服器
- 一次Oracle診斷案例-Spfile案例Oracle
- java實現下載器(以及建立一個URL物件)Java物件
- 在WSL下為OpenWRT交叉編譯出CMake編譯
- 在ubuntu的QtCreator 出現提示Wayland警告UbuntuQT
- 用C語言在Linux系統下建立守護程式(Daemon)C語言Linux
- 在 mysql 下 建立新的資料庫和對應的表MySql資料庫
- macOS BigSur下無法在根目錄建立/data解決方法Mac
- 在Linux系統下如何建立定時任務?操作介紹!Linux
- 【ASM】Oracle asm刪除磁碟組注意事項ASMOracle
- 【ASM】ASM磁碟頭被重寫,如何修復ASM
- goldengate + asm + racGoASM
- gnu inline asminlineASM
- mac系統下建立的word文件可以在win10系統下開啟嗎MacWin10
- 2.7.3 spfile的預設名稱和路徑