ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 创建ASM启动SPFILE报错ORA-17502

创建ASM启动SPFILE报错ORA-17502

原创 Linux操作系统 作者:yangtingkun 时间:2011-12-21 23:55:52 0 删除 编辑

客户的数据库的ASM启动存在问题,通过手工创建PFILE,解决了ASM启动的问题,但是尝试利用PFILE生成SPFILE时报错。

 

 

详细错误信息为:

[grid@rptdb ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.2.0 Production on Tue Dec 20 19:05:33 2011

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

Connected.
SQL> shutdown abort
ASM instance shutdown
SQL> startup pfile=/home/grid/init+ASM.ora
ASM instance started

Total System Global Area 283930624 bytes
Fixed Size 2225792 bytes
Variable Size 256539008 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL> create spfile from pfile='/home/grid/init+ASM.ora';
create spfile from pfile='/home/grid/init+ASM.ora'
*
ERROR at line 1:
ORA-17502: ksfdcre:4 Failed to create file +DATA/asm/asmparameterfile/registry.253.770384221
ORA-15177: cannot operate on system aliases

查询ASM状态,并无异常存在:

SQL> select name, group_number, alias_directory, system_created from v$asm_alias;

NAME                             GROUP_NUMBER A S
-------------------------------- ------------ - -
RPTALL                                      1 Y Y
DATAFILE                                    1 Y Y
SYSTEM.256.770384991                        1 N Y
SYSAUX.257.770384991                        1 N Y
UNDOTBS1.258.770384991                      1 N Y
USERS.259.770384991                         1 N Y
CONTROLFILE                                 1 Y Y
Current.261.770385125                       1 N Y
Current.260.770385125                       1 N Y
ONLINELOG                                   1 Y Y
group_1.262.770385127                       1 N Y
group_1.263.770385129                       1 N Y
group_2.264.770385129                       1 N Y
group_2.265.770385129                       1 N Y
group_3.266.770385129                       1 N Y
group_3.267.770385129                       1 N Y
TEMPFILE                                    1 Y Y
TEMP.268.770385133                          1 N Y
PARAMETERFILE                               1 Y Y
spfile.269.770385249                        1 N Y
spfilerptall.ora                            1 N N

21 rows selected.

可以看到,ASM磁盘组中并不存在asm/asmparameterfile目录,那么导致问题的原因多半是由于这个目录属于Oracle自动创建的目录,而一旦原始的spfile被删除,则目录自动删除,从而导致新创建的操作出现异常。

SQL> create spfile='+DATA' from pfile='/home/grid/init+ASM.ora';

File created.

SQL> select name, group_number, alias_directory, system_created from v$asm_alias;

NAME                          GROUP_NUMBER A S
----------------------------- ------------ - -
ASM                                      1 Y Y
ASMPARAMETERFILE                         1 Y Y
REGISTRY.253.770411755                   1 N Y
RPTALL                                   1 Y Y
DATAFILE                                 1 Y Y
SYSTEM.256.770384991                     1 N Y
SYSAUX.257.770384991                     1 N Y
UNDOTBS1.258.770384991                   1 N Y
USERS.259.770384991                      1 N Y
CONTROLFILE                              1 Y Y
Current.261.770385125                    1 N Y
Current.260.770385125                    1 N Y
ONLINELOG                                1 Y Y
group_1.262.770385127                    1 N Y
group_1.263.770385129                    1 N Y
group_2.264.770385129                    1 N Y
group_2.265.770385129                    1 N Y
group_3.266.770385129                    1 N Y
group_3.267.770385129                    1 N Y
TEMPFILE                                 1 Y Y
TEMP.268.770385133                       1 N Y
PARAMETERFILE                            1 Y Y
spfile.269.770385249                     1 N Y
spfilerptall.ora                         1 N N

24 rows selected.

果然再次尝试同样的命令,参数文件顺利创建成功,且对应的ASM目录也自动生成。因此,导致问题的原因应该是第一次创建ASM的参数文件时,导致最早创建的ASM参数文件被删除,引发了ASM目录被删除,而使得创建操作失败。

第二次创建ASM参数文件,则不存在这个问题,因此Oracle会自动创建ASM目录和SPFILE文件。

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/4227/viewspace-713745/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2007-12-29

  • 博文量
    1955
  • 访问量
    10386689