12
返回列表 发新帖
楼主: lfree

spfile 文件的位置

[复制链接]
论坛徽章:
1
2011新春纪念徽章
日期:2011-02-18 11:42:49
11#
发表于 2009-5-12 16:34 | 只看该作者
metalink有解决办法
Subject:  Create SPFILE Under ASM
  Doc ID:  413360.1



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, and [B] where the spfile is created in the directory <diskgroup_name>/<db_name>/PARAMETERFILE.


Solution
TESTCASE
[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

-- 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]

-- In the database instance
-- Open a connection to the ASM instance by accessing a datafile in an ASM diskgro
-- In this example, a tablespace with a datafile in an ASM diskgroup is onlined


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 <diskgroup_name>/<db_name>/PARAMETERFILE
- No DB_UNKNOWN directory structure got created

使用道具 举报

回复
论坛徽章:
150
蓝锆石
日期:2011-11-16 22:31:22萤石
日期:2011-11-17 13:05:31祖母绿
日期:2008-06-14 15:23:26海蓝宝石
日期:2011-11-16 22:25:15紫水晶
日期:2011-11-16 22:31:22红宝石
日期:2011-10-09 08:54:30蓝锆石
日期:2009-01-31 15:20:54萤石
日期:2008-12-22 15:22:00祖母绿
日期:2011-11-17 13:13:26海蓝宝石
日期:2008-07-05 14:52:18
12#
发表于 2009-5-20 12:41 | 只看该作者
以前在客户哪儿给rac打补丁时也这样操作遇到过这个问题

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表