ora-12514
2013-06-29 13:40
10 查看
一、问题缘由
1)建立DBA用户jack,但是登陆的时候一直提示:“ora-12541”
2)发现是没有启动监听,于是启动监听再登陆
3)启动之后登陆继续提示监听不清楚当前的请求
二、问题解决
1、检查监听文件$ORACLE_HOME/product/network/admin/listener.ora
2)备份listener.ora文件并添加ocm数据库的监听服务
说明:
红色字体为新添加,注意GLOBAL_DBNAME和SID_NAME是小写的。
3)重启监听服务
[oracle@ocmserver admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-JUN-2013 13:17:08
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /opt/oracle/product/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /opt/oracle/product/network/admin/listener.ora
Log messages written to /opt/oracle/product/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocmserver.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocmserver.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 29-JUN-2013 13:17:08
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/network/admin/listener.ora
Listener Log File /opt/oracle/product/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocmserver.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "ocm" has 1 instance(s).
Instance "ocm", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@ocmserver admin]$
4)启动数据库并用jack登陆
说明:提示用户名密码错误,检查dba_user表发现jack之前实验删除了,重建之。
5)重建用户jack
6)再次用jack登陆后,问题解决
[oracle@ocmserver ~]$ alias |grep j
alias j='sqlplus jack/oracle@ocm'
alias jack='cd /opt/oracle/jack'
[oracle@ocmserver ~]$ j
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Jun 29 13:37:11 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> show user;
USER is "JACK"
SQL>
三、小结
listener.ora问题很明显,每次都懒得去理会。就都是通过sqlplus / as sysdba登陆后,再conn jack/oracle 可以跳转登陆成功,但问题今天算是基本解决。listener.ora文件需要详细的解读和理解,后续加强学习并汇总在此。
1)建立DBA用户jack,但是登陆的时候一直提示:“ora-12541”
[oracle@ocmserver ~]$ sqlplus jack/oracle@ocm SQL*Plus: Release 10.2.0.1.0 - Production on Sat Jun 29 13:05:37 2013 Copyright (c) 1982, 2005, Oracle. All rights reserved. ERROR: ORA-12541: TNS:no listener Enter user-name: [oracle@ocmserver ~]
2)发现是没有启动监听,于是启动监听再登陆
[oracle@ocmserver ~]$lsnrct start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-JUN-2013 13:05:43 Copyright (c) 1991, 2005, Oracle. All rights reserved. Starting /opt/oracle/product/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 10.2.0.1.0 - Production System parameter file is /opt/oracle/product/network/admin/listener.ora Log messages written to /opt/oracle/product/network/log/listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocmserver.com)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocmserver.com)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production Start Date 29-JUN-2013 13:05:43 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /opt/oracle/product/network/admin/listener.ora Listener Log File /opt/oracle/product/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocmserver.com)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0))) Services Summary... Service "PLSExtProc" has 1 instance(s). Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service... The command completed successfully
3)启动之后登陆继续提示监听不清楚当前的请求
[oracle@ocmserver ~]$ sqlplus jack/oracle@ocm SQL*Plus: Release 10.2.0.1.0 - Production on Sat Jun 29 13:05:45 2013 Copyright (c) 1982, 2005, Oracle. All rights reserved. ERROR: ORA-12514: TNS:listener does not currently know of service requested in connect descriptor Enter user-name:
二、问题解决
1、检查监听文件$ORACLE_HOME/product/network/admin/listener.ora
# listener.ora Network Configuration File: /opt/oracle/product/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /opt/oracle/product) (PROGRAM = extproc) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ocmserver.com)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0)) ) )
2)备份listener.ora文件并添加ocm数据库的监听服务
# listener.ora Network Configuration File: /opt/oracle/product/network/admin/listener.ora # Generated by Oracle configuration tools. SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = PLSExtProc) (ORACLE_HOME = /opt/oracle/product) (PROGRAM = extproc) ) (SID_DESC = (GLOBAL_DBNAME = ocm) (ORACLE_HOME = /opt/oracle/product) (SID_NAME = ocm) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ocmserver.com)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0)) ) )
说明:
红色字体为新添加,注意GLOBAL_DBNAME和SID_NAME是小写的。
3)重启监听服务
[oracle@ocmserver admin]$ lsnrctl stop LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-JUN-2013 13:12:56 Copyright (c) 1991, 2005, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))) The command completed successfully [oracle@ocmserver admin]$ ls ls lsattr lsb_release lsdiff lshal lsmod lsnrctl lsnrctl0 lspci lspcmcia lspgpot lss16toppm lsusb [oracle@ocmserver admin]$ lsnrctl start LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-JUN-2013 13:13:14 Copyright (c) 1991, 2005, Oracle. All rights reserved. Starting /opt/oracle/product/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 10.2.0.1.0 - Production System parameter file is /opt/oracle/product/network/admin/listener.ora Log messages written to /opt/oracle/product/network/log/listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocmserver.com)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0))) TNS-01155: Incorrectly specified SID_LIST_LISTENER parameter in LISTENER.ORA NL-00303: syntax error in NV string Listener failed to start. See the error message(s) above... [oracle@ocmserver admin]$
[oracle@ocmserver admin]$ lsnrctl start
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 29-JUN-2013 13:17:08
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Starting /opt/oracle/product/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 10.2.0.1.0 - Production
System parameter file is /opt/oracle/product/network/admin/listener.ora
Log messages written to /opt/oracle/product/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocmserver.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocmserver.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 29-JUN-2013 13:17:08
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/product/network/admin/listener.ora
Listener Log File /opt/oracle/product/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocmserver.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC0)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "ocm" has 1 instance(s).
Instance "ocm", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
[oracle@ocmserver admin]$
4)启动数据库并用jack登陆
SQL> startup ORACLE instance started. Total System Global Area 218103808 bytes Fixed Size 1218604 bytes Variable Size 67110868 bytes Database Buffers 146800640 bytes Redo Buffers 2973696 bytes Database mounted. Database opened. SQL> conn jack/oracle ERROR: ORA-01017: invalid username/password; logon denied Warning: You are no longer connected to ORACLE. SQL>
说明:提示用户名密码错误,检查dba_user表发现jack之前实验删除了,重建之。
5)重建用户jack
SQL> create user jack identified by oracle ; User created. SQL> grant dba to jack; Grant succeeded. SQL> commit; Commit complete. SQL>
6)再次用jack登陆后,问题解决
[oracle@ocmserver ~]$ alias |grep j
alias j='sqlplus jack/oracle@ocm'
alias jack='cd /opt/oracle/jack'
[oracle@ocmserver ~]$ j
SQL*Plus: Release 10.2.0.1.0 - Production on Sat Jun 29 13:37:11 2013
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> show user;
USER is "JACK"
SQL>
三、小结
listener.ora问题很明显,每次都懒得去理会。就都是通过sqlplus / as sysdba登陆后,再conn jack/oracle 可以跳转登陆成功,但问题今天算是基本解决。listener.ora文件需要详细的解读和理解,后续加强学习并汇总在此。
相关文章推荐
- Oracle 解决ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务
- 借鉴自:“ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务 问题解决 ”
- 关于Oracle能报ora-12514的一些想法
- ORA-12514: TNS:listener does not currently know of service问题原因
- ora-12514 tns 监听程序无法识别连接描述符中请求的服务
- ORA-12514 TNS 监听程序当前无法识别连接描述符中请求服务 的解决方法
- ORA-12514 TNS 监听程序当前无法识别连接描述符中请求服务 的解决方法
- 连接Oracle 10g或9i时ORA-12514: TNS: 监听进程不能解析在连接描述符中给出的 SERVICE_NAME 错误的解决
- ORA-12514(TNS:监听程序当前无法识别...)的解决方案
- ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服
- oralce常见异常——ORA-12514: TNS:listener does not currently know of service requested in connect descript
- ORA-12514:TNS:listener does not currently know ...
- Oracle服务启动顺序导致ORA-12514
- Oracle数据库备份导出时,报错:ORA-12514
- ORA-12514 TNS 监听程序当前无法识别连接描述符中请求服务
- 连接Oracle 10g时ORA-12514: TNS: 监听进程不能解析问题的解决
- [解决]ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务
- oracle 数据库 错误 ORA-12514 TNS 监听程序当前无法识别连接描述符中请求服务 解决办法
- ORA-12514 TNS:listener does not currently know of service requested in connect descriptor
- ORA-12514: TNS: 监听程序当前无法识别连接描述符中请求的服务