2023年8月1日发(作者:)
ORA-12514:TNS:listenerdoesnotcurrentlyknowofs。。。1,登录报错如下:[oracle@oracle_yueworld admin]$ rlwrap sqlplus system/system51@st1SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 3 16:33:26 2015Copyright (c) 1982, 2009, Oracle. All rights :ORA-12514: TNS:listener does not currently know of service requested in connectdescriptor2,查看下lsnrctl状态,看是否是lsnrctl监听的问题[oracle@oracle_yueworld admin]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 03-DEC-2015 17:03:07Copyright (c) 1991, 2009, Oracle. All rights ting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.121.51)(PORT=1521)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.1.0 - ProductionStart Date 03-DEC-2015 17:02:55Uptime 0 days 0 hr. 0 min. 11 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tener Log File /oracle/app/oracle/diag/tnslsnr/oracle_yueworld/listener/alert/tening (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.121.51)(PORT=1521)))The listener supports no servicesThe command completed successfully[oracle@oracle_yueworld admin]$
[oracle@oracle_yueworld admin]$
从中可以看出监听正常,但是The listener supports no services这个貌似是不识别service_name啊3,去查看下参数SQL> show parameter name;NAME TYPE VALUE------------------------------------ ----------- ------------------------------db_file_name_convert string /oracle/app/oracle/oradata/pow erdes, /oracle/app/oracle/orad ata/orcldb_name string orcldb_unique_name string stunqglobal_names boolean FALSEinstance_name string orcllock_name_space stringlog_file_name_convert stringservice_names string stunqSQL>
看到db_name和db_unique_name以及service_names不⼀样4,解决⽅案在⽂件⾥⾯添加SID_LIST_LISTENER,如下所⽰:作⽤:以下红⾊的模块是静态注册监听服务,⽅便客户端远程连接该数据库使⽤[oracle@oracle_yueworld admin]$ more
# Network Configuration File: /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/# Generated by Oracle configuration _LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = stunq) (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/dbhome_1) (SID_NAME = stunq) ) )LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.121.51)(PORT = 1521)) )ADR_BASE_LISTENER = /oracle/app/oracle[oracle@oracle_yueworld admin]$
再重启lsnrctl服务:[oracle@oracle_yueworld admin]$ lsnrctl startLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 03-DEC-2015 18:00:09Copyright (c) 1991, 2009, Oracle. All rights ng /oracle/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: TNSLSNR for Linux: Version 11.2.0.1.0 - ProductionSystem parameter file is /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/ messages written to /oracle/app/oracle/diag/tnslsnr/oracle_yueworld/listener/alert/tening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.121.51)(PORT=1521)))Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.121.51)(PORT=1521)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.1.0 - ProductionStart Date 03-DEC-2015 18:00:09Uptime 0 days 0 hr. 0 min. 0 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tener Log File /oracle/app/oracle/diag/tnslsnr/oracle_yueworld/listener/alert/tening (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.121.51)(PORT=1521)))Service "stunq" has 1 instance(s). Instance "stunq", status UNKNOWN, has 1 handler(s) for The command completed successfully[oracle@oracle_yueworld admin]$
看到The listener supports no services错误已经没有了,可以去试试登录5,再次登录报错[oracle@oracle_yueworld admin]$ rlwrap sqlplus orclk/st141118@st1SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 3 18:03:55 2015Copyright (c) 1982, 2009, Oracle. All rights :ORA-01034: ORACLE not availableORA-27101: shared memory realm does not existLinux-x86_64 Error: 2: No such file or directoryProcess ID: 0Session ID: 0 Serial number: 0Enter user-name:
6,去修改服务端和客户端的配置⽂件google了很多资料,⼤部分都说是配置错误导致listener找不到你要请求的sid。这有两种可能,⼀种是client端的中配置了错误的SID,⼀种是server端的中配置错了SID。仔细检查,然后开始修改服务器 ,将SID_NAME修改成正确的instance_name为orcl[oracle@oracle_yueworld admin]$ more
# Network Configuration File: /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/# Generated by Oracle configuration _LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = stunq) (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/dbhome_1) (SID_NAME = orcl) ) ) #PS: 这⾥⾯的SID_NAME是oracle实例名,GLOBAL_DBNAME是全局的dbname,是db_unique_nameLISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.121.51)(PORT = 1521)) )ADR_BASE_LISTENER = /oracle/app/oracle[oracle@oracle_yueworld admin]$
修改客户端[oracle@oracle_yueworld admin]$ vim
# Network Configuration File: /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/# Generated by Oracle configuration 1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.121.51)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = stunq) ) ) # PS:这⾥的service_name就是可以从执⾏ show parameter name;中显⽰的service_names参数值。7,然后验证登录,成功了,如下所⽰:[oracle@oracle_yueworld admin]$
[oracle@oracle_yueworld admin]$ rlwrap sqlplus orclk/st141118@st1SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 3 19:43:10 2015Copyright (c) 1982, 2009, Oracle. All rights ted to:Oracle Database 11g Release 11.2.0.1.0 - 64bit ProductionSQL>
2023年8月1日发(作者:)
ORA-12514:TNS:listenerdoesnotcurrentlyknowofs。。。1,登录报错如下:[oracle@oracle_yueworld admin]$ rlwrap sqlplus system/system51@st1SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 3 16:33:26 2015Copyright (c) 1982, 2009, Oracle. All rights :ORA-12514: TNS:listener does not currently know of service requested in connectdescriptor2,查看下lsnrctl状态,看是否是lsnrctl监听的问题[oracle@oracle_yueworld admin]$ lsnrctl statusLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 03-DEC-2015 17:03:07Copyright (c) 1991, 2009, Oracle. All rights ting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.121.51)(PORT=1521)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.1.0 - ProductionStart Date 03-DEC-2015 17:02:55Uptime 0 days 0 hr. 0 min. 11 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tener Log File /oracle/app/oracle/diag/tnslsnr/oracle_yueworld/listener/alert/tening (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.121.51)(PORT=1521)))The listener supports no servicesThe command completed successfully[oracle@oracle_yueworld admin]$
[oracle@oracle_yueworld admin]$
从中可以看出监听正常,但是The listener supports no services这个貌似是不识别service_name啊3,去查看下参数SQL> show parameter name;NAME TYPE VALUE------------------------------------ ----------- ------------------------------db_file_name_convert string /oracle/app/oracle/oradata/pow erdes, /oracle/app/oracle/orad ata/orcldb_name string orcldb_unique_name string stunqglobal_names boolean FALSEinstance_name string orcllock_name_space stringlog_file_name_convert stringservice_names string stunqSQL>
看到db_name和db_unique_name以及service_names不⼀样4,解决⽅案在⽂件⾥⾯添加SID_LIST_LISTENER,如下所⽰:作⽤:以下红⾊的模块是静态注册监听服务,⽅便客户端远程连接该数据库使⽤[oracle@oracle_yueworld admin]$ more
# Network Configuration File: /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/# Generated by Oracle configuration _LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = stunq) (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/dbhome_1) (SID_NAME = stunq) ) )LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.121.51)(PORT = 1521)) )ADR_BASE_LISTENER = /oracle/app/oracle[oracle@oracle_yueworld admin]$
再重启lsnrctl服务:[oracle@oracle_yueworld admin]$ lsnrctl startLSNRCTL for Linux: Version 11.2.0.1.0 - Production on 03-DEC-2015 18:00:09Copyright (c) 1991, 2009, Oracle. All rights ng /oracle/app/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: TNSLSNR for Linux: Version 11.2.0.1.0 - ProductionSystem parameter file is /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/ messages written to /oracle/app/oracle/diag/tnslsnr/oracle_yueworld/listener/alert/tening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.121.51)(PORT=1521)))Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.121.51)(PORT=1521)))STATUS of the LISTENER------------------------Alias LISTENERVersion TNSLSNR for Linux: Version 11.2.0.1.0 - ProductionStart Date 03-DEC-2015 18:00:09Uptime 0 days 0 hr. 0 min. 0 secTrace Level offSecurity ON: Local OS AuthenticationSNMP OFFListener Parameter File /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tener Log File /oracle/app/oracle/diag/tnslsnr/oracle_yueworld/listener/alert/tening (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.121.51)(PORT=1521)))Service "stunq" has 1 instance(s). Instance "stunq", status UNKNOWN, has 1 handler(s) for The command completed successfully[oracle@oracle_yueworld admin]$
看到The listener supports no services错误已经没有了,可以去试试登录5,再次登录报错[oracle@oracle_yueworld admin]$ rlwrap sqlplus orclk/st141118@st1SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 3 18:03:55 2015Copyright (c) 1982, 2009, Oracle. All rights :ORA-01034: ORACLE not availableORA-27101: shared memory realm does not existLinux-x86_64 Error: 2: No such file or directoryProcess ID: 0Session ID: 0 Serial number: 0Enter user-name:
6,去修改服务端和客户端的配置⽂件google了很多资料,⼤部分都说是配置错误导致listener找不到你要请求的sid。这有两种可能,⼀种是client端的中配置了错误的SID,⼀种是server端的中配置错了SID。仔细检查,然后开始修改服务器 ,将SID_NAME修改成正确的instance_name为orcl[oracle@oracle_yueworld admin]$ more
# Network Configuration File: /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/# Generated by Oracle configuration _LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = stunq) (ORACLE_HOME = /oracle/app/oracle/product/11.2.0/dbhome_1) (SID_NAME = orcl) ) ) #PS: 这⾥⾯的SID_NAME是oracle实例名,GLOBAL_DBNAME是全局的dbname,是db_unique_nameLISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.121.51)(PORT = 1521)) )ADR_BASE_LISTENER = /oracle/app/oracle[oracle@oracle_yueworld admin]$
修改客户端[oracle@oracle_yueworld admin]$ vim
# Network Configuration File: /oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/# Generated by Oracle configuration 1 = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.121.51)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = stunq) ) ) # PS:这⾥的service_name就是可以从执⾏ show parameter name;中显⽰的service_names参数值。7,然后验证登录,成功了,如下所⽰:[oracle@oracle_yueworld admin]$
[oracle@oracle_yueworld admin]$ rlwrap sqlplus orclk/st141118@st1SQL*Plus: Release 11.2.0.1.0 Production on Thu Dec 3 19:43:10 2015Copyright (c) 1982, 2009, Oracle. All rights ted to:Oracle Database 11g Release 11.2.0.1.0 - 64bit ProductionSQL>
发布评论