Bem, apesar de já ter perguntado algumas vezes, vc ** não confirmou ** se estamos falando do OEM 11g DBCONTROL (ie, aquele que já vem junto com o RDBMS) ou do OEM CLOUD CONTROL, mas como vc diz que tá tudo junto na mesma VM, e que é um ambientes de teste/estudos, vou DEDUZIR que estamos falando mesmo do DBCONTROL, que é a situação mais comum nesse tipo de cenário... Isso sendo verdade, antes de responder às suas perguntas, Observo que, já que ao que entendo vc só quer usar o OEM DBCONTROL para exercícios de uso e demonstrações visando a fins acadêmicos/TCC, talvez vc possa, ao invés de instalar e configurar tudo por si só, baixar a imagem de VM prontinha pra isso que a Oracle disponibiliza em http://www.oracle.com/technetwork/community/developer-vm/index.html : aí seria só baixar e instalar o Virtualbox, baixar o arquivo com a imagem da VM, importar ele no Virtualbox e cabou, tá tudo pronto e configurado, pode sair usando.... A única questão é que essa imagem de vM vêm com as versões mais recentes e que estão em Produção (ie, com o database 12c e o OEM 12c) : se o teu orientador e/ou a tua facul exigem 11g, aí não serve.... Colocações feitas,e CASO a opção de usar a VM pronta com OEM 12c não te sirva, as respostas : a. os patches para atualização de database só estão disponíveis pra quem adquiriu algum Contrato de Suporte para algum produto da Oracle - isso é pago á parte, não está Publicamente disponível.... No caso, já que estamos falando do OEM DBCONTROL 11g, como ele tá junto com o RDBMS, em vc aplicando o patchset mais recente pro database o OEM DBCONTROL já vai ser atualizado, também...
b. afora a questão de patches, que pode sim estar influenciando na não-conexão pelo listener, tem algumas configs necessárias que vc não mostra, então vou REFRASEAR o que disse antes, quando falei que provavelmente vc estava fazendo tudo certo : antes de vc partir pra opção de patching, vamos discutir algumas questões de config aonde vc pode estar errando.... Além da questão de que o LISTENER ** tem ** que ser iniciado com o nome correto (ou sem nome se for usado o nome-default de LISTENER, que é o seu caso pelo que vejo), é ABSOLUTAMENTE necessário que o database esteja REGISTRADO no Listener ** E ** que haja a entrada correspondente no TNSNAMES.ORA, para que vc consiga fazer uma conexão via listener, que é o que o OEM faz... Do começo : 1. tenho as variáveis Oracle setadas no ambiente (ie, ORACLE_HOME e ORACLE_SID apontando para o HOME e SID corretos, e $ORACLE_HOME/bin incluída no PATH), e estou conectado como o usuário Linux que instalou e executa o RDBMS : [oracle@localhost dbhome_2]$ echo $ORACLE_HOME /home/oracle/app/oracle/product/11.2.0/dbhome_2 [oracle@localhost dbhome_2]$ echo $ORACLE_SID orcl [oracle@localhost dbhome_2]$ echo $PATH /usr/java/latest/bin:/usr/java/latest/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/oracle/app/oracle/product/11.2.0/dbhome_2/bin:/home/oracle/bin:/home/oracle/app/oracle/product/11.2.0/dbhome_2/bin:........ [oracle@localhost dbhome_2]$ [oracle@localhost dbhome_2]$ whoami oracle [oracle@localhost dbhome_2]$ 2. confirme que o banco está Ativo, checando os processos dele E conectando localmente, sem acesso ao listener, e aproveite para confirmar que o parâmetro de listener local e o de services estão corretos (em tese se tudo está default isso não precisaria, mas faça por uma questão de seguir o procedimento) : [oracle@localhost ~]$ ps -ef | grep -i pmon oracle 2674 1 0 09:08 ? 00:00:00 ora_pmon_orcl oracle 7557 3423 0 09:33 pts/1 00:00:00 grep -i pmon [oracle@localhost ~]$ [oracle@localhost dbhome_2]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.2.0 Production Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SYS:AS SYSDBA@orcl:SQL>show parameter listener NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ listener_networks string local_listener string LISTENER_ORCL remote_listener string SYS:AS SYSDBA@orcl:SQL>show parameter service NAME TYPE VALUE ------------------------------------ ----------- ------------------------------ service_names string orcl SYS:AS SYSDBA@orcl:SQL> SYS:AS SYSDBA@orcl:SQL>exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@localhost dbhome_2]$ 3. veja que vc não tem um arquivo sqlnet.ora eventualmente indicando um Domínio de rede ( como é ambiente local apenas, vamos ficar sem ele) : [oracle@localhost dbhome_2]$ ls -l $ORACLE_HOME/network/admin total 20 -rw-rw-r-- 1 oracle oracle 855 Aug 10 16:03 listener.ora drwxr-xr-x 2 oracle oracle 4096 Oct 2 2010 samples -rw-r--r-- 1 oracle oracle 187 May 9 2007 shrept.lst -rw-rw-r-- 1 oracle oracle 961 Dec 12 2012 tnsnames.ora [oracle@localhost dbhome_2]$ 4. no listener.ora está o nome do listener E opcionalmente vc pode ter indicado o SID a ser registrado (iirc no oem dbcontrol 11g já não é necessário o registro por SID, no meu caso orcl, mas não faz mal ter, então veja lá): [oracle@localhost ~]$ cat $ORACLE_HOME/network/admin/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 = TCP)(HOST = localhost.localdomain)(PORT = 1521)) ) (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 80)) (PROTOCOL_STACK = (PRESENTATION = HTTP) (SESSION = RAW) ) ) (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 21)) (PROTOCOL_STACK = (PRESENTATION = FTP) (SESSION = RAW)) ) ) ADR_BASE_LISTENER = /home/oracle/app/oracle SID_LIST_LISTENER= (SID_LIST= (SID_DESC= (ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2) (SID_NAME=orcl) ) ) [oracle@localhost ~]$ 5. É ** crítico ** que vc tenha uma entrada no TNSNAMES.ORA para a string do listener (vc até poderia colocar o caminho todo de conexão no parâmetro LOCAL_LISTENER, mas acho mais fácil se ter a entrada mesmo) E ter uma entrada para o serviço indicado no banco - friso aqui que no meu caso o service_name tá idêntico ao SID do banco, mas isso *** NÃO É OBRIGATÓRIO *** , vc tranquilamente poderia ter configurado diferente : [oracle@localhost dbhome_2]$ cat $ORACLE_HOME/network/admin/tnsnames.ora # tnsnames.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/tnsnames.ora # Generated by Oracle configuration tools. LISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521)) ORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) [oracle@localhost dbhome_2]$ 6. config de banco, de listener e TNSNAMES ok, agora o database ** TEM ** que se registrar no listener quando ele for ativo : como eu estava com listener ativo, vou parar e startar de novo, só para vc ver que ele se registra sim , e vou aproveitar para parar o oem dbcontrol também : [oracle@localhost dbhome_2]$ emctl stop dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. https://localhost.localdomain:1158/em/console/aboutApplication Stopping Oracle Enterprise Manager 11g Database Control ... ... Stopped. [oracle@localhost dbhome_2]$ lsnrctl stop LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 11-AUG-2015 09:40:20 Copyright (c) 1991, 2010, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521))) The command completed successfully [oracle@localhost dbhome_2]$ 7. não tenho mesmo NENHUM outro listener : [oracle@localhost dbhome_2]$ ps -ef | grep -i tns oracle 8376 6145 0 09:55 pts/2 00:00:00 grep -i tns [oracle@localhost dbhome_2]$ 8. starto o listener, veja que o banco **** NÂO *** É REGISTRADO imediatamente : [oracle@localhost dbhome_2]$ lsnrctl start LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 11-AUG-2015 09:48:47 Copyright (c) 1991, 2010, Oracle. All rights reserved. Starting /home/oracle/app/oracle/product/11.2.0/dbhome_2/bin/tnslsnr: please wait... TNSLSNR for Linux: Version 11.2.0.2.0 - Production System parameter file is /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora Log messages written to /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/log/listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=80))(PROTOCOL_STACK=(PRESENTATION=HTTP)(SESSION=RAW))) Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=21))(PROTOCOL_STACK=(PRESENTATION=FTP)(SESSION=RAW))) Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production Start Date 11-AUG-2015 09:48:47 Uptime 0 days 0 hr. 0 min. 1 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora Listener Log File /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=80))(PROTOCOL_STACK=(PRESENTATION=HTTP)(SESSION=RAW))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=21))(PROTOCOL_STACK=(PRESENTATION=FTP)(SESSION=RAW))) The listener supports no services The command completed successfully [oracle@localhost dbhome_2]$ ps -ef | grep -i tns oracle 8340 1 0 09:48 ? 00:00:00 /home/oracle/app/oracle/product/11.2.0/dbhome_2/bin/tnslsnr LISTENER -inherit oracle 8376 6145 0 09:55 pts/2 00:00:00 grep -i tns [oracle@localhost dbhome_2]$ ====>> PORÉM, alguns minutinhos depois, o database se registrou SIM no listener indicado : [oracle@localhost dbhome_2]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 11-AUG-2015 09:48:56 Copyright (c) 1991, 2010, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production Start Date 11-AUG-2015 09:48:47 Uptime 0 days 0 hr. 0 min. 9 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora Listener Log File /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=80))(PROTOCOL_STACK=(PRESENTATION=HTTP)(SESSION=RAW))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=21))(PROTOCOL_STACK=(PRESENTATION=FTP)(SESSION=RAW))) The listener supports no services The command completed successfully [oracle@localhost dbhome_2]$ lsnrctl service LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 11-AUG-2015 09:49:02 Copyright (c) 1991, 2010, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521))) The listener supports no services The command completed successfully [oracle@localhost dbhome_2]$ [oracle@localhost dbhome_2]$ lsnrctl status LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 11-AUG-2015 09:53:17 Copyright (c) 1991, 2010, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521))) STATUS of the LISTENER ------------------------ Alias LISTENER Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production Start Date 11-AUG-2015 09:48:47 Uptime 0 days 0 hr. 4 min. 30 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/admin/listener.ora Listener Log File /home/oracle/app/oracle/product/11.2.0/dbhome_2/network/log/listener.log Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=80))(PROTOCOL_STACK=(PRESENTATION=HTTP)(SESSION=RAW))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=21))(PROTOCOL_STACK=(PRESENTATION=FTP)(SESSION=RAW))) Services Summary... Service "ORCL" has 1 instance(s). Instance "ORCL", status READY, has 2 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@localhost dbhome_2]$ lsnrctl service LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 11-AUG-2015 09:53:23 Copyright (c) 1991, 2010, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521))) Services Summary... Service "ORCL" has 1 instance(s). Instance "ORCL", status READY, has 2 handler(s) for this service... Handler(s): "N000" established:0 refused:0 current:0 max:20000 state:ready CMON <machine: localhost.localdomain, pid: 2752> (ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=45200)) "DEDICATED" established:0 refused:0 state:ready LOCAL SERVER Service "orclXDB" 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: localhost.localdomain, pid: 2706> (ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=62397)) The command completed successfully [oracle@localhost dbhome_2]$ 9. aí sim , a conexão por host string ** TEM ** que ser possível... Como citei acima, no meu TNSNAMES tenha uma entrada com uma hos string orcl, então é essa que testo com tnsping e uso pra conectar : [oracle@localhost dbhome_2]$ tnsping orcl TNS Ping Utility for Linux: Version 11.2.0.2.0 - Production on 11-AUG-2015 10:02:10 Copyright (c) 1997, 2010, Oracle. All rights reserved. Used parameter files: Used TNSNAMES adapter to resolve the alias Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 0.0.0.0)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl))) OK (0 msec) [oracle@localhost dbhome_2]$ sqlplus sys/oracle@orcl as sysdba SQL*Plus: Release 11.2.0.2.0 Production on Tue Aug 11 10:02:23 2015 Copyright (c) 1982, 2010, Oracle. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options SYS:AS SYSDBA@orcl:SQL>exit Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [oracle@localhost dbhome_2]$ ==> é Isso aí.... Quando vc chegar no mesmo Resultado, o start do oem dbcontrol deve ir normalzinho, qquer coisa diferente que vc encontrar eu colocaria na conta de config errada, e diria pra vc refazer a config do dbcontorl, cfrme http://www.oracle-wiki.net/premium:startdocshowtoinstalldeinstalldbconsole#toc4 : no meu caso tá tudo ok : [oracle@localhost dbhome_2]$ emctl start dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. https://localhost.localdomain:1158/em/console/aboutApplication Starting Oracle Enterprise Manager 11g Database Control ...................... started. ------------------------------------------------------------------ Logs are generated in directory /home/oracle/app/oracle/product/11.2.0/dbhome_2/localhost.localdomain_orcl/sysman/log [oracle@localhost dbhome_2]$ emctl status dbconsole Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0 Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved. https://localhost.localdomain:1158/em/console/aboutApplication Oracle Enterprise Manager 11g is running. ------------------------------------------------------------------ Logs are generated in directory /home/oracle/app/oracle/product/11.2.0/dbhome_2/localhost.localdomain_orcl/sysman/log [oracle@localhost dbhome_2]$ ==> ùltimo ponto, veja que no arquivo de config do OEM dbcontrol 11g a entrada indicando o caminho até o banco de repositório (o mesmo banco monitorado, no caso do oem dbcontrol, que é mono-database, só serve para monitorar/controlar um database só) está de acordo com a entrada no TNSNAMES.ORA : [oracle@localhost dbhome_2]$ cat /home/oracle/app/oracle/product/11.2.0/dbhome_2/localhost.localdomain_orcl/sysman/config/emoms.properties # oracle.sysman.emSDK.svlt.ConsoleServerName=localhost.localdomain\:1158_Management_Service ... oracle.sysman.db.isqlplusWebDBAUrl=http\://localhost.localdomain\:/isqlplus/dba/dynamic oracle.sysman.emSDK.svlt.ConsoleServerHost=localhost.localdomain oracle.sysman.eml.mntr.emdRepDBID=1229390655 oracle.sysman.emSDK.svlt.ConsoleServerHTTPSPort=1158 em_email_gateway=%EM_EMAIL_GATEWAY% oracle.sysman.eml.mntr.emdRepServer=localhost.localdomain oracle.sysman.eml.mntr.emdRepSID=orcl oracle.sysman.eml.mntr.emdRepConnectDescriptor=(DESCRIPTION\=(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=TCP)(HOST\=0.0.0.0)(PORT\=1521)))(CONNECT_DATA\=(SERVICE_NAME\=orcl))) oracle.sysman.emSDK.sec.ReuseLogonPassword=true oracle.sysman.emkeyfile=/home/oracle/app/oracle/product/11.2.0/dbhome_2/localhost.localdomain_orcl/sysman/config/emkey.ora em.ip.ui.enable=true oracle.sysman.eml.mntr.emdRepUser=SYSMAN oracle.sysman.emSDK.svlt.PublicServletEnabled=true [oracle@localhost dbhome_2]$ []s Chiappa