title: Oracle 11g XE installation not working. "Create CONTROLFILE failed"
body: <p>I installed Oracle 11g XE on my Windows computer (running on Windows XP Pro), but unfortunately, can't get it to work. There are no errors that the GUI installer shows up during the installation and I get the "installed successfully" message, but when I try to connect to Oracle using the SQL command prompt, I get the following error:</p>
  
  <pre><code>SQL&gt; connect
  Enter user-name: system
  Enter password:
  ERROR:
  ORA-01033: ORACLE initialization or shutdown in progress
  Process ID: 0
  Session ID: 0 Serial number: 0
  </code></pre>
  
  <p>The 'Get Started' shortcut icon takes me to : </p>
  
  <pre><code>http://127.0.0.1:8080/apex/f?p=4950
  </code></pre>
  
  <p>which gives me an "Unable to Connect" message</p>
  
  <p>After having spent 2 days doing research on this, I found out that apart from this being a Listener issue, my <strong>'oradata\XE'</strong> folder located at: <strong>E:\oraclexe\app\oracle\oradata\XE</strong> is <strong>empty</strong>. I think it should have contained the control files etc.</p>
  
  <p>There are some errors related to creation of control files etc. reported in the log files located at : <strong>E:\oraclexe\app\oracle\product\11.2.0\server\config\log</strong> and am pasting them here -></p>
  
  <p><strong>cloneDBCreation.log</strong></p>
  
  <pre><code>SQL&gt; Create controlfile reuse set database "XE"
    2  MAXINSTANCES 8
    3  MAXLOGHISTORY 1
    4  MAXLOGFILES 16
    5  MAXLOGMEMBERS 3
    6  MAXDATAFILES 100
    7  Datafile
    8  'E:\oraclexe\app\oracle\oradata\XE\system.dbf',
    9  'E:\oraclexe\app\oracle\oradata\XE\undotbs1.dbf',
   10  'E:\oraclexe\app\oracle\oradata\XE\sysaux.dbf',
   11  'E:\oraclexe\app\oracle\oradata\XE\users.dbf'
   12  LOGFILE
   13  GROUP 1 SIZE 51200K,
   14  GROUP 2 SIZE 51200K,
   15  RESETLOGS;
  Create controlfile reuse set database "XE"
  *
  ERROR at line 1:
  ORA-01503: CREATE CONTROLFILE failed 
  ORA-01565: error in identifying file 
  'E:\oraclexe\app\oracle\oradata\XE\system.dbf' 
  ORA-27041: unable to open file 
  OSD-04002: unable to open file 
  O/S-Error: (OS 2) The system cannot find the file specified. 
  
  
  SQL&gt; exec dbms_backup_restore.zerodbid(0);
  BEGIN dbms_backup_restore.zerodbid(0); END;
  
  *
  ERROR at line 1:
  ORA-00210: cannot open the specified control file 
  ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 4754 
  ORA-06512: at line 1 
  
  
  SQL&gt; shutdown immediate;
  ORA-01507: database not mounted 
  
  
  ORACLE instance shut down.
  SQL&gt; startup nomount pfile="E:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\initXETemp.ora";
  ORACLE instance started.
  
  Total System Global Area  535662592 bytes                                       
  Fixed Size                  1384760 bytes                                       
  Variable Size             226496200 bytes                                       
  Database Buffers          301989888 bytes                                       
  Redo Buffers                5791744 bytes                                       
  SQL&gt; Create controlfile reuse set database "XE"
    2  MAXINSTANCES 8
    3  MAXLOGHISTORY 1
    4  MAXLOGFILES 16
    5  MAXLOGMEMBERS 3
    6  MAXDATAFILES 100
    7  Datafile
    8  'E:\oraclexe\app\oracle\oradata\XE\system.dbf',
    9  'E:\oraclexe\app\oracle\oradata\XE\undotbs1.dbf',
   10  'E:\oraclexe\app\oracle\oradata\XE\sysaux.dbf',
   11  'E:\oraclexe\app\oracle\oradata\XE\users.dbf'
   12  LOGFILE
   13  GROUP 1 SIZE 51200K,
   14  GROUP 2 SIZE 51200K,
   15  RESETLOGS;
  Create controlfile reuse set database "XE"
  *
  ERROR at line 1:
  ORA-01503: CREATE CONTROLFILE failed 
  ORA-01565: error in identifying file 
  'E:\oraclexe\app\oracle\oradata\XE\system.dbf' 
  ORA-27041: unable to open file 
  OSD-04002: unable to open file 
  O/S-Error: (OS 2) The system cannot find the file specified. 
  
  
  SQL&gt; alter system enable restricted session;
  
  System altered.
  
  SQL&gt; alter database "XE" open resetlogs;
  alter database "XE" open resetlogs
  *
  ERROR at line 1:
  ORA-01507: database not mounted 
  
  
  SQL&gt; alter database rename global_name to "XE";
  alter database rename global_name to "XE"
                                       *
  ERROR at line 1:
  ORA-01109: database not open 
  
  
  SQL&gt; alter system switch logfile;
  alter system switch logfile
  *
  ERROR at line 1:
  ORA-01109: database not open 
  
  
  SQL&gt; alter system checkpoint;
  alter system checkpoint
  *
  ERROR at line 1:
  ORA-01109: database not open 
  
  
  SQL&gt; alter database drop logfile group 3;
  alter database drop logfile group 3
  *
  ERROR at line 1:
  ORA-01507: database not mounted 
  
  
  SQL&gt; ALTER TABLESPACE TEMP ADD TEMPFILE 'E:\oraclexe\app\oracle\oradata\XE\temp.dbf' SIZE 20480K REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED;
  ALTER TABLESPACE TEMP ADD TEMPFILE 'E:\oraclexe\app\oracle\oradata\XE\temp.dbf' SIZE 20480K REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
  *
  ERROR at line 1:
  ORA-01109: database not open 
  
  
  SQL&gt; select tablespace_name from dba_tablespaces where tablespace_name='USERS';
  select tablespace_name from dba_tablespaces where tablespace_name='USERS'
                              *
  ERROR at line 1:
  ORA-01219: database not open: queries allowed on fixed tables/views only 
  
  
  SQL&gt; select sid, program, serial#, username from v$session;
  
         SID PROGRAM                                                              
  ---------- ----------------------------------------------------------------     
     SERIAL# USERNAME                                                             
  ---------- ------------------------------                                       
           1 ORACLE.EXE (PMON)                                                    
           1                                                                      
  
           2 ORACLE.EXE (VKTM)                                                    
           1                                                                      
  
           3 ORACLE.EXE (DIAG)                                                    
           1                                                                      
  
  
         SID PROGRAM                                                              
  ---------- ----------------------------------------------------------------     
     SERIAL# USERNAME                                                             
  ---------- ------------------------------                                       
           4 ORACLE.EXE (DIA0)                                                    
           1                                                                      
  
           5 ORACLE.EXE (DBW0)                                                    
           1                                                                      
  
           6 ORACLE.EXE (RECO)                                                    
           1                                                                      
  
  
         SID PROGRAM                                                              
  ---------- ----------------------------------------------------------------     
     SERIAL# USERNAME                                                             
  ---------- ------------------------------                                       
           8 ORACLE.EXE (CKPT)                                                    
           1                                                                      
  
           9 sqlplus.exe                                                          
           3 SYS                                                                  
  
          10 ORACLE.EXE (MMNL)                                                    
           5                                                                      
  
  
         SID PROGRAM                                                              
  ---------- ----------------------------------------------------------------     
     SERIAL# USERNAME                                                             
  ---------- ------------------------------                                       
          88 ORACLE.EXE (PSP0)                                                    
           1                                                                      
  
          89 ORACLE.EXE (GEN0)                                                    
           1                                                                      
  
          90 ORACLE.EXE (DBRM)                                                    
           1                                                                      
  
  
         SID PROGRAM                                                              
  ---------- ----------------------------------------------------------------     
     SERIAL# USERNAME                                                             
  ---------- ------------------------------                                       
          91 ORACLE.EXE (MMAN)                                                    
           1                                                                      
  
          92 ORACLE.EXE (LGWR)                                                    
           1                                                                      
  
          93 ORACLE.EXE (SMON)                                                    
           1                                                                      
  
  
  15 rows selected.
  
  SQL&gt; alter user sys identified by "&amp;&amp;sysPassword";
  alter user sys identified by "tiger"
                               *
  ERROR at line 1:
  ORA-01109: database not open 
  
  
  SQL&gt; alter user system identified by "&amp;&amp;systemPassword";
  alter user system identified by "tiger"
                                  *
  ERROR at line 1:
  ORA-01109: database not open 
  
  
  SQL&gt; alter system disable restricted session;
  
  System altered.
  
  SQL&gt; @E:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\postScripts.sql
  SQL&gt; connect "SYS"/"&amp;&amp;sysPassword" as SYSDBA
  Connected.
  SQL&gt; set echo on
  SQL&gt; spool E:\oraclexe\app\oracle\product\11.2.0\server\config\log\postScripts.log
  </code></pre>
  
  <p><strong>CloneRmanRestore.log</strong></p>
  
  <pre><code>SQL&gt; startup nomount pfile="E:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\init.ora";
  ORACLE instance started.
  
  Total System Global Area  535662592 bytes                                       
  Fixed Size                  1384760 bytes                                       
  Variable Size             226496200 bytes                                       
  Database Buffers          301989888 bytes                                       
  Redo Buffers                5791744 bytes                                       
  SQL&gt; @E:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\rmanRestoreDatafiles.sql;
  SQL&gt; set echo off;
  
  TO_CHAR(SYSTIMEST                                                               
  -----------------                                                               
  20140530 06:00:59                                                               
  
  Allocating device....                                                           
  Specifying datafiles...                                                         
  Specifing datafiles...                                                          
  Restoring ...                                                                   
  declare
  *
  ERROR at line 1:
  ORA-19624: operation failed, retry possible 
  ORA-19870: error while restoring backup piece 
  E:\ORACLEXE\APP\ORACLE\PRODUCT\11.2.0\SERVER\CONFIG\SEEDDB\EXPRESS.DFB 
  ORA-19504: failed to create file "E:\ORACLEXE\APP\ORACLE\ORADATA\XE\SYSTEM.DBF" 
  ORA-27044: unable to write the header block of file 
  OSD-04008: WriteFile() failure, unable to write to file 
  O/S-Error: (OS 112) There is not enough space on the disk. 
  ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5827 
  ORA-06512: at line 16 
  
  
  
  TO_CHAR(SYSTIMEST                                                               
  -----------------                                                               
  20140530 06:01:02                                                               
  
  Connected.
  SQL&gt; spool E:\oraclexe\app\oracle\product\11.2.0\server\config\log\cloneDBCreation.log
  </code></pre>
  
  <p><strong>postDBCreation.log</strong></p>
  
  <pre><code>SQL&gt; connect "SYS"/"&amp;&amp;sysPassword" as SYSDBA
  Connected.
  SQL&gt; set echo on
  SQL&gt; //create or replace directory DB_BACKUPS as 'E:\oraclexe\app\oracle\fast_recovery_area';
  SP2-0103: Nothing in SQL buffer to run.
  SQL&gt; begin
    2     dbms_xdb.sethttpport('8080');
    3     dbms_xdb.setftpport('0');
    4  end;
    5  /
     dbms_xdb.sethttpport('8080');
     *
  ERROR at line 2:
  ORA-06550: line 2, column 4: 
  PLS-00201: identifier 'DBMS_XDB.SETHTTPPORT' must be declared 
  ORA-06550: line 2, column 4: 
  PL/SQL: Statement ignored 
  ORA-06550: line 3, column 4: 
  PLS-00201: identifier 'DBMS_XDB.SETFTPPORT' must be declared 
  ORA-06550: line 3, column 4: 
  PL/SQL: Statement ignored 
  
  
  SQL&gt; create spfile='E:\oraclexe\app\oracle\product\11.2.0\server\dbs/spfileXE.ora' FROM pfile='E:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\init.ora';
  
  File created.
  
  SQL&gt; shutdown immediate;
  ORA-01507: database not mounted 
  
  
  ORACLE instance shut down.
  SQL&gt; connect "SYS"/"&amp;&amp;sysPassword" as SYSDBA
  Connected to an idle instance.
  SQL&gt; startup ;
  ORACLE instance started.
  
  Total System Global Area  535662592 bytes                                       
  Fixed Size                  1384760 bytes                                       
  Variable Size             226496200 bytes                                       
  Database Buffers          301989888 bytes                                       
  Redo Buffers                5791744 bytes                                       
  ORA-00205: error in identifying control file, check alert log for more info 
  
  
  SQL&gt; select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual;
  
  'UTL_RECOMP_BEGIN:'||TO_CH                                                      
  --------------------------                                                      
  utl_recomp_begin: 06:01:55                                                      
  
  SQL&gt; execute utl_recomp.recomp_serial();
  BEGIN utl_recomp.recomp_serial(); END;
  
        *
  ERROR at line 1:
  ORA-06550: line 1, column 7: 
  PLS-00201: identifier 'UTL_RECOMP.RECOMP_SERIAL' must be declared 
  ORA-06550: line 1, column 7: 
  PL/SQL: Statement ignored 
  
  
  SQL&gt; select 'utl_recomp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual;
  
  'UTL_RECOMP_END:'||TO_CH                                                        
  ------------------------                                                        
  utl_recomp_end: 06:01:55                                                        
  
  SQL&gt; alter user hr password expire account lock;
  alter user hr password expire account lock
  *
  ERROR at line 1:
  ORA-01109: database not open 
  
  
  SQL&gt; alter user ctxsys password expire account lock;
  alter user ctxsys password expire account lock
  *
  ERROR at line 1:
  ORA-01109: database not open 
  
  
  SQL&gt; alter user outln password expire account lock;
  alter user outln password expire account lock
  *
  ERROR at line 1:
  ORA-01109: database not open 
  
  
  SQL&gt; alter user MDSYS password expire;
  alter user MDSYS password expire
  *
  ERROR at line 1:
  ORA-01109: database not open 
  
  
  SQL&gt; @E:\oraclexe\app\oracle\product\11.2.0\server\apex\apxxepwd.sql "&amp;1"
  SQL&gt; Rem  Copyright (c) Oracle Corporation 1999 - 2006. All Rights Reserved.
  SQL&gt; Rem
  SQL&gt; Rem    NAME
  SQL&gt; Rem      apxxepwd.sql
  SQL&gt; Rem
  SQL&gt; Rem    DESCRIPTION
  SQL&gt; Rem      Changes the password for the INTERNAL ADMIN user
  SQL&gt; Rem
  SQL&gt; Rem    NOTES
  SQL&gt; Rem      Assumes the SYS user is connected.
  SQL&gt; Rem
  SQL&gt; Rem    REQUIRENTS
  SQL&gt; Rem      - Oracle 10g
  SQL&gt; Rem
  SQL&gt; Rem
  SQL&gt; Rem    MODIFIED   (MM/DD/YYYY)
  SQL&gt; Rem      jstraub   08/01/2006 - Created
  SQL&gt; Rem      jkallman  09/29/2006 - Adjusted current_schema to FLOWS_030000
  SQL&gt; Rem      jkallman  08/02/2007 - Change FLOWS_030000 references to FLOWS_030100
  SQL&gt; Rem      jkallman  07/08/2008 - Change FLOWS_030100 references to FLOWS_040000
  SQL&gt; Rem      jkallman  10/02/2008 - Change FLOWS_040000 references to APEX_040000
  SQL&gt; 
  SQL&gt; Rem
  SQL&gt; 
  SQL&gt; set define '&amp;'
  SQL&gt; 
  SQL&gt; set verify off
  SQL&gt; 
  SQL&gt; alter session set current_schema = APEX_040000;
  ERROR:
  ORA-01435: user does not exist 
  
  
  SQL&gt; 
  SQL&gt; prompt ...changing password for ADMIN
  ...changing password for ADMIN
  SQL&gt; 
  SQL&gt; begin
    2  
    3      wwv_flow_security.g_security_group_id := 10;
    4      wwv_flow_security.g_user := 'ADMIN';
    5      wwv_flow_security.g_import_in_progress := true;
    6  
    7      for c1 in (select user_id
    8               from wwv_flow_fnd_user
    9              where security_group_id = wwv_flow_security.g_security_group_id
   10                and user_name = wwv_flow_security.g_user) loop
   11  
   12          wwv_flow_fnd_user_api.edit_fnd_user(
   13          p_user_id   =&gt; c1.user_id,
   14          p_user_name     =&gt; wwv_flow_security.g_user,
   15          p_web_password  =&gt; '&amp;1',
   16          p_new_password  =&gt; '&amp;1');
   17      end loop;
   18  
   19      wwv_flow_security.g_import_in_progress := false;
   20  
   21  end;
   22  /
      wwv_flow_security.g_security_group_id := 10;
      *
  ERROR at line 3:
  ORA-06550: line 3, column 5: 
  PLS-00201: identifier 'WWV_FLOW_SECURITY.G_SECURITY_GROUP_ID' must be declared 
  ORA-06550: line 3, column 5: 
  PL/SQL: Statement ignored 
  ORA-06550: line 4, column 5: 
  PLS-00201: identifier 'WWV_FLOW_SECURITY.G_USER' must be declared 
  ORA-06550: line 4, column 5: 
  PL/SQL: Statement ignored 
  ORA-06550: line 5, column 5: 
  PLS-00201: identifier 'WWV_FLOW_SECURITY.G_IMPORT_IN_PROGRESS' must be declared 
  ORA-06550: line 5, column 5: 
  PL/SQL: Statement ignored 
  ORA-06550: line 8, column 23: 
  PL/SQL: ORA-01219: database not open: queries allowed on fixed tables/views 
  only 
  ORA-06550: line 7, column 16: 
  PL/SQL: SQL Statement ignored 
  ORA-06550: line 13, column 32: 
  PLS-00364: loop index variable 'C1' use is invalid 
  ORA-06550: line 12, column 9: 
  PL/SQL: Statement ignored 
  ORA-06550: line 19, column 5: 
  PLS-00201: identifier 'WWV_FLOW_SECURITY.G_IMPORT_IN_PROGRESS' must be declared 
  ORA-06550: line 19, column 5: 
  PL/SQL: Statement ignored 
  
  
  SQL&gt; commit;
  
  Commit complete.
  
  SQL&gt; spool off;
  </code></pre>
  
  <p><strong>XE.bat.log</strong></p>
  
  <pre><code>Instance created.
  </code></pre>
  
  <p>I have not pasted the contents of the <strong>postScripts.log</strong> as it was causing the body of this question to exceed the allowed limit of characters.</p>
  
  <p>As suggested in some articles/posts on the internet, I tried connecting to Oracle as sysdba to view the control_file parameter. This is what I got:</p>
  
  <pre><code>SQL&gt; connect / as sysdba
  Connected.
  
  SQL&gt; show parameter control_files
  
  NAME                                 TYPE        VALUE
  ------------------------------------ ----------- ------------------------------
  control_files                        string      E:\ORACLEXE\APP\ORACLE\ORADATA
                                                   \XE\CONTROL.DBF
  </code></pre>
  
  <p>I am sorry for posting all the information from the log files, but I thought it might be necessary.</p>
  
  <p>Also, pls be aware of the following:</p>
  
  <ul>
  <li>I am logged in as a User which is a part of the Administrators group.</li>
  <li>I am using a dual boot system, so my Windows XP is installed on drive
  E:</li>
  <li>I have used the GUI installer only and did not meddle in the
  installation process</li>
  </ul>
  
  <p>Can some Oracle expert please help ? What is wrong with the installation and how do I get it to work ? I have tried reinstalling it several times, but am stuck with the same issues.</p>