Linux

為什麼在 ubuntu 上 Oracle 數據庫配置失敗?

  • August 13, 2017

我正在嘗試在我的 ubuntu 伺服器上安裝 Oracle Database 11g Express Edition。執行命令後:

sudo service oracle-xe start

配置後我得到以下結果:

Starting Oracle Net Listener...Done
Configuring database...
Database Configuration failed.  Look into /u01/app/oracle/product/11.2.0/xe/config/log for de                                                                              tails

在日誌文件中,我發現了以下資訊:

CloneRmanRestore.log:

   LRM-00116: syntax error at 'sessions' following '='
ORA-01078: failure in processing system parameters
select TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


declare
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


select TO_CHAR(systimestamp,'YYYYMMDD HH:MI:SS') from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

postDBCreation.log

begin
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


create spfile='/u01/app/oracle/product/11.2.0/xe/dbs/spfileXE.ora' FROM pfile='/u01/app/oracle/product/11.2.0/xe/config/scripts/init.ora'
*
ERROR at line 1:
ORA-01078: failure in processing system parameters
LRM-00116: syntax error at 'sessions' following '='


ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/xe/dbs/initXE.ora'
select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


BEGIN utl_recomp.recomp_serial(); END;

*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


select 'utl_recomp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

cloneDBCreation.log:

Create controlfile reuse set database "XE"
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


BEGIN dbms_backup_restore.zerodbid(0); END;

*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
LRM-00116: syntax error at 'sessions' following '='
ORA-01078: failure in processing system parameters
Create controlfile reuse set database "XE"
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


alter system enable restricted session
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


alter database "XE" open resetlogs
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

postDBCreation.log:
begin
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


create spfile='/u01/app/oracle/product/11.2.0/xe/dbs/spfileXE.ora' FROM pfile='/u01/app/oracle/product/11.2.0/xe/config/scripts/init.ora'
*
ERROR at line 1:
ORA-01078: failure in processing system parameters
LRM-00116: syntax error at 'sessions' following '='


ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/xe/dbs/initXE.ora'
select 'utl_recomp_begin: ' || to_char(sysdate, 'HH:MI:SS') from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


BEGIN utl_recomp.recomp_serial(); END;

*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


select 'utl_recomp_end: ' || to_char(sysdate, 'HH:MI:SS') from dual
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0

postScripts.log:

CREATE OR REPLACE LIBRARY dbms_sumadv_lib AS '/u01/app/oracle/product/11.2.0/xe/lib/libqsmashr.so';
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


BEGIN dbms_datapump_utl.replace_default_dir; END;

*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


commit
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


create or replace directory XMLDIR as '/u01/app/oracle/product/11.2.0/xe/rdbms/xml'
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


DROP DIRECTORY ORACLE_OCM_CONFIG_DIR
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0


DROP DIRECTORY ADMIN_DIR
*
ERROR at line 1:
ORA-01034: ORACLE not available

如何修復它並配置我的數據庫?我有 256 MB 的 RAM 記憶體,足以執行 Oracle 嗎?這可能是一個問題嗎?

Oracle 文件說,建議使用512Mb 的 RAM 來執行 Oracle XE,至少需要 256Mb。實際上,如果在 Linux 機器/VM 上執行其他任何東西,您真的會為僅 256Mb 而苦苦掙扎。

在嘗試重新安裝之前,請確保您已遵守文件中的所有先決條件(核心參數、添加 2Gb 交換空間)。

我已經成功地讓它在具有 512Mb RAM 的 Digital Ocean VM 上執行——我剛剛在磁碟上添加了一個 4Gb 交換文件——它執行得像夢一樣。好吧,一個緩慢的夢想:-)

引用自:https://dba.stackexchange.com/questions/122371