Oracle 11g XE安装无法正常工作。 “创建CONTROLFILE失败”

时间:2014-05-31 08:59:14

标签: oracle oracle11g

我在我的Windows计算机上安装了Oracle 11g XE(在Windows XP Pro上运行),但不幸的是,无法让它运行起来。 GUI安装程序在安装过程中没有显示错误,我收到“已成功安装”消息,但是当我尝试使用SQL命令提示符连接到Oracle时,出现以下错误:

SQL> 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

“开始使用”快捷方式图标将我带到:

http://127.0.0.1:8080/apex/f?p=4950

给我一​​个“无法连接”的消息

在花了两天时间对此进行研究后,我发现除了这是一个听众问题,我的'oradata \ XE'文件夹位于: E:\ oraclexe \ app \ oracle \ oradata \ XE 为空。我认为它应该包含控制文件等。

在日志文件中报告的控制文件等创建有一些错误: E:\ oraclexe \ app \ oracle \ product \ 11.2.0 \ server \ config \ log 并将它们粘贴在这里 - >

cloneDBCreation.log

SQL> 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> 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> shutdown immediate;
ORA-01507: database not mounted 


ORACLE instance shut down.
SQL> 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> 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> alter system enable restricted session;

System altered.

SQL> alter database "XE" open resetlogs;
alter database "XE" open resetlogs
*
ERROR at line 1:
ORA-01507: database not mounted 


SQL> alter database rename global_name to "XE";
alter database rename global_name to "XE"
                                     *
ERROR at line 1:
ORA-01109: database not open 


SQL> alter system switch logfile;
alter system switch logfile
*
ERROR at line 1:
ORA-01109: database not open 


SQL> alter system checkpoint;
alter system checkpoint
*
ERROR at line 1:
ORA-01109: database not open 


SQL> alter database drop logfile group 3;
alter database drop logfile group 3
*
ERROR at line 1:
ORA-01507: database not mounted 


SQL> 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> 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> 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> alter user sys identified by "&&sysPassword";
alter user sys identified by "tiger"
                             *
ERROR at line 1:
ORA-01109: database not open 


SQL> alter user system identified by "&&systemPassword";
alter user system identified by "tiger"
                                *
ERROR at line 1:
ORA-01109: database not open 


SQL> alter system disable restricted session;

System altered.

SQL> @E:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\postScripts.sql
SQL> connect "SYS"/"&&sysPassword" as SYSDBA
Connected.
SQL> set echo on
SQL> spool E:\oraclexe\app\oracle\product\11.2.0\server\config\log\postScripts.log

CloneRmanRestore.log

SQL> 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> @E:\oraclexe\app\oracle\product\11.2.0\server\config\scripts\rmanRestoreDatafiles.sql;
SQL> 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> spool E:\oraclexe\app\oracle\product\11.2.0\server\config\log\cloneDBCreation.log

postDBCreation.log

SQL> connect "SYS"/"&&sysPassword" as SYSDBA
Connected.
SQL> set echo on
SQL> //create or replace directory DB_BACKUPS as 'E:\oraclexe\app\oracle\fast_recovery_area';
SP2-0103: Nothing in SQL buffer to run.
SQL> 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> 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> shutdown immediate;
ORA-01507: database not mounted 


ORACLE instance shut down.
SQL> connect "SYS"/"&&sysPassword" as SYSDBA
Connected to an idle instance.
SQL> 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> select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual;

'UTL_RECOMP_BEGIN:'||TO_CH                                                      
--------------------------                                                      
utl_recomp_begin: 06:01:55                                                      

SQL> 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> select 'utl_recomp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual;

'UTL_RECOMP_END:'||TO_CH                                                        
------------------------                                                        
utl_recomp_end: 06:01:55                                                        

SQL> alter user hr password expire account lock;
alter user hr password expire account lock
*
ERROR at line 1:
ORA-01109: database not open 


SQL> alter user ctxsys password expire account lock;
alter user ctxsys password expire account lock
*
ERROR at line 1:
ORA-01109: database not open 


SQL> alter user outln password expire account lock;
alter user outln password expire account lock
*
ERROR at line 1:
ORA-01109: database not open 


SQL> alter user MDSYS password expire;
alter user MDSYS password expire
*
ERROR at line 1:
ORA-01109: database not open 


SQL> @E:\oraclexe\app\oracle\product\11.2.0\server\apex\apxxepwd.sql "&1"
SQL> Rem  Copyright (c) Oracle Corporation 1999 - 2006. All Rights Reserved.
SQL> Rem
SQL> Rem    NAME
SQL> Rem      apxxepwd.sql
SQL> Rem
SQL> Rem    DESCRIPTION
SQL> Rem      Changes the password for the INTERNAL ADMIN user
SQL> Rem
SQL> Rem    NOTES
SQL> Rem      Assumes the SYS user is connected.
SQL> Rem
SQL> Rem    REQUIRENTS
SQL> Rem      - Oracle 10g
SQL> Rem
SQL> Rem
SQL> Rem    MODIFIED   (MM/DD/YYYY)
SQL> Rem      jstraub   08/01/2006 - Created
SQL> Rem      jkallman  09/29/2006 - Adjusted current_schema to FLOWS_030000
SQL> Rem      jkallman  08/02/2007 - Change FLOWS_030000 references to FLOWS_030100
SQL> Rem      jkallman  07/08/2008 - Change FLOWS_030100 references to FLOWS_040000
SQL> Rem      jkallman  10/02/2008 - Change FLOWS_040000 references to APEX_040000
SQL> 
SQL> Rem
SQL> 
SQL> set define '&'
SQL> 
SQL> set verify off
SQL> 
SQL> alter session set current_schema = APEX_040000;
ERROR:
ORA-01435: user does not exist 


SQL> 
SQL> prompt ...changing password for ADMIN
...changing password for ADMIN
SQL> 
SQL> 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   => c1.user_id,
 14          p_user_name     => wwv_flow_security.g_user,
 15          p_web_password  => '&1',
 16          p_new_password  => '&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> commit;

Commit complete.

SQL> spool off;

XE.bat.log

Instance created.

我没有粘贴 postScripts.log 的内容,因为它导致此问题的正文超出了允许的字符数限制。

正如互联网上的一些文章/帖子中所建议的那样,我尝试以sysdba身份连接Oracle以查看control_file参数。这就是我得到的:

SQL> connect / as sysdba
Connected.

SQL> show parameter control_files

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_files                        string      E:\ORACLEXE\APP\ORACLE\ORADATA
                                                 \XE\CONTROL.DBF

我很抱歉发布了日志文件中的所有信息,但我认为可能是必要的。

另外,请注意以下事项:

  • 我以User用户身份登录,该用户是Administrators组的一部分。
  • 我使用的是双启动系统,因此我的Windows XP安装在驱动器上 E:
  • 我只使用了GUI安装程序,并没有介入 安装过程

有些Oracle专家可以帮忙吗?安装有什么问题,如何让它工作?我已经尝试过多次重新安装,但我遇到了同样的问题。

4 个答案:

答案 0 :(得分:2)

这对我有类似的问题。

  1. 卸载OracleXE。
  2. 转到服务并检查是否有任何以Oracle开头的服务。
  3. 通过打开管理员命令提示符并输入命令sc delete servicename(例如,sc delete delete OracleServiceXE)来手动删除任何现有的Oracle服务。
  4. 转到您的环境变量并将Oracle_home设置为适当的位置(例如,c:\ oraclexe \ app \ product \ 11.2.0 \ server)并将相应的字符串添加到PATH变量的开头(例如,c :\ oraclexe \应用\产品\ 11.2.0 \服务器\ bin)中
  5. 重新安装OracleXE。

答案 1 :(得分:1)

我也有这个问题,只需重新安装以管理员身份运行解决问题并创建数据库

答案 2 :(得分:0)

我遇到了同样的问题:

  

输入用户名:system
  输入密码:
  错误:
  ORA-01033:正在进行ORACLE初始化或关闭   进程ID:0
  会话ID:0序列号:0

阅读完上述对话后,我意识到我无法创建任何文件 “E:\ oraclexe \应用\ ORACLE \ ORADATA \ XE”。

我只能创建文件夹,因为它是只读的。我终于卸载了,在F盘中创建了一个文件夹并重新安装在其中。这解决了我的问题,现在我已经联系了。

答案 3 :(得分:0)

关键是安装过程中 CloneRmanRestore.log 中的错误

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 

Oracle希望通过从OracleExpressEdition提供的文件中恢复数据库来创建数据库。但它无法将文件写入“E:\ ORACLEXE \ APP \ ORACLE \ ORADATA \ XE \ SYSTEM.DBF”。错误消息是

There is not enough space on the disk

这可能是真的,或者正如其他用户已经写过的那样,这可能意味着您没有权限写入此位置。所有其他错误消息都是由此问题引起的,因为Oracle无法创建数据库。我会跳过她的详细信息。

检查您是否能够写入此位置,例如将文件复制到此位置。如果无法复制,请解决问题并重试安装。正如其他用户所指出的那样,这可能是特权问题。您始终应使用管理员权限进行安装。