Friday, April 29, 2016

ORA-01565: error in identifying file '+DATA/cdbrac/spfilecdbrac.ora'

[oracle@rac1 ~]$ srvctl start database -d cdbrac
PRCR-1079 : Failed to start resource ora.cdbrac.db
CRS-5017: The resource action "ora.cdbrac.db start" encountered the following error:
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/cdbrac/spfilecdbrac.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/cdbrac/spfilecdbrac.ora
ORA-15056: additional error message
ORA-17503: ksfdopn:2 Failed to open file +DATA/cdbrac/spfilecdbrac.ora
ORA-15173: entry 'spfilecdbrac.ora' does not exist in directory 'cdbrac'
ORA-06512: at line 4
. For details refer to "(:CLSN00107:)" in "/u01/app/oracle/diag/crs/rac1/crs/trace/crsd_oraagent_oracle.trc".

CRS-2674: Start of 'ora.cdbrac.db' on 'rac1' failed
CRS-5017: The resource action "ora.cdbrac.db start" encountered the following error:
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file '+DATA/cdbrac/spfilecdbrac.ora'
ORA-17503: ksfdopn:2 Failed to open file +DATA/cdbrac/spfilecdbrac.ora
ORA-15056: additional error message
ORA-17503: ksfdopn:2 Failed to open file +DATA/cdbrac/spfilecdbrac.ora
ORA-15173: entry 'spfilecdbrac.ora' does not exist in directory 'cdbrac'
ORA-06512: at line 4
. For details refer to "(:CLSN00107:)" in "/u01/app/oracle/diag/crs/rac2/crs/trace/crsd_oraagent_oracle.trc".

CRS-2674: Start of 'ora.cdbrac.db' on 'rac2' failed
CRS-2632: There are no more servers to try to place resource 'ora.cdbrac.db' on that would satisfy its placement policy
[oracle@rac1 ~]$


Do not worry log on to asm and locate where the spfile is

ASMCMD> cd +DATA/CDBRAC/PARAMETERFILE/
ASMCMD> ls -l
Type           Redund  Striped  Time             Sys  Name
PARAMETERFILE  UNPROT  COARSE   APR 29 13:00:00  Y    spfile.271.909835045
ASMCMD>

Now you want this under +DATA/CDBRAC as per the error so create an alias in ASM

ASMCMD> pwd
+DATA/CDBRAC
ASMCMD>
ASMCMD> mkalias +DATA/cdbrac/PARAMETERFILE/spfile.271.909835045 spfilecdbrac.ora
ASMCMD> ls -l
Type           Redund  Striped  Time             Sys  Name
                                                 Y    310A14D691145E69E0536538A8C0D511/
                                                 Y    310A3223A63F6D46E0536538A8C02A10/
                                                 Y    CONTROLFILE/
                                                 Y    DATAFILE/
                                                 Y    FD9AC20F64D244D7E043B6A9E80A2F2F/
                                                 Y    ONLINELOG/
                                                 Y    PARAMETERFILE/
                                                 Y    PASSWORD/
                                                 Y    TEMPFILE/
PARAMETERFILE  UNPROT  COARSE   APR 29 13:00:00  N    spfilecdbrac.ora => +DATA/CDBRAC/PARAMETERFILE/spfile.271.909835045
ASMCMD>

[oracle@rac1 ~]$ srvctl start database -d cdbrac
[oracle@rac1 ~]$

Worked like a charm !!!

Thursday, April 28, 2016

PRVF-0002 : could not retrieve local node name

[oracle@racdr1 grid]$ ./runcluvfy.sh  stage -pre crsinst -n racdr1 -verbose

WARNING:
Could not access or create trace file path "/tmp/bootstrap/cv/log". Trace information could not be collected

PRVF-0002 : could not retrieve local node name
[oracle@racdr1 grid]$ hostname
racdr1.localdomain
[oracle@racdr1 grid]$

Getting above error while doing the cluster verify for oracle 12c GI.

For diagnosing I have done

[oracle@racdr1 grid]$ hostname --long
hostname: Unknown host
[oracle@racdr1 grid]$
[oracle@racdr1 grid]$
[oracle@racdr1 grid]$ hostname --long --verbose
gethostname()=`racdr1.localdomain'
Resolving `racdr1.localdomain' ...
hostname: Unknown host
[oracle@racdr1 grid]$

It should not say "Unknown host"

Lets check /etc/hosts file

[root@racdr1 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
[root@racdr1 ~]#


what it turned out was the my dns setting were wrong basically once you change in /etc/resolv.conf then do the following so that it does not change after reboot.

[root@racdr1 ~]# chattr -i /etc/resolv.conf
update details and then
[root@racdr1 ~]# chattr +i /etc/resolv.conf


[oracle@racdr1 grid]$ hostname --long
racdr1.localdomain
[oracle@racdr1 grid]$
[oracle@racdr1 grid]$ hostname --long --verbose
gethostname()=`racdr1.localdomain'
Resolving `racdr1.localdomain' ...
Result: h_name=`racdr1.localdomain'
Result: h_addr_list=`192.168.56.111'
racdr1.localdomain
[oracle@racdr1 grid]$

Hurray !!!