3 Replies Latest reply: Sep 11, 2011 5:32 PM by gerhard2001 RSS

    Changed spfileXE.ora and database wil not startup

    gerhard2001
      Hi!

      I added into the .../dbs/spfileXE.ora the following lines:

      ############################
           # Archive Log Destinations
           ############################
           log_archive_dest_1='location=/usr/lib/oracle/xe/oradata/archive'
           log_archive_start=TRUE

      in order to set the database permanently to 'Archive Log Mode'

      Now I can't mount or startup the database anymore!

      SQL> startup mount
      ORA-01078: failure in processing system parameters
      LRM-00109: could not open parameter file '/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/dbs/initXE.ora'

      So I created this 'initXE.oa' file as a copy of 'spfileXE.ora'

      That gives me the following error:

      SQL> startup mount
      ORA-01078: failure in processing system parameters
      LRM-00123: invalid character 0 found in the input file

      How can I fix this problem?

      Is it possible on Oracle XE to change any parameters permanently in the initialization file, and where is this initialization file located on my linux OS

      I'm using Ubuntu 10.10

      Thanks for any help!!

      Gerhard
        • 1. Re: Changed spfileXE.ora and database wil not startup
          orafad
          Did you edit the file directly? That's not possible (or at least advisable), as spfile is a "binary" file.

          Parameter settings are made via
          alter system set ... commands
          or
          creating a spfile based on a pfile, with create spfile ... command

          Hopefully you have a backup spfile or pfile, which you could use to revert the change.

          If not, perhaps something like this would work:
          strings spfileXE.ora > save_initXE.ora
          
          SQL> create spfile from pfile = '..path../save_initXE.ora';
          • 2. Re: Changed spfileXE.ora and database wil not startup
            Svetoslav Gyurov
            Hi Gerhard,

            You should not edit the spfile directly as it's binary and it's not meant to be edited with text editor. Spfile stand for server parameter file and it's used by Oracle to help you once you make any changed to the database within sqlplus they are written to the parameter file. Otherwise you are referring to parameter file (init.ora) which can be edited by text editor, but the command made to Oracle database are not written there. To make any changes to the database you issue commands like +alter system set parameter=value scope={spfile,memory,both}+ and if you are using server parameter file the changes can be written directly there, otherwise (parameter file) it's not possible and changes should be added by hand.

            To view if you are using and where's located the database spfile you could run show spfile command in sqlplus.

            Usually there is a file (initSID.ora) in $ORACLE_HOME/dbs/ or /database/ directory which is there parameter file or having the path to the spfile if using one.

            Regards,
            Sve
            • 3. Re: Changed spfileXE.ora and database wil not startup
              gerhard2001
              Hi orafad and Sve!

              Thanks for your comments!

              Unfortunately I didn't make a backup of that spfile!

              (Perhaps I should not work on Sunday? :-) )

              On another Computer I run the same database (Oracle XE) and the same OS (Ubuntu 10.10)

              I copied the spfile from this computer and replaced the damaged spfile with that copy!

              And it works!

              I think, I must be more careful in the future!!!

              Thanks a lot

              Gerhard