1. 程式人生 > >Oracle Start listener and Start OEM

Oracle Start listener and Start OEM

Encountered SQL developer- the network adapter could not establish the connection, it is quite simple, the Oracle listener was not start up. Resolved by below command, after startup the listener, can connect through SQL developer with successful result.

Error 1: Oracle SQL Developer error - IO Error: The Network Adapter could not establish the connection.
Error 2: cannot connect through OEM, Oracle Enterprise Manager.

Below are two solutions,

Start listener

[[email protected] admin]$ lsnrctl start

LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 21-12月-2018 20:18:20

Copyright (c) 1991, 2009, Oracle.  All rights reserved.

啟動/u01/app/tom/product/11.2.0/dbhome_1/bin/tnslsnr: 請稍候...

TNSLSNR for Linux: Version 11.2.0.1.0 - Production
系統引數檔案為/u01/app/tom/product/11.2.0/dbhome_1/network/admin/listener.ora
寫入/u01/app/tom/diag/tnslsnr/ocp/listener/alert/log.xml的日誌資訊
監聽: (
DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocp)(PORT=1521))) 正在連線到 (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ocp)(PORT=1521))) LISTENER 的 STATUS ------------------------ 別名 LISTENER 版本 TNSLSNR for Linux: Version 11.2.0.1.0 - Production 啟動日期 21-12月-2018 20:18:20 正常執行時間 0 天 0 小時 0 分 0 秒 跟蹤級別 off 安全性 ON: Local OS Authentication SNMP OFF 監聽程式引數檔案 /u01/app/tom/product/11.2.0/dbhome_1/network/admin/listener.ora 監聽程式日誌檔案 /u01/app/tom/diag/tnslsnr/ocp/listener/alert/log.xml 監聽端點概要..
. (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=ocp)(PORT=1521))) 監聽程式不支援服務 命令執行成功 [[email protected] admin]$

Start OEM, Oracle Enterprise Manager

[[email protected] bin]$ emctl start dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0
Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.
https://ocp:1158/em/console/aboutApplication
Starting Oracle Enterprise Manager 11g Database Control ..... started.
------------------------------------------------------------------
Logs are generated in directory /u01/app/tom/product/11.2.0/dbhome_1/ocp_orcl/sysman/log
[[email protected] bin]$ pwd
/u01/app/tom/product/11.2.0/dbhome_1/bin
[[email protected] bin]$

Use below link to access OEM, Oracle Enterprise Manager
https://192.168.26.130:1158/em/
username / password = sys/oracle, role as sysdba

Below command to check the EM port usage,

[[email protected] ~]$ cd $ORACLE_HOME
[1]+  Exit 255                LANG=zh_CN.utf8 dbca  (wd: ~)
(wd now: /u01/app/tom/product/11.2.0/dbhome_1)
[[email protected] dbhome_1]$ cd install/
[[email protected] install]$ ls
chainedInstall  envVars.properties  make.log  portlist.ini  root_ocp_2018-12-19_21-20-28.log  utl
config          jlib                oratab    readme.txt    unix
[[email protected] install]$ cat portlist.ini
Enterprise Manager Console HTTP 埠 (orcl) = 1158
Enterprise Manager 代理埠 (orcl) = 3938
[[email protected] install]$ pwd
/u01/app/tom/product/11.2.0/dbhome_1/install
[[email protected] install]$

Reference

SQL developer- the network adapter could not establish the connection