uso solucion solicitado servicios servicio salida reconoce puerto proporcionado para orden ora lsnrctl los interno fallo externo este esta encontró datos código conoce configurar conexión como comando actualmente activo oracle11g redhat

oracle11g - solucion - ora-12514: tns:el listener no conoce actualmente el servicio solicitado en el descriptor de conexión



¿Por qué Oracle listener y el servicio de base de datos no se están ejecutando? (2)

Debería verificar el registro de escucha para más detalles.

Encuentra la ubicación del registro de escucha con:

$ lsnrctl stat LSNRCTL for Linux: Version . . . . . . Listener Log File /home/app/oracle/product/10.2/network/log/listener.log

Estoy empezando a mojarme los pies en Red Hat Linux 7.2 y Oracle 12c. Así que me pasé el último fin de semana dedicado en un intento por ver si podía hacer frente a Oracle 12c en RHEL 7.2. Al final, sí, pude poner Oracle de pie en una máquina virtual RHEL 7.2 pero no sin problemas, muchos de ellos. Pero logré resolverlos de a uno por vez. Arruine mi máquina virtual y comencé todo de nuevo.

Ahora creo que tengo una configuración bastante buena funcionando. Lo único que no entiendo es que cuando reinicio mi caja de Linux, tanto el listner de Oracle como el servicio de base de datos no se inician automáticamente como lo hacen en un sistema Windows Server 2012 R2. Si estos servicios no se están ejecutando, naturalmente no puedo conectarme con Oracle DB. Para solucionarlo, tengo que ejecutar estos dos comandos:

  1. Inicie sesión como el usuario de Oracle

  2. Ejecute lsnrctl start

    Veré un mensaje algo así como: el oyente no admite ningún servicio. Está bien.

  3. Conéctate a la base de datos y ejecuta

    sql> inicio

Después de eso, todo se ejecuta de forma normal. Puedo conectarme a Oracle db desde cualquier cliente de Oracle. Mis preguntas son: ¿Es este el comportamiento normal en una caja de Linux? ¿Me perdí algo durante la instalación de Oracle? Si se supone que estos servicios se inician automáticamente, ¿qué debo hacer para solucionarlo?

Gracias.


Esta solución de error es muy simple, primero, vamos a entender por qué ocurre este error. Básicamente tiene dos razones que son:

1) Su nombre de base de datos y servicio no está configurado correctamente en el entorno de Oracle. Debe ser el mismo en todos los lugares. Compruebe los valores de los parámetros a continuación.

-ORACLE_SID in oracle environment. -SID_NAME in tnsnames.ora file. -SERVICE_NAME in listener.ora file.

2) Falta el nombre de host / dirección IP, error de corrección u ortografía, así que por favor verifique a continuación.

-Check the IP ADDRESS in /etc/hosts file. -It should be same in listener.ora and tnsnames.ora file -And it should be able to ping from the local and remote server.

Ahora veo que también he enfrentado el mismo problema y resuelto:

[oracle@OLE1 Desktop]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 12 22:52:29 2017 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to an idle instance. SQL> startup ORACLE instance started. Total System Global Area 970895360 bytes Fixed Size 1340636 bytes Variable Size 713034532 bytes Database Buffers 251658240 bytes Redo Buffers 4861952 bytes Database mounted. Database opened. SQL> SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@OLE1 Desktop]$ [oracle@OLE1 Desktop]$ lsnrctl LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-JUL-2017 22:54:51 Copyright (c) 1991, 2009, Oracle. All rights reserved. Welcome to LSNRCTL, type "help" for information. LSNRCTL> status Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error: 111: Connection refused Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ole1)(PORT=1521))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Linux Error: 111: Connection refused LSNRCTL> LSNRCTL> start Starting /home/oracle/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 /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Log messages written to /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(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 12-JUL-2017 22:55:43 Uptime 0 days 0 hr. 0 min. 23 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Listener Log File /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(PORT=1521))) The listener supports no services The command completed successfully LSNRCTL> [oracle@OLE1 Desktop]$ [oracle@OLE1 Desktop]$ [oracle@OLE1 Desktop]$ echo $ORACLE_SID orcl [oracle@OLE1 Desktop]$ [oracle@OLE1 admin]$ cat tnsnames.ora # tnsnames.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/tnsnames.ora # Generated by Oracle configuration tools. ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ole1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) [oracle@OLE1 admin]$ [oracle@OLE1 admin]$ cat listener.ora # listener.ora Network Configuration File: /home/oracle/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 = ole1 )(PORT = 1521)) ) ) ADR_BASE_LISTENER = /home/oracle/app/oracle [oracle@OLE1 admin]$ [oracle@OLE1 admin]$ cat /etc/hosts 127.0.0.1 localhost ::1 localhost 192.168.244.128 ole1 [oracle@OLE1 admin]$ [oracle@OLE1 ~]$ tnsping orcl TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 12-JUL-2017 22:57:14 Copyright (c) 1997, 2009, Oracle. All rights reserved. Used parameter files: /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/sqlnet.ora Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ole1)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))) TNS-12541: TNS:no listener [oracle@OLE1 ~]$ [oracle@OLE1 ~]$ lsnrctl LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-JUL-2017 23:01:48 Copyright (c) 1991, 2009, Oracle. All rights reserved. Welcome to LSNRCTL, type "help" for information. LSNRCTL> LSNRCTL> LSNRCTL> reload Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) The command completed successfully LSNRCTL> LSNRCTL> status 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 12-JUL-2017 22:55:43 Uptime 0 days 0 hr. 6 min. 37 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Listener Log File /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(PORT=1521))) The listener supports no services The command completed successfully LSNRCTL> stop Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) The command completed successfully LSNRCTL> start Starting /home/oracle/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 /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Log messages written to /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(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 12-JUL-2017 23:03:10 Uptime 0 days 0 hr. 0 min. 21 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Listener Log File /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(PORT=1521))) The listener supports no services The command completed successfully LSNRCTL> [oracle@OLE1 ~]$ [oracle@OLE1 ~]$ [oracle@OLE1 ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 12 23:04:37 2017 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> select name from v$database; NAME --------- ORCL SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@OLE1 ~]$ [oracle@OLE1 admin]$ cat /etc/hosts 127.0.0.1 localhost ::1 localhost 192.168.244.128 ole1 [oracle@OLE1 admin]$ ping ole1 PING ole1 (192.168.244.128) 56(84) bytes of data. ^C --- ole1 ping statistics --- 14 packets transmitted, 0 received, 100% packet loss, time 13710ms [oracle@OLE1 admin]$

Nota: Ahora aquí encontré que el problema en la configuración de la dirección IP no es un ping, así que hice algunos cambios en el controlador eth1 de mi sistema operativo en la máquina VMware.

[oracle@OLE1 admin]$ ping ole1 PING ole1 (192.168.244.128) 56(84) bytes of data. 64 bytes from ole1 (192.168.244.128): icmp_seq=1 ttl=64 time=0.694 ms 64 bytes from ole1 (192.168.244.128): icmp_seq=2 ttl=64 time=0.187 ms 64 bytes from ole1 (192.168.244.128): icmp_seq=3 ttl=64 time=4.96 ms 64 bytes from ole1 (192.168.244.128): icmp_seq=4 ttl=64 time=0.121 ms 64 bytes from ole1 (192.168.244.128): icmp_seq=5 ttl=64 time=0.082 ms 64 bytes from ole1 (192.168.244.128): icmp_seq=6 ttl=64 time=0.166 ms 64 bytes from ole1 (192.168.244.128): icmp_seq=7 ttl=64 time=0.126 ms ^C --- ole1 ping statistics --- 7 packets transmitted, 7 received, 0% packet loss, time 6996ms rtt min/avg/max/mdev = 0.082/0.905/4.963/1.668 ms [oracle@OLE1 admin]$ [oracle@OLE1 admin]$ [oracle@OLE1 admin]$ lsnrctl LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 12-JUL-2017 23:09:37 Copyright (c) 1991, 2009, Oracle. All rights reserved. Welcome to LSNRCTL, type "help" for information. LSNRCTL> stop Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521))) The command completed successfully LSNRCTL> LSNRCTL> LSNRCTL> start Starting /home/oracle/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 /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Log messages written to /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(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 12-JUL-2017 23:09:45 Uptime 0 days 0 hr. 0 min. 0 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Listener Log File /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(PORT=1521))) The listener supports no services The command completed successfully LSNRCTL> LSNRCTL> LSNRCTL> status 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 12-JUL-2017 23:09:45 Uptime 0 days 0 hr. 2 min. 17 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora Listener Log File /home/oracle/app/oracle/diag/tnslsnr/OLE1/listener/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ole1)(PORT=1521))) Services Summary... Service "orcl" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... Service "orclXDB" has 1 instance(s). Instance "orcl", status READY, has 1 handler(s) for this service... The command completed successfully [oracle@OLE1 admin]$ [oracle@OLE1 admin]$ [oracle@OLE1 admin]$ sqlplus scott/tiger@orcl SQL*Plus: Release 11.2.0.1.0 Production on Thu Jul 13 00:15:48 2017 Copyright (c) 1982, 2009, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SQL> SQL> exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@OLE1 admin]$

Ahora me está yendo bien, espero que ayude.

¡Gracias!