Oracle startup error (could not open parameter file)
I see two things wrong here. Oracle tries to open a parameter file in the $ORACLE_HOME/dbs directory with the format "spfile" + $ORACLE_SID + ".ora". If it cannot find it, it then tries to open "init" + $ORACLE_SID + ".ora". This is where the problem(s) are.
By virtue of the fact that Oracle is trying to open a parameter file named "initXE.ora", your SID must be (or was at one point) equal to "XE".
1) This is the easy part, so try this first. Since (in your comments) doing an echo $ORACLE_SID
yields nothing, try setting it.
export ORACLE_SID=XE
Then try starting Oracle again.
2) In your comments above, you show the file is named "initxe.ora". Is that really the name of the file? Or did your paste into a comment somehow lowercase the output of the ls
command?
The reason I point this out, is that Ubuntu (Linux) has a case-sensitive filesystem. So initxe.ora and initXE.ora are actually two different files. So if your comment is correct and the file is lower-cased, you'll want to set your ORACLE_SID to "xe" instead:
export ORACLE_SID=xe
Try that, and see if it works.
If this is a new installed Oracle and you do not have initXE.ora parameter file here /u01/app/oracle/product/11.2.0/xe/dbs/, that means you need to create XE DB first. To do that run /u01/app/oracle/product/11.2.0/xe/bin/createdb.sh script first.
I used to face this issue.
I realized that the error can be caused by the pfile not being found. You have to start the Oracle instance using a fully referenced pfile by issuing the following command:
SQL> startup pfile=<your pfile full path here>