无法启动Oracle

时间:2013-01-07 19:39:13

标签: oracle oracle11g

我在Centos 6.3上安装了最新版本的Oracle 11g。但由于某种原因,我无法连接到SQL plus。这是listener.ora的内容:

# listener.ora Network Configuration File: /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.104)(PORT = 1521))
    )
  )

ADR_BASE_LISTENER = /u01/app/oracle

我在shell中输入:

[oracle@localhost bin]$ ./lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 07-JAN-2013 21:37:32

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/11.2.0/dbhome_1//bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.104)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date                07-JAN-2013 21:37:32
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.104)(PORT=1521)))
The listener supports no services
The command completed successfully
[oracle@localhost bin]$ 

然后我尝试启动SQL加上这个:

[oracle@localhost bin]$ ./sqlplus sys@oracle AS SYSDBA

SQL*Plus: Release 11.2.0.1.0 Production on Mon Jan 7 21:38:27 2013

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Enter password: 
ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Enter user-name: 

我如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

确保$ TNS_ADMIN指向tnsnames.ora和sqlnet.ora所在的目录。