2013-05-14 170 views
13

我试图在(X)ubuntu 13.04 64位上使用this guide安装Oracle数据库。一切都很好GOED直到我得到下面的步骤:安装Oracle数据库速成版11g时遇到的问题

$ sudo /etc/init.d/oracle-xe configure 

Oracle Database 11g Express Edition Configuration 
------------------------------------------------- 
This will configure on-boot properties of Oracle Database 11g Express 
Edition. The following questions will determine whether the database should 
be starting upon system boot, the ports it will use, and the passwords that 
will be used for database accounts. Press <Enter> to accept the defaults. 
Ctrl-C will abort. 

Specify the HTTP port that will be used for Oracle Application Express [8080]: 

Specify a port that will be used for the database listener [1521]: 

Specify a password to be used for database accounts. Note that the same 
password will be used for SYS and SYSTEM. Oracle recommends the use of 
different passwords for each database account. This can be done after 
initial configuration: 
Confirm the password: 

Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]: 

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

日志文件显示以下的输出:

:/u01/app/oracle/product/11.2.0/xe/config/log$ for l in *.log 
> do 
> echo $l 
> cat $l 
> done 
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 
ORA-00845: MEMORY_TARGET not supported on this system 
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 


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


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


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


alter database drop logfile group 3 
* 
ERROR at line 1: 
ORA-01034: ORACLE not available 
Process ID: 0 
Session ID: 0 Serial number: 0 


ALTER TABLESPACE TEMP ADD TEMPFILE '/u01/app/oracle/oradata/XE/temp.dbf' SIZE 20480K REUSE AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED 
* 
ERROR at line 1: 
ORA-01034: ORACLE not available 
Process ID: 0 
Session ID: 0 Serial number: 0 


select tablespace_name from dba_tablespaces where tablespace_name='USERS' 
* 
ERROR at line 1: 
ORA-01034: ORACLE not available 
Process ID: 0 
Session ID: 0 Serial number: 0 


select sid, program, serial#, username from v$session 
* 
ERROR at line 1: 
ORA-01034: ORACLE not available 
Process ID: 0 
Session ID: 0 Serial number: 0 


alter user sys identified by "oracle" 
* 
ERROR at line 1: 
ORA-01034: ORACLE not available 
Process ID: 0 
Session ID: 0 Serial number: 0 


alter user system identified by "oracle" 
* 
ERROR at line 1: 
ORA-01034: ORACLE not available 
Process ID: 0 
Session ID: 0 Serial number: 0 


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


CloneRmanRestore.log 
ORA-00845: MEMORY_TARGET not supported on this system 
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 



File created. 

ORA-01034: ORACLE not available 
ORA-27101: shared memory realm does not exist 
Linux-x86_64 Error: 2: No such file or directory 
ORA-00845: MEMORY_TARGET not supported on this system 
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 
Process ID: 0 
Session ID: 0 Serial number: 0 


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


BEGIN dbms_swrf_internal.cleanup_database(cleanup_local => FALSE); 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 

我在做什么错?

+0

我不得不使用Oracle一所学校的课,但我从来没有设法得到它的工作,我决定用一个预先安装的虚拟机。我不在乎任何更多的解决方案,我也不会尝试它们。当我按'关闭'时,我没有得到任何描述正确结束这个问题的原因的选项。我应该删除这个问题吗?答案可能会帮助其他人。 – 2013-11-18 18:56:37

回答

1

This link looks like it has the answer.您需要确保将/ dev/shm安装在您的系统上,并将其分配给至少MEMORY_TARGET的内存。

您可以通过将以下内容添加到您的fstab中并重新启动来完成此操作。 (这将设置在/ dev/shm的大小为2GB):

shmfs /dev/shm tmpfs size=2048m 0 0 
+0

我试过了,但没有什么区别。我清除了日志,但是同样的日志重新出现。 – 2013-05-14 18:12:43

+0

当你键入'mount'时,它显示/ dev/shm挂载吗? – antlersoft 2013-05-14 19:00:04

+0

它不: ':〜〜$ mount | grep shm \ n none on/run/shm type tmpfs(rw,nosuid,nodev)' – 2013-05-14 20:07:03

0

有几个包需要先安装,加上有才能真正启动数据库改变一些内核参数。请参阅Oracle的Linux安装指南,或在Google上搜索Google获取Oracle 11gR2 XE的特定指南。

+0

我确实尝试了多个指南。我链接的人似乎是最简单的,但我已经安装了其他指南中提到的必需的软件包。 – 2013-05-14 18:13:53

8
nano /etc/init.d/oracle-shm 

添加文本

#! /bin/sh 
# /etc/init.d/oracle-shm 
# 
case "$1" in 
start) 
echo "Starting script /etc/init.d/oracle-shm" 
# Run only once at system startup 
if [ -e /dev/shm/.oracle-shm ]; then 
echo "/dev/shm is already mounted, nothing to do" 
else 
rm -f /dev/shm 
mkdir /dev/shm 
mount --move /run/shm /dev/shm 
mount -B /dev/shm /run/shm 
touch /dev/shm/.oracle-shm 
fi 
;; 
stop) 
echo "Stopping script /etc/init.d/oracle-shm" 
echo "Nothing to do" 
;; 
*) 
echo "Usage: /etc/init.d/oracle-shm {start|stop}" 
exit 1 
;; 
esac 
# 
### BEGIN INIT INFO 
# Provides: oracle-shm 
# Required-Start: $remote_fs $syslog 
# Required-Stop: $remote_fs $syslog 
# Default-Start: 2 3 4 5 
# Default-Stop: 0 1 6 
# Short-Description: Bind /run/shm to /dev/shm at system startup. 
# Description: Fix to allow Oracle 11g use AMM. 
### END INIT INFO 

使文件可执行

chmod 755 /etc/init.d/oracle-shm 
/etc/init.d/oracle-shm start 

在此阶段重新启动,然后检查

df -kh /dev/shm 

进一步进行效仿的chkconfig并继续休息的配置文件离子和安装

dpkg -i oracle-xe-11.2.0-1.0.x86_64.deb 

检查环境变量和ORACLE_HOME和启动数据库

+0

+1这一个工程 – mb2015 2013-09-26 00:25:12

+0

如果有人正在尝试这个为Linux。上面的oracle-shm为linux 6提供了以下错误:mount:特殊设备/ run/shm不存在 mount:挂载点/ run/shm不存在 – JackDev 2014-05-12 03:52:09

+0

我建议添加X-Start-Before:OracleXE line in INIT INFO块。这将确保它在OracleXE启动脚本之前运行。 – EdwinW 2014-08-29 00:42:03

28

我是在同一条船上,试图在虚拟机上配置XE(openSUSE的 13.01 64位) 。

我的解决方案是/etc/hosts中缺少的主机名。 您可以在最初检查/u01/app/oracle/product/11.2.0/xe/config/log/CloneRmanRestore.log中的错误(路径取决于您的XE版本)。

搜索类似的信息: ORA-00119: invalid specification for system parameter LOCAL_LISTENER ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=linux-cn65.site)(PORT=1521))

所以linux-cn65.site(VM主机)失踪了。加入你的主机在/ etc/hosts中(作为root):

127.0.0.1 linux-cn65.site < - 你的主机在这里

,并再次运行配置(以root身份):sh /etc/init.d/oracle-xe configure

其他弄虚作假

  • 如果您没有日志文件夹中的错误文件,则可以重新安装XE而不使用h标志,如t他:

    • 找到你的包:sudo rpm -qa | grep -i oracle
    • 将其删除:sudo rpm -e oracle-xe-11.2.0-1.0.x86_64 < - 你的包在这里
  • 没有H标志重新安装:sudo rpm -iv oracle-xe-11.2.0-1.0.x86_64.rpm

哦,用你的版本替换版本(oracle-xe-11.2.0-1.0.x86_64.rpm)。干杯;)

+2

它确实是主机名:)工作就像一个魅力! – Radu 2014-06-26 09:15:06

+0

嘿@kodeart你是个冷静的人,那只是wwooowww ....谢谢youuuzzz ... – beginer 2015-02-10 10:53:24

+0

最佳答案 – 2017-06-22 16:50:51

2

我这个挣扎过。我尝试了几种不同的解决方案,但仍然遇到了问题。我从数据库配置中删除MEMORY_TARGET“固定”它:在与MEMORY_TARGET线前

sqlplus/as sysdba 
create pfile=‘<path>’ from spfile 
!vi <path> 

添加#,保存并关闭文件。

startup from pfile=‘<path>' 
create spfile from pfile=‘<path>’ 

该解决方案适用于我的XE数据库,希望它有帮助。

+0

去哪里从 – 2017-05-24 01:18:50

2

我与Ubuntu 14.04这个确切的问题。问题归结为Oracle-XE在/ dev/shm期望足够的空间,而ubuntu已更改为使用/ run/shm和来自/ dev/shm的符号链接。

为我工作的解决方案是创建一个包含文件/etc/rc2.d/S01shm_load:

#!/bin/sh 
case "$1" in 
start) 
    mkdir /var/lock/subsys 2>/dev/null 
    touch /var/lock/subsys/listener 
    rm /dev/shm 2>/dev/null 
    mkdir /dev/shm 2>/dev/null 
    mount -t tmpfs shmfs -o size=2048m /dev/shm ;; 
*) 
    echo error 
    exit 1 
    ;;  
esac 

我得到这个从http://sysadminnotebook.blogspot.de/2012/10/installing-oracle-11g-r2-express.html这类似于许多其他页面上安装XE却被只有一个这个解决方案。

PS。文件权限被设置为755,所以你需要执行:

sudo chmod 755 /etc/rc2.d/S01shm_load

设置该文件的权限。

+0

尝试了所有的解决方案,但这个工作对我来说,是数据库配置中删除memeory目标给予有效的解释以及...谢谢! – 2017-08-30 13:39:48

+0

它有点奇怪。为什么使用'rm/dev/shm 2>/dev/null'而不是'rmdir/dev/shm 2>/dev/null'?据我所知,它工作不正常。 – hariprasad 2017-11-04 18:26:46