January 7, 2014  by admin
0
 

prcr-1079 : failed to start resource ora.xxxx.db due to spfile corruption

After having changed few parameters related to the instance memory – on a standalone db managed by the Oracle clusterware – I decided to restart it to apply the modifications.
Unfortunatly, that was a very bad idea because, when trying to restart it, an error raised up !

[oracle@oda01:~] [TESTDB] srvctl start database -d TESTDB -o MOUNT
PRCR-1079 : Failed to start resource ora.testdb.db
CRS-5017: The resource action "ora.testdb.db start" encountered the following error:
ORA-27125: unable to create shared memory segment
. For details refer to "(:CLSN00107:)" in
"/u01/app/11.2.0.4/grid/log/oda01/agent/crsd/oraagent_oracle/oraagent_oracle.log".

CRS-2674: Start of 'ora.testdb.db' on 'oda01' failed
CRS-2632: There are no more servers to try to place resource 'ora.testdb.db'..
.. on that would satisfy its placement policy

 

This message was clearly related to my modifications (unable to create shared memory segment) and I was wondering how to fix it knowing that even the NOMOUNT mode was failing (The memory required by the instance was no allocated due to the wrong definition in my spfile)…

Hence, the question was “how to regenerate a correct spfile knowing that the current one was stored in ASM ?”
In fact, you’re gonna see that it is not a big deal if you have a recent pfile saved somewhere (generate a copy of the spfile before doing any modification is always a good habit to have).

 

OK so my first assumption was to point on this backup (in our case, it’s located in /tmp) and to regenerate a working spfile once the DB restarted.
Let’s try to point on it:

[oracle@oda01:~] [TESTDB] srvctl modify database -d TESTDB -p /tmp/initTESTDB.ora
[oracle@oda01:~] [TESTDB] srvctl start database -d TESTDB 
PRCR-1079 : Failed to start resource 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 '/tmp/initTESTDB.ora'
ORA-27046: file size is not a multiple of logical block size
Additional information: 1
. For details refer to "(:CLSN00107:)" in
"/u01/app/11.2.0.4/grid/log/oda01/agent/crsd/oraagent_oracle/oraagent_oracle.log".

CRS-2674: Start of 'ora.testdb.db' on 'oda01' failed
CRS-2632: There are no more servers to try to place resource 'ora.testdb.db' on that would ..
.. satisfy its placement policy

Failure… Grid infrastructure seems to only accept files stored on the shared device – that’s logical but that was just a try 🙂

 

So, let’s do it correctly this time…

 

1. Locate the corrupted spfile into ASM and delete it

ASMCMD> cd +DATA/testdb/
ASMCMD> ls -l
Type Redund Striped Time Sys  Name
                         Y    CONTROLFILE/
                         Y    DATAFILE/
                         Y    PARAMETERFILE/
                         Y    TEMPFILE/
                         N    control01.ctl => +DATA/TESTDB/CONTROLFILE/Current.282.834501777
                         N    spfileTESTDB.ora => +DATA/TESTDB/PARAMETERFILE/spfile.288.834502209
ASMCMD>
ASMCMD> rm +DATA/TESTDB/PARAMETERFILE/spfile.288.834502209

You’ll notice that the spfile (spfileTESTDB.ora) is a symlink to +DATA/TESTDB/PARAMETERFILE/spfile.288.834502209

 

2. Start the db manually by skipping the grid infrastructure

SQL> startup pfile=/tmp/initTESTDB.ora

 

3. Regenerate the spfile and store it directly into ASM

SQL> create spfile='+DATA/TESTDB/spfileTESTDB.ora' from pfile='/tmp/initTESTDB.ora';

Take note that you can point directly to the symlink, ASM moving the file and regenerating the link itself.

 

4. Shutdown the DB and check that the spfile is correctly located

ASMCMD> cd +DATA/testdb/
ASMCMD> ls -l
Type Redund Striped Time Sys  Name
                         Y    CONTROLFILE/
                         Y    DATAFILE/
                         Y    PARAMETERFILE/
                         Y    TEMPFILE/
                         N    control01.ctl => +DATA/TESTDB/CONTROLFILE/Current.282.834501777
                         N    spfileTESTDB.ora => +DATA/TESTDB/PARAMETERFILE/spfile.288.836393411
ASMCMD>

Looks good !

 

5. Now we just restart the resource

[oracle@oda01:/] [TESTDB] srvctl modify database -d TESTDB -p +DATA/TESTDB/spfileTESTDB.ora
[oracle@oda01:/] [TESTDB] srvctl start database -d TESTDB
[oracle@oda01:/] [TESTDB] /u01/app/11.2.0.4/grid/bin/crsctl status res -t
...
ora.testdb.db
      1        ONLINE  ONLINE       oda01               Open

 

The DB is now up and running 😀

Leave a comment

Please wait......