2016-09-20 90 views
0

我试图在我的linux机器上使用命令“sqlplus/as sysdba”运行sql命令行“sqlplus”。我得到如下:不能在linux中使用sqlplus

的SQL * Plus:上周二9月20日十二时28分29秒2016

版权所有(C)1982年,2009年,Oracle版本11.2.0.1.0生产。版权所有。

连接到一个空闲实例。

然后当我写statrup命令我得到:

ORA-01078: failure in processing system parameters 
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initSID.ora' 
SQL> exit 
Disconnected 

我在网上找了一个解决方案,我跟着什么写在https://community.oracle.com/thread/2178662 enter link description here 我的sqlplus再次启动之前尝试下面的命令: 出口ORACLE_SID = SID ENV | grep的ORA |排序它给我提供以下信息:

ORACLE_BASE=/u01/app/oracle 
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 
ORACLE_HOSTNAME= HOSENAME 
ORACLE_SID=SID 
ORACLE_UNQNAME=DB11G 

最后我屏幕ä TE猫的/ etc/oratab中,,结果如下

# This file is used by ORACLE utilities. It is created by root.sh 
# and updated by the Database Configuration Assistant when creating 
# a database. 

# A colon, ':', is used as the field terminator. A new line terminates 
# the entry. Lines beginning with a pound sign, '#', are comments. 
# 
# Entries are of the form: 
# $ORACLE_SID:$ORACLE_HOME:<N|Y>: 
# 
# The first and second fields are the system identifier and home 
# directory of the database respectively. The third filed indicates 
# to the dbstart utility that the database should , "Y", or should not, 
# "N", be brought up at system boot time. 
# 
# Multiple entries with the same $ORACLE_SID are not allowed. 
# 

最后,我想检查我的数据库使用以下命令ps -ef运行| grep的PMON 这表明我

oracle 18023 11347 0 12:38 pts/5 00:00:00 grep --color=auto pmon 
oracle 19686  1 0 Aug23 ?  00:05:11 ora_pmon_apertureSID 

所以现在我不知道最新的问题。我需要运行sqlplus 任何人都可以引导我

+0

嗨,你有没有尝试 “启动” 或 “启动PFILE = ...”? – davegreen100

回答

1

您的数据库SID是“apertureSID”不是纯“SID”。

export ORACLE_SID=apertureSID

此外,建议让Oracle SID最大。长12个字符,通常全部大写。

+0

是的,我刚刚通过改变这个问题来解决问题。非常感谢 – Hamda

+1

您应该将此答案标记为正确 –