【发布时间】:2018-10-19 08:40:55
【问题描述】:
我在 ubuntu 18.04 中安装了 oracle 12c r2,当我进入 SqlPlus 并执行查询时出现错误。
要安装 oracle,我遵循以下两个指南:
1-https://tutorialforlinux.com/2018/05/09/how-to-install-oracle-12c-r2-database-on-ubuntu-18-04-bionic-64bit-easy-guide/ 2-https://etc.to/confluence/pages/viewpage.action?pageId=20480023
给我的错误如下:
ERROR at line 1:
ORA-01034:ORACLE not available
Process ID:0
Session ID: Serial numbre:0
监听器的状态(lsnrctl status)给了我以下错误:
Connectinc to (ADDRESS=(PROTOCOL=tcp)(HOST)(PORT=1521))
TNS-12541:TNS: no listener
tns-12560 TNS:protocol adapter error
TNS-00511: No listener
Linux error:111: Connection refused
谁能帮帮我?谢谢!!
更多信息
现在当我输入 lsnrctl status 我得到了这个,但是在 sqlplus 中仍然出现上面的失败
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 19-OCT-2018 01:53:18
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 19-OCT-2018 01:52:14
Uptime 0 days 0 hr. 1 min. 5 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Log File /u01/app/oracle/diag/tnslsnr/andoni-VirtualBox/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=andoni-VirtualBox)(PORT=1521)))
The listener supports no services
The command completed successfully
启动错误:
Enter user-name: sys as sysdba
Enter password:
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/12/dbhome_1/dbs/initSID.ora'
SQL>
【问题讨论】:
-
可能数据库没有启动。您可以运行 ps -ef | grep pmon 查找 pmon 进程。你可以运行 sqlplus / as sysdba 然后输入 startup。
-
当我执行命令时,我得到了我将在帖子中留下的错误,但是在这个目录中我没有 initxe.ora 只有 init.ora
-
看下面的第二个答案。您的 ORACLE_HOME 和 ORACLE_SID 必须正确设置。 Oracle home 可能是 /u01/app/oracle/product/12/dbhome_1。看起来您没有设置 ORACLE_SID。应该是ORCL。
-
您能否发布以下两个 Linux shell 命令的输出:ps -ef | grep pmon 和设置 | grep 甲骨文?