重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2018|回复: 1

Oracle12c环境下的EM配置和使用方法

[复制链接]
发表于 2019-12-24 17:24:14 | 显示全部楼层 |阅读模式
本帖最后由 jiawang 于 2019-12-24 17:38 编辑

Oracle12c环境中,EM不需要单独安装配置了,创建数据库的时候勾选EM express即可。登陆方式也发生了变化,原来的http://localhost:1158/em或者https://localhost:1158/em登陆总是会遇到问题,解决方法需要使用到XDB,需要手动设置端口。

查看监听
[oracle@localhost admin]$ lsnrctl status   
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 24-DEC-2019 17:05:57
Copyright (c) 1991, 2016, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                28-AUG-2018 13:07:15
Uptime                    483 days 3 hr. 58 min. 44 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/product/12.2.0/db_1/network/admin/listener.ora
Listener Log File         /u01/app/diag/tnslsnr/localhost/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=5500))(Presentation=HTTP)(Session=RAW))
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

数据库安装配置好em后,默认端口号为5500;
SQL> select dbms_xdb_config.gethttpsport() from dual;
DBMS_XDB_CONFIG.GETHTTPSPORT()
------------------------------
                          5500


设置em端口:

可以通过以下命令将em端口从5500更改为5502

exec dbms_xdb_config.setHTTPSport();

SQL> EXEC DBMS_XDB_CONFIG.SETHTTPPORT(5502);

PL/SQL procedure successfully completed


查询EM Express的访问端口

SQL> select dbms_xdb_config.gethttpport() from dual;

DBMS_XDB_CONFIG.GETHTTPPORT()

-----------------------------

                         5502

如果你使用的是http协议,则网址格式为:http://localhost:port/em

例如http://192.168.0.140:5502/em,同理如果是https协议,将http改成https即可。


QQ图片20191224155916.png
QQ图片20191224171958.png

浏览器应该使用支持html5的高版本的浏览器,如Google Chrome,低版本IE,Firefox似乎不能连接。

















回复

使用道具 举报

 楼主| 发表于 2019-12-24 18:15:37 | 显示全部楼层
Oracle企业管理器(EM)

1.企业管理器Enterprise Manager Database Control(Oracle 11g)
    emctl status dbconsole
    emctl start dbconsole
    emctl stop dbconsole


    使用浏览器连接到Database Control, 注意打开防火墙端口 ,默认端口是1158。
    https://hostname:port/em


2.企业管理器Enterprise Manager Database Express(Oracle 12c)
    使用EM Express:
    打开em:
    exec dbms_xdb_config.sethttpsport(5500);        -- https
    exec dbms_xdb_config.sethttpport(5502);         -- http


    关闭em:
    exec dbms_xdb_config.sethttpsport(0);           -- https
    exec dbms_xdb_config.sethttpport(0);            -- http


    查看em端口:
    select dbms_xdb_config.gethttpsport from dual;  -- https
    select dbms_xdb_config.gethttpport from dual;   -- http
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-4-19 09:17 , Processed in 0.131129 second(s), 22 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表