Monday, September 25, 2017

ERROR: Unable to get logical block size for spfile '+DATA/dev1tstp/spfiledev1tstp.ora'.

received this error while performing the import on a RAC database.

The issue is that init<SID>.ora file has value of

SPFILE= '+DATA/dev1tstp/spfiledev1tstp.ora'

where as when we look at the ASM and srvctl config database -d dev1tstp

The SPFILE is

 '+DATA/dev1tstp/spfiledev1tst.ora'

change the init<SID>.ora to the value form srvctl config and it fixed the issue.


Monday, September 18, 2017

ORA-19505: failed to identify file "+DATA/dev1tst/spfiledev1tstp.ora"

I am trying to duplicate database for active dataguard but getting the error below:

Starting backup at 12-SEP-17
released channel: ch1
released channel: ch2
released channel: ch3
released channel: ch4
released channel: ch5
released channel: stby1
released channel: stby2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 09/12/2017 11:30:19
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on ch2 channel at 09/12/2017 11:30:19
ORA-19505: failed to identify file "+DATA/dev1tst/spfiledev1tstp.ora"
ORA-15173: entry 'dev1tst' does not exist in directory '/'

RMAN>


Look at the line in red and blue it holds the answer.

I had a look under $ORACLE_HOME/dbs and tried to find initdev1tstp1.ora file to see the contents and those were +DATA/dev1tst/spfiledev1tstp.ora . When I had a look at the database on primary side its db_unique_name is dev1tstp and that is the directory on ASM as well.

Let me try to explain the message a little bit
ORA-19505: failed to identify file "+DATA/dev1tst/spfiledev1tstp.ora"
ORA-15173: entry 'dev1tst' does not exist in directory '/'

What oracle is trying to inform is that for entry 'dev1tst' there is no such directory under "+DATA", please note that '/' is little misleading here and you could end up looking on file system but actually it was on ASM in my case.

After fixing the init file to the one below, that error disappeared.

[oracle@tser01n01 (dev1tstp1) dbs]$ cat initdev1tstp1.ora
SPFILE='+DATA/dev1tstp/spfiledev1tstp.ora'
[oracle@tser01n01 (dev1tstp1) dbs]$