【故障處理】修改SPFILE無許可權

lhrbest發表於2016-03-03

【故障處理】修改SPFILE無許可權

一.1  BLOG文件結構圖

 

wps8A1F.tmp 

 

一.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:

       ① 若文章程式碼格式有錯亂,推薦使用搜狗、QQ360瀏覽器,也可以下載pdf格式的文件來檢視,pdf文件下載地址:http://yunpan.cn/cdEQedhCs2kFz (提取碼:ed9b 

       ② 本篇BLOG中命令的輸出部分需要特別關注的地方我都用灰色背景和粉紅色字型來表示,比如下邊的例子中,thread 1的最大歸檔日誌號為33thread 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 646.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指令碼靜默安裝的資料庫,可能有的地方有問題,檢視oraclegrid的許可權,如下:

 

[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 在中行完成

<版權所有,文章允許轉載,但須以連結方式註明源地址,否則追究法律責任!>

...........................................................................................................................................................................................

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/26736162/viewspace-2029515/,如需轉載,請註明出處,否則將追究法律責任。

相關文章