12cR1’i grid’i 12cR2’ye upgrade etmeden önce 21255373 patch’ini geçmemiz gerekiyor. Aşağıdaki gibi hata alınırsa bunun yetki problemi olduğunu ve nasıl çözebileceğinizi gösterelim;
[root@testdb01 ~]# export PATH=$PATH:/oracle/app/oracle/product/12.1.0/grid/OPatch [root@testdb01 ~]# cd /oracle/app/oracle/product/12.1.0/grid/OPatch [root@testdb01 OPatch]# opatchauto apply /backup/SETUP/psu_for_12cr1/21255373
Details: [ ---------------------------Patching Failed--------------------------------- Command execution failed during patching in home: /oracle/app/oracle/product/12.1.0/dbhome_1, host: fb000cdb01. Command failed: /bin/sh -c 'ORACLE_HOME=/oracle/app/oracle/product/12.1.0/dbhome_1 /oracle/app/oracle/product/12.1.0/dbhome_1/bin/srvctl start home -o /oracle/app/oracle/product/12.1.0/dbhome_1 -s /oracle/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/opatchautodb/statfile/testdb01/OracleHome-01eff917-be64-4254-b74d-0a75db0e3747_fb000cdb01.stat' Command failure output: PRCH-1001 : Failed to start resources in Oracle home /oracle/app/oracle/product/12.1.0/dbhome_1 PRCR-1095 : Failed to start resources using filter (NAME == ora.testdb.db) CRS-5017: The resource action "ora.testdb.db start" encountered the following error: ORA-01078: failure in processing system parameters ORA-01565: error in identifying file '+DATA01/TESTDB/spfileTESTDB.ora' ORA-17503: ksfdopn:10 Failed to open file +DATA01/TESTDB/spfileTESTDB.ora ORA-27140: attach to post/wait facility failed ORA-27300: OS system dependent operation:invalid_egid failed with status: 1 ORA-27301: OS failure message: Operation not permitted ORA-27302: failure occurred at: skgpwinit6 ORA-27303: additional information: startup egid = 54321 (oinstall), current egid =. For details refer to "(:CLSN00107:)" in "/oracle/app/oracle/diag/crs/testdb01/crs/trace/ohasd_oraagent_oracle.trc". CRS-2674: Start of 'ora.testdb.db' on 'testdb01' failed After fixing the cause of failure Run opatchauto resume with session id "GGIQ" ] OPATCHAUTO-68061: The orchestration engine failed. OPATCHAUTO-68061: The orchestration engine failed with return code 1 OPATCHAUTO-68061: Check the log for more details. OPatchAuto failed.
opatchauto rollback /backup/SETUP/psu_for_12cr1/21255373 -oh /oracle/app/oracle/product/12.1.0/grid
Grid ve db home altındaki /bin/oracle yetkilerini 6751 yapmak gerekiyor;
[root@testdb01~]# ls -la /oracle/app/oracle/product/12.1.0/grid/bin/oracle -rwxr-x--x. 1 oracle oinstall 291326022 Feb 18 2016 /oracle/app/oracle/product/12.1.0/grid/bin/oracle [root@testdb01 ~]# chmod 6751 /oracle/app/oracle/product/12.1.0/grid/bin/oracle [root@testdb01~]# ls -la /oracle/app/oracle/product/12.1.0/grid/bin/oracle -rwsr-s--x. 1 oracle oinstall 291326022 Feb 18 2016 /oracle/app/oracle/product/12.1.0/grid/bin/oracle OPatchAuto successful.
$ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME $GRID_HOME/OPatch/opatch lsinventory -detail -oh $GRID_HOME
**** Bu hatayı db’i açmaya çalışırken de almıştım, asm açılıyodu ama db açılmıyodu;
[oracle@testdb01 ~]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Wed Aug 2 21:52:20 2017 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORA-01078: failure in processing system parameters ORA-01565: error in identifying file '+DATA/TST12C/spfileTST12C.ora' ORA-17503: ksfdopn:2 Failed to open file +DATA/TST12C/spfileTST12C.ora ORA-27140: attach to post/wait facility failed ORA-27300: OS system dependent operation:invalid_egid failed with status: 1 ORA-27301: OS failure message: Operation not permitted ORA-27302: failure occurred at: skgpwinit6 ORA-27303: additional information: startup egid = 500 (oinstall), current egid = 501 (dba) SQL> exit [oracle@testdb01 ~]$ crsctl status res -t ---------------------------------------------------------- Name Target State Server State details ---------------------------------------------------------- Local Resources ---------------------------------------------------------- ora.DATA.dg ONLINE OFFLINE testdb01 STABLE ora.LISTENER.lsnr ONLINE ONLINE testdb01 STABLE ora.asm ONLINE ONLINE testdb01 Started,STABLE ora.ons OFFLINE OFFLINE testdb01 STABLE ------------------------------------------------------------ Cluster Resources ------------------------------------------------------------ ora.cssd 1 ONLINE ONLINE testdb01 STABLE ora.diskmon 1 OFFLINE OFFLINE STABLE ora.evmd 1 ONLINE ONLINE testdb01 STABLE ora.tst12c.db 1 ONLINE OFFLINE Instance Shutdown,ST ABLE ------------------------------------------------------------
[oracle@testdb01 ~]$ ls -l $ORACLE_HOME/bin/oracle -rwxrwsr-x 1 oracle dba 323762222 Aug 1 15:23 /oracle/app/oracle/product/12.1.0.2/dbhome_1/bin/oracle
[oracle@testdb01 ~]$ chmod 6751 $ORACLE_HOME/bin/oracle [oracle@testdb01 ~]$ ls -l $ORACLE_HOME/bin/oracle -rwsr-s--x 1 oracle oinstall 291315658 Aug 1 15:06 /oracle/app/grid/bin/oracle [oracle@testdb01 ~]$ chmod 6751 /oracle/app/grid/bin/oracle [oracle@testdb01 ~]$ ls -l /oracle/app/grid/bin/oracle -rwsr-s--x 1 oracle oinstall 291315658 Aug 1 15:06 /oracle/app/grid/bin/oracle
crs’i kapayıp açıyoruz;
[oracle@testdb01 ~]$ crsctl stop has CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'testdb01' CRS-2673: Attempting to stop 'ora.DATA.dg' on 'testdb01' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'testdb01' CRS-2677: Stop of 'ora.DATA.dg' on 'testdb01' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'testdb01' CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'testdb01' succeeded CRS-2677: Stop of 'ora.asm' on 'testdb01' succeeded CRS-2673: Attempting to stop 'ora.evmd' on 'testdb01' CRS-2677: Stop of 'ora.evmd' on 'testdb01' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'testdb01' CRS-2677: Stop of 'ora.cssd' on 'testdb01' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'testdb01' has completed CRS-4133: Oracle High Availability Services has been stopped. [oracle@testdb01 ~]$ crsctl start has CRS-4123: Oracle High Availability Services has been started. [oracle@testdb01 ~]$ ps -ef | grep pmon oracle 24243 21697 0 22:16 pts/1 00:00:00 grep pmon [oracle@testdb01 ~]$ ps -ef | grep pmon oracle 24273 21697 0 22:17 pts/1 00:00:00 grep pmon [oracle@testdb01 ~]$ ps -ef | grep pmon oracle 24306 1 0 22:17 ? 00:00:00 asm_pmon_+ASM oracle 24467 1 0 22:17 ? 00:00:00 ora_pmon_TST12C oracle 24629 21697 0 22:17 pts/1 00:00:00 grep pmon [oracle@testdb01 ~]$ [oracle@testdb01 ~]$ crsctl status res -t -------------------------------------------------------- Name Target State Server State details -------------------------------------------------------- Local Resources -------------------------------------------------------- ora.DATA.dg ONLINE ONLINE testdb01 STABLE ora.LISTENER.lsnr ONLINE ONLINE testdb01 STABLE ora.asm ONLINE ONLINE testdb01 Started,STABLE ora.ons OFFLINE OFFLINE testdb01 STABLE ---------------------------------------------------------- Cluster Resources ---------------------------------------------------------- ora.cssd 1 ONLINE ONLINE testdb01 STABLE ora.diskmon 1 OFFLINE OFFLINE STABLE ora.evmd 1 ONLINE ONLINE testdb01 STABLE ora.tst12c.db 1 ONLINE ONLINE testdb01 Open,STABLE ----------------------------------------------------------- [oracle@testdb01 ~]$ ps -ef | grep pmon oracle 24306 1 0 22:17 ? 00:00:00 asm_pmon_+ASM oracle 24467 1 0 22:17 ? 00:00:00 ora_pmon_TST12C oracle 25196 21697 0 22:18 pts/1 00:00:00 grep pmon [oracle@testdb01 ~]$
Çok teşekkür ederim hocam. çok işe yaradı