ORA-01506: missing or illegal database name I  connected as sysdba and tried below:



SQL&gt; startup;

ORA-01506: missing or illegal database name

SQL&gt;


I tried multiple scenarios changing the Oracle_home and path variables but no luck.

These are my env variables:

c:\&gt;echo %ORACLE_HOME%
C:\oraclexe\app\oracle\product\11.2.0\server\

c:\&gt;echo %ORACLE_SID%
XE

c:\&gt;path
PATH=C:\oraclexe\app\oracle\product\11.2.0\server;C:\oraclexe\app\oracle\product
\11.2.0\server\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Wi
ndows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\A
TI.ACE\Core-Static;C:\instantclient-basic-windows.x64-11.2.0.4.0\instantclient_1
1_2;C:\Users\DINESH\AppData\Local\Programs\Python\Python37\Scripts\;C:\Users\DIN
ESH\AppData\Local\Programs\Python\Python37\


Also, I tried to restart the services manually but no luck.

The Content of initXE.ora is:

*.SPFILE='C:\oraclexe\app\oracle\product\11.2.0\server\dbs/spfileXE.ora',*.db_name='XE'


I tried:

SQL&gt; create pfile='C:\temp\initXE.ora' from spfile;

File created.

SQL&gt; create spfile from pfile='C:\temp\initXE.ora';

File created.

SQL&gt; startup;
ORACLE instance started.

Total System Global Area  217157632 bytes
Fixed Size                  2251776 bytes
Variable Size             159384576 bytes
Database Buffers           50331648 bytes
Redo Buffers                5189632 bytes
ORA-00205: error in identifying control file, check alert log for more info


Still getting an error.
$ oerr ora 1506
01506, 00000, "missing or illegal database name"
// *Cause:  No db_name INIT.ORA aprameter was specified.
// *Action:  The database name must be given in the db_name
//          INIT.ORA parameter.


Your ORACLE_SID is XE.
When you issue startup, your process looks for a file %ORACLE_HOME%\database\spfileXE.ora, or if it does not exist, then %ORACLE_HOME%\database\initXE.ora.

You get the above error when the db_name parameter is missing from them.

You can edit initXE.ora with any text editor and add the missing parameter: *.db_name='XE'.
spfile should not be edited directly, first create pfile from it:

create pfile='C:\temp\initXE.ora' from spfile;


Add the missing parameter to `C:\temp\initXE.ora', then create the spfile from it:

create spfile from pfile='C:\temp\initXE.ora';


After that, try startup again.




  ORA-00205: error in identifying control file, check alert log for more info


That is a completely different error, meaning the files defined in the parameter control_files are inaccessible.