【故障处理】修改SPFILE无权限
一.1 BLOG文档结构图
一.2 前言部分
一.2.1 导读和注意事项
各位技术爱好者,看完本文后,你可以掌握如下的技能,也可以学到一些其它你所不知道的知识,~O(∩_∩)O~:
① 修改spfile文件报错:
ORA-01565: error in identifying file '+DATA/bocprm/spfilebocprm.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/bocprm/spfilebocprm.ora
ORA-01031: insufficient privileges
Tips:
① 若文章代码格式有错乱,推荐使用搜狗、QQ或360浏览器,也可以下载pdf格式的文档来查看,pdf文档下载地址:http://yunpan.cn/cdEQedhCs2kFz (提取码:ed9b)
② 本篇BLOG中命令的输出部分需要特别关注的地方我都用灰色背景和粉红色字体来表示,比如下边的例子中,thread 1的最大归档日志号为33,thread 2的最大归档日志号为43是需要特别关注的地方;而命令一般使用黄色背景和红色字体标注;对代码或代码输出部分的注释一般采用蓝色字体表示。
List of Archived Logs in backup set 11
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- ------------------- ---------- ---------
1 32 1621589 2015-05-29 11:09:52 1625242 2015-05-29 11:15:48
1 33 1625242 2015-05-29 11:15:48 1625293 2015-05-29 11:15:58
2 42 1613951 2015-05-29 10:41:18 1625245 2015-05-29 11:15:49
2 43 1625245 2015-05-29 11:15:49 1625253 2015-05-29 11:15:53
[ZFXXDB1:root]:/>lsvg -o
T_XDESK_APP1_vg
rootvg
[ZFXXDB1:root]:/>
00:27:22 SQL> alter tablespace idxtbs read write;
====》2097152*512/1024/1024/1024=1G
本文如有错误或不完善的地方请大家多多指正,ITPUB留言或QQ皆可,您的批评指正是我写作的最大动力。
一.3 故障分析及解决过程
一.3.1 故障环境介绍
项目 | source db |
db 类型 | RAC |
db version | 11.2.0.3 |
db 存储 | ASM |
OS版本及kernel版本 | AIX 64位 6.1.0.0 |
一.3.2 故障发生现象及报错信息
[THPRMDB1:oracle]:/oracle>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 2 17:09:55 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SYS@BOCPRM1> alter system set db_recovery_file_dest_size=100G scope=spfile sid='*';
alter system set db_recovery_file_dest_size=100G scope=spfile sid='*'
*
ERROR at line 1:
ORA-01565: error in identifying file '+DATA/bocprm/spfilebocprm.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/bocprm/spfilebocprm.ora
ORA-01031: insufficient privileges
SYS@BOCPRM1> alter system set db_recovery_file_dest='+data' sid='*';
alter system set db_recovery_file_dest='+data' sid='*'
*
ERROR at line 1:
ORA-01565: error in identifying file '+DATA/bocprm/spfilebocprm.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/bocprm/spfilebocprm.ora
ORA-15055: unable to connect to ASM instance
ORA-01031: insufficient privileges
一.3.3 故障分析及解决过程
确认是使用的sys用户执行的,因为是shell脚本静默安装的数据库,可能有的地方有问题,查看oracle,grid的权限,如下:
[THPRMDB1:oracle]:/oracle>id oracle
uid=1024(oracle) gid=1024(dba) groups=3000(ftp),400(mqm)
[THPRMDB1:oracle]:/oracle>id grid
uid=1025(grid) gid=1024(dba) groups=1025(asmadmin),1026(asmdba),1027(asmoper)
[THPRMDB1:root]:/>chuser groups=asmadmin,asmdba,asmoper oracle
[THPRMDB1:root]:/>
[THPRMDB1:root]:/>id oracle
uid=1024(oracle) gid=1024(dba) groups=1025(asmadmin),1026(asmdba),1027(asmoper)
[THPRMDB1:root]:/>su - oracle
[THPRMDB1:oracle]:/oracle>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Wed Mar 2 17:13:44 2016
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SYS@BOCPRM1> alter system set db_recovery_file_dest_size=100G sid='*';
System altered.
SYS@BOCPRM1> alter system set db_recovery_file_dest='+data' sid='*';
System altered.
SYS@BOCPRM1> show parameter db_recovery_file_dest
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest string +data
db_recovery_file_dest_size big integer 100G
SYS@BOCPRM1> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
[THPRMDB1:oracle]:/oracle>
一.4 故障处理总结
SYS无权限,多半是OS权限的问题。
About Me
...........................................................................................................................................................................................
本文作者:小麦苗,只专注于数据库的技术,更注重技术的运用
ITPUB BLOG:http://blog.itpub.net/26736162
本文地址:http://blog.itpub.net/26736162/viewspace-2029515/
本文pdf版:http://yunpan.cn/cdEQedhCs2kFz (提取码:ed9b)
QQ:642808185 若加QQ请注明您所正在读的文章标题
于 2016-03-03 10:00~ 2016-03-03 19:00 在中行完成
<版权所有,文章允许转载,但须以链接方式注明源地址,否则追究法律责任!>
...........................................................................................................................................................................................