Friday, January 23, 2015

ORA-01506: missing or illegal database name

I am trying to duplicate database from one database to another and all went well. But after creating the spfile when I tried starting the database using srvctl I started getting error

ORA-01506: missing or illegal database name

Did the following steps.
1. Creates spfile from pfile.
2. Start database using srvctl and received the error.


SQL> create spfile='+DATA/RAC/spfileRAC.ora' from pfile;

File created.

SQL>


[oracle@rac01 (rac1) dbs]$ srvctl start database -d rac
PRCR-1079 : Failed to start resource ora.rac.db
CRS-5017: The resource action "ora.rac.db start" encountered the following error:
ORA-01506: missing or illegal database name
. For details refer to "(:CLSN00107:)" in "/u01/app/11.2.0/grid/log/rac02/agent/crsd/oraagent_oracle/oraagent_oracle.log".

CRS-2674: Start of 'ora.rac.db' on 'rac02' failed
CRS-2632: There are no more servers to try to place resource 'ora.rac.db' on that would satisfy its placement policy
CRS-5017: The resource action "ora.rac.db start" encountered the following error:
ORA-01506: missing or illegal database name
. For details refer to "(:CLSN00107:)" in "/u01/app/11.2.0/grid/log/rac01/agent/crsd/oraagent_oracle/oraagent_oracle.log".

CRS-2674: Start of 'ora.rac.db' on 'rac01' failed
[oracle@rac01 (rac1) dbs]$


What is happening. If the environment is the standalone environment then it is okay the spfile is created alright. But in case of RAC environment the best is if we specify the pfile to create spfile and it will work.

So solution is try creating the spfile from pfile as below:


SQL> create spfile='+DATA/RAC/spfileRAC.ora' from pfile ='/u01/app/oracle/product/11.2.0/dbs/init_RAC_refresh.ora';

File created.

SQL>

[oracle@rac01 (rac1) dbs]$ srvctl start database -d rac
[oracle@rac01 (rac1) dbs]$

12 comments:

Dominik said...

Saved my life :) Thanks for posting this

Ruediger said...

Very Thanks also from me. ( 2 lifes saved)

Anonymous said...

Thanks for this. Not sure I remotely understand why this is the case and it was driving me nuts...but hey - it works!

Unknown said...

you rock. It saved my time. Thanks aloooooot.

Anonymous said...

Very useful article. Save me the headache of changes made by our junior DBA

Alberto Farias said...

You just saved me a headache.
thanks.

Anonymous said...

create spfile='+DATA/xxx/PARAMETERFILE/spfilexxxx.ora' from pfile alway works for me, But one of our RAC setup we re-created & i got into this issue. I was struggled 2 hrs until I saw this post. Thank you so much ..

Anonymous said...

Thanks so much for your post! This really helped me out of a jam!!

Unknown said...

Thank you so much even in metalink they didn't highlight it.

Unknown said...

Thanks so much for your post! This really helped me in my oracle rac 11gR2 database when I changed same database parameters en spfile.

Regards !!

Anam said...

Excellent post

Gurmel said...

Yes it do works when you give the path and location for pfile, as database do not keep track of pfile once it is started and we are using full path of pfile to start DB. In case the initfile name would have been with naming standards it would have been no issues. Hope I am able to explain the reason behind.