4 Replies Latest reply: Oct 3, 2011 7:17 AM by EdStevens RSS

    Change default locatiton of initsid ora file

    Mikail
      Hi,
      I've installed Oracle 10G (Express Edition)on my Windows XP. The installer itself refused to create and start the Oracle database and services so I created my database manually. After creating the database I had a big trouble with the famous "Oracle not available" and "shared memory realm does not exist" errors. Sometimes i noticed that while trying to start the OracleService XE from cmd I received a error message indicating it can't open initXE.ora file located in %ORACLE_HOME%\Database. But before creting my database I created the needed folders(bdump,cdump,pfile etc.) and put them in %ORACLE_BASE%\app\oracle\admin\XE folder. And the initXE.ora file into the pfile folder. Now everytime I start the service it seems it ties to read the initXE.ora file located not in the pfile folder but in the Database folder. Comes out %ORACLE_HOME%\Database is the default location where Oracle looks for init<sid>.ora file. How can I change this location so that each database has its own location of its initialization file. I looked up the registry but could not find anything related with init.ora file.
        • 1. Re: Change default locatiton of initsid ora file
          sybrand_b
          1 pfiles are obsolete. Go for spfiles
          2 with XE you can create only one (1) database.
          3 you need to have a dummy pfile with one line reading
          ifile=
          or
          spfile=

          but then you won't be able to create multiple databases.

          --------
          Sybrand Bakker
          Senior Oracle DBA
          • 2. Re: Change default locatiton of initsid ora file
            CKPT
            Mikail wrote:
            Hi,
            I've installed Oracle 10G (Express Edition)on my Windows XP. The installer itself refused to create and start the Oracle database and services so I created my database manually. After creating the database I had a big trouble with the famous "Oracle not available" and "shared memory realm does not exist" errors. Sometimes i noticed that while trying to start the OracleService XE from cmd I received a error message indicating it can't open initXE.ora file located in %ORACLE_HOME%\Database. But before creting my database I created the needed folders(bdump,cdump,pfile etc.) and put them in %ORACLE_BASE%\app\oracle\admin\XE folder. And the initXE.ora file into the pfile folder. Now everytime I start the service it seems it ties to read the initXE.ora file located not in the pfile folder but in the Database folder. Comes out %ORACLE_HOME%\Database is the default location where Oracle looks for init<sid>.ora file. How can I change this location so that each database has its own location of its initialization file. I looked up the registry but could not find anything related with init.ora file.
            Specific to windows, You can edit the regedit for oracle related parameters, you can able to see PFILE lcoation option, There you can mention if any other location than %ORACLE_HOM%/database.

            AFAIK, you can edit the oracle service on windows.
            C:\> oradim -edit -sid <sid> -pfile <pfile_location'
            • 3. Re: Change default locatiton of initsid ora file
              Mikail
              Thank you for clearrence. But let's say I keep using pfile. DO I always have to specify the location of the init<sit>.ora file when I start a database. I ask this because in our server there are more than 5 databases. All the related services are started automatically. And I can connect to any of those databases from any client. No one ever needs to worry about the init file. I met ini.ora file after the installation of Oracle XE on my computer and I did not have any issues with it before. Why do I have a problem with it now?
              • 4. Re: Change default locatiton of initsid ora file
                EdStevens
                Mikail wrote:
                Thank you for clearrence. But let's say I keep using pfile. DO I always have to specify the location of the init<sit>.ora file when I start a database.
                Not if you put it in the default location? Why would you NOT want to put it in the default location?
                And why would you NOT want to use the spfile?
                I ask this because in our server there are more than 5 databases. All the related services are started automatically. And I can connect to any of those databases from any client. No one ever needs to worry about the init file.
                What does any of that have to do with the init.ora on your XE setup on your PC? Referencing the init.ora (or spfile, for that matter) is not an issue for connecting to an instance. It is only an issue for starting an instance.
                I met ini.ora file after the installation of Oracle XE on my computer and I did not have any issues with it before. Why do I have a problem with it now?
                Because you are working with XE on your PC, which you set up yourself (and trying to do it in a non-standard way) , vs. working with SE or EE on a server, which someone else set up correctly. You are trying to compare apples and oranges ... you are trying to use oranges to make an apple pie.