事情是这样的.
本人是oracle 初学者
oracle 11g装在了虚拟机(redhat 5.4)上. 实体机也是linux系统.我在虚拟机上
用sqlplus / as sysdba 命令是正常登陆的.实体机上用sqldeveloper 连接虚拟机的数据库, 也是正常的.
但是在实体机上执行sqlplus 远程登陆时会出现ora-12514 错误
sqlplus hr/[email protected]:1521/orclgateman@TFPC Programs $ sqlplus hr/[email protected]:1521/orclSQL*Plus: Release 12.1.0.1.0 Production on Sat Oct 5 22:14:09 2013Copyright (c) 1982, 2013, Oracle. All rights reserved.ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
Enter user-name: ^C
gateman@TFPC Programs $
这个语句就算在虚拟机上执行都会报同样的错误.
网上查找了很久都找不到解决方法. 有大神能帮忙看看吗? 谢谢下面我会把 listener.ora tnsname.ora 都贴出来:listener.ora
[oracle@TPRHEL admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/project/11.2.0/db_home1/oracle/network/admin/listener.ora
# Generated by Oracle configuration tools.LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
)
)SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl_dbn)
(ORACLE_HOME = /u01/app/oracle/project/11.2.0/db_home1/oracle)
(SID_NAME = orcl)
)
)ADR_BASE_LISTENER = /u01/app/oracle/project[oracle@TPRHEL admin]$ tnsname.ora
[oracle@TPRHEL admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/project/11.2.0/db_home1/oracle/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.localdomain)
)
)[oracle@TPRHEL admin]$
lsnrctl 监听状态
[oracle@TPRHEL admin]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-OCT-2013 22:15:39Copyright (c) 1991, 2009, Oracle. All rights reserved.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 05-OCT-2013 22:04:39
Uptime 0 days 0 hr. 11 min. 2 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/project/11.2.0/db_home1/oracle/network/admin/listener.ora
Listener Log File /u01/app/oracle/project/diag/tnslsnr/TPRHEL/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "orcl.localdomain" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB.localdomain" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_dbn" has 1 instance(s).
Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@TPRHEL admin]$ lsnrctl serviceLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-OCT-2013 22:16:07Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "orcl.localdomain" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:2 refused:0 state:ready
LOCAL SERVER
Service "orclXDB.localdomain" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: TPRHEL, pid: 3088>
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=65294))
Service "orcl_dbn" has 1 instance(s).
Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
The command completed successfully
[oracle@TPRHEL admin]$ 十分感谢..远程连接数据库虚拟机oracle 11g
本人是oracle 初学者
oracle 11g装在了虚拟机(redhat 5.4)上. 实体机也是linux系统.我在虚拟机上
用sqlplus / as sysdba 命令是正常登陆的.实体机上用sqldeveloper 连接虚拟机的数据库, 也是正常的.
但是在实体机上执行sqlplus 远程登陆时会出现ora-12514 错误
sqlplus hr/[email protected]:1521/orclgateman@TFPC Programs $ sqlplus hr/[email protected]:1521/orclSQL*Plus: Release 12.1.0.1.0 Production on Sat Oct 5 22:14:09 2013Copyright (c) 1982, 2013, Oracle. All rights reserved.ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor
Enter user-name: ^C
gateman@TFPC Programs $
这个语句就算在虚拟机上执行都会报同样的错误.
网上查找了很久都找不到解决方法. 有大神能帮忙看看吗? 谢谢下面我会把 listener.ora tnsname.ora 都贴出来:listener.ora
[oracle@TPRHEL admin]$ cat listener.ora
# listener.ora Network Configuration File: /u01/app/oracle/project/11.2.0/db_home1/oracle/network/admin/listener.ora
# Generated by Oracle configuration tools.LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
)
)SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = orcl_dbn)
(ORACLE_HOME = /u01/app/oracle/project/11.2.0/db_home1/oracle)
(SID_NAME = orcl)
)
)ADR_BASE_LISTENER = /u01/app/oracle/project[oracle@TPRHEL admin]$ tnsname.ora
[oracle@TPRHEL admin]$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/project/11.2.0/db_home1/oracle/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.ORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl.localdomain)
)
)[oracle@TPRHEL admin]$
lsnrctl 监听状态
[oracle@TPRHEL admin]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-OCT-2013 22:15:39Copyright (c) 1991, 2009, Oracle. All rights reserved.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 05-OCT-2013 22:04:39
Uptime 0 days 0 hr. 11 min. 2 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/project/11.2.0/db_home1/oracle/network/admin/listener.ora
Listener Log File /u01/app/oracle/project/diag/tnslsnr/TPRHEL/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "orcl.localdomain" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB.localdomain" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_dbn" has 1 instance(s).
Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@TPRHEL admin]$ lsnrctl serviceLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 05-OCT-2013 22:16:07Copyright (c) 1991, 2009, Oracle. All rights reserved.Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
Services Summary...
Service "orcl.localdomain" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:2 refused:0 state:ready
LOCAL SERVER
Service "orclXDB.localdomain" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Handler(s):
"D000" established:0 refused:0 current:0 max:1022 state:ready
DISPATCHER <machine: TPRHEL, pid: 3088>
(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=65294))
Service "orcl_dbn" has 1 instance(s).
Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...
Handler(s):
"DEDICATED" established:0 refused:0
LOCAL SERVER
The command completed successfully
[oracle@TPRHEL admin]$ 十分感谢..远程连接数据库虚拟机oracle 11g
解决方案 »
- oracle 忘记密码
- oracle 如何给另一数据库的一张表设置权限
- 急:两表关联查询,性能为何如此之差!
- oracle数据导出和导入问题
- 如何查找表1中没有而表二中有的记录
- sql问题,分组查询功能的实现?
- 求求你救救我!!!!!!!~~~~~~~~~
- 刚装的oracle 8 ,进sql*plus提示要的用户名和密码是什么?
- Failed to archive log# 1 seq# 34???
- 开始使用oracle,大家多指教
- 大家好,问个关于连接远程oracle服务器的问题,我的本机没有安装就是一台刚刚装好系统的电脑,我想知道需要配置哪些参数
- 问个小问题,各位在实际项目中,对数据库中数据的状态怎么标识
2013 09:22:49Copyright (c) 1997, 2010, Oracle. All rights reserved.已使用的参数文件:
d:\app\zhongya\product\11.2.0\dbhome_1\network\admin\sqlnet.ora已使用 EZCONNECT 适配器来解析别名
尝试连接 (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST
=127.0.0.1)(PORT=1521)))
OK (0 毫秒)C:\Users\Administrator>tnsping 10.0.0.16TNS Ping Utility for 64-bit Windows: Version 11.2.0.1.0 - Production on 08-10月-
2013 09:23:01Copyright (c) 1997, 2010, Oracle. All rights reserved.已使用的参数文件:
d:\app\zhongya\product\11.2.0\dbhome_1\network\admin\sqlnet.ora已使用 EZCONNECT 适配器来解析别名
尝试连接 (DESCRIPTION=(CONNECT_DATA=(SERVICE_NAME=))(ADDRESS=(PROTOCOL=TCP)(HOST
=10.0.0.16)(PORT=1521