oracle em修复之路

很早以前写的文章,再草稿中存放太久了,今天开始整理20年来工作体会,以后陆续发出,希望给大家提供小小的帮助。

去年做的项目使用的oracle数据库,最近要看一下,启动机器进入系统,出现无法加载数据,数据库连接出现问题,经过多方查找,是因为oracle里的用户密码过期问题造成的,我需要重置用户密码,改完后发现em页无法进入了,

先增加虚拟网卡

控制面板 -> 添加硬件,在向导中选择"是,已经连接了此硬件" -> "添加新的硬件设备" -> "安装我手动从列表中选择的硬件" -> "网络适配器" -> "Microsoft Loopback Adapter",添加完成后,到网络连接那里刷新,会发现新建了个"本地连接 2",用的就是这个假的"Microsoft Loopback Adapter"(实际上根本就没有连接这个硬件,只是欺骗一下 Oracle 而已)。把这个本地连接的IP设置一下(例如192.168.0.99),重新让Oracle检测一遍,顺利通过。

emca -config dbcontrol db -repos recreate

创建一个EM资料库

emca -repos create

重建一个EM资料库

emca -repos recreate

删除一个EM资料库

emca -repos drop

配置数据库的 Database Control

emca -config dbcontrol db

删除数据库的 Database Control配置

emca -deconfig dbcontrol db

重新配置db control的端口,默认端口在1158

emca -reconfig ports

emca -reconfig ports -dbcontrol_http_port 1160

emca -reconfig ports -agent_port 3940

先设置ORACLE_SID环境变量后,启动EM console服务

emctl start dbconsole

先设置ORACLE_SID环境变量后,停止EM console服务

emctl stop dbconsole

先设置ORACLE_SID环境变量后,查看EM console服务的状态

emctl status dbconsole

配置dbconsole的步骤

emca -repos create

emca -config dbcontrol db

emctl start dbconsole

重新配置dbconsole的步骤

emca -repos drop

emca -repos create

emca -config dbcontrol db

emctl start dbconsole

相关推荐
xuanjiong6 分钟前
Javaweb项目--Mybatis,导入com.mysql.cj.jdbc.Driver时报错,Cannot resolve class ‘Driver‘
数据库·mysql·mybatis
早安TnT7 分钟前
14.网络钓鱼实战
网络
怀君9 分钟前
Flutter——数据库Drift开发详细教程(一)
数据库·flutter·oracle
liaokailin21 分钟前
Spring AI 实战:第七章、Spring AI Advisor机制之记忆大师
人工智能·spring·oracle
夏子曦22 分钟前
EF Core 中,AsEnumerable 和 AsQueryable 的区别
数据库
试着29 分钟前
【数据库】四种连表查询:内连接,外连接,左连接,右连接
数据库·mysql·oracle
没有感情的一匹码44 分钟前
MongoDB 整合SpringBoot
数据库·spring boot·mongodb
菜鸟分享录1 小时前
使用 Semantic Kernel 快速对接国产大模型实战指南(DeepSeek/Qwen/GLM)
microsoft·.netcore·semantic kernel
简单的话*1 小时前
MySQL连接报错处理:1130-host ... is not allowed to connect to this MySql server
数据库·mysql
_extraordinary_1 小时前
MySQL 复合查询
android·数据库·mysql