首页 > 数据库 >测试Kill MMON进程对数据库的影响

测试Kill MMON进程对数据库的影响

时间:2024-01-07 16:02:27浏览次数:25  
标签:14 数据库 0.4 11.2 Oracle Release Kill oracle MMON

文档课题:测试Kill MMON进程对数据库的影响.
数据库:oracle 11.2.0.4
1、异常模拟
[oracle@racogg:~]$ ps -ef | grep mmon | grep -v grep 
oracle    13879      1  0 Jan06 ?        00:00:11 ora_mmon_orcl
[oracle@racogg:~]$ ps -ef | grep ora_smon | grep -v grep 
oracle    13875      1  0 Jan06 ?        00:00:05 ora_smon_orcl
[oracle@racogg:~]$ kill -9 13879
[oracle@racogg:~]$ ps -ef|grep ora_smon
oracle    13875      1  0 Jan06 ?        00:00:05 ora_smon_orcl

说明:如上kill mmon进程后,数据库不会出现down机的异常,但无法自动生成AWR快照.

2、开启MMON进程
说明:kill mmon进程后并不会自动开启,虽然重启数据库能实现重启mmon进程,但在生产环境不太现实.
以下演示在不关闭数据库的情况下重启mmon进程,生产环境需选择在业务空闲时启动restricted模式,然后立即禁用.
2.1、启用restricted模式
[oracle@racogg:~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Jan 7 14:46:06 2024

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

sys@ORCL 2024-01-07 14:46:06> alter system enable restricted session;

System altered.

sys@ORCL 2024-01-07 14:46:23> exit

Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

2.2、启用restricted模式后的影响
[oracle@racogg:~]$ sqlplus sys/[email protected]:1521/orcl as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Jan 7 14:47:25 2024

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:
ORA-12526: TNS:listener: all appropriate instances are in restricted mode


Enter user-name: 

[oracle@racogg:~]$ sqlplus sys/oracle_4U@orcl as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Jan 7 14:48:52 2024

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

ERROR:
ORA-12526: TNS:listener: all appropriate instances are in restricted mode


Enter user-name: 

[oracle@racogg:~]$ ps -ef | grep mmon | grep -v grep
oracle    74927      1  0 14:46 ?        00:00:00 ora_mmon_orcl

小结:如上所示,启用restricted模式后无法通过简易&tnsnames的方式连接数据库,但mmon进程被成功开启.

2.3、关闭restricted模式
[oracle@racogg:~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Jan 7 14:49:10 2024

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

sys@ORCL 2024-01-07 14:49:10> alter system disable restricted session;

System altered.

sys@ORCL 2024-01-07 14:50:11> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

小结:通过本地服务器连接数据库,关闭restricted模式.

2.4、关闭restricted模式后的影响
[oracle@racogg:~]$ sqlplus sys/oracle_4U@orcl as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Jan 7 14:50:20 2024

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

sys@ORCL 2024-01-07 14:50:20> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@racogg:~]$ sqlplus sys/[email protected]:1521/orcl as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sun Jan 7 14:50:25 2024

Copyright (c) 1982, 2013, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

sys@ORCL 2024-01-07 14:50:11> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@racogg:~]$ ps -ef | grep mmon | grep -v grep
oracle    74927      1  0 14:46 ?        00:00:00 ora_mmon_orcl

小结:关闭restricted模式后,简易&tnsnames方式成功连接数据库.

标签:14,数据库,0.4,11.2,Oracle,Release,Kill,oracle,MMON
From: https://blog.51cto.com/u_12991611/9134174

相关文章

  • 求实创新 不断探索 浙江移动基于亚信科技AntDB数据库率先完成CRM系统全域改造
    12日20日,中国信息通信研究院(简称:信通院)和中国通信标准化协会大数据库技术推进委员会(CCSATC601)共同组织的2023年大数据库“星河(Galaxy)”案例评选结果发布。中国移动通信集团浙江有限公司(以下简称:浙江移动)与亚信科技(中国)有限公司(简称:亚信科技)、湖南亚信安慧有限公司公司联合申报的《......
  • 亚信安慧AntDB数据库引领数字时代:数字驱动创新峰会主旨演讲深度解析
    近日,庄严肃穆的数字驱动创新峰会在中国首都北京隆重召开,聚焦于探讨数据经济的创新前沿。在此次盛会中,备受瞩目的亚信安慧AntDB数据库荣幸受邀参与,该数据库的副总裁张桦以其深刻见解和卓越经验发表了引人瞩目的主旨演讲。图1:亚信安慧副总裁张桦发表演讲AntDB数据库一直专注于企业级......
  • N天爆肝数据库——MySQL(1)
    (N天爆肝数据库——MySQL(1))数据库概念理解==数据库DB存储数据的仓库数据库管理系统DBMS操纵和管理数据库的大型软件==SQL操作关系型数据库的编程语言,定义了用一套操作关系型数据库同意标准学习SQL的作用SQL是一门ANSI的标准计算机语言,用来访问和操作数据库系统。SQ......
  • 安装MySQL数据库及QT添加数据库驱动连接使用
    1.下载官方地址MySQLCommunityserver8.2.0innovation:MySQL社区版的服务器软件,目前最新版本是8.2.0SelectVersion:选择你需要下载的版本号SelectOperatingSystem:选择操作系统,支持安装的操作系统如下Windows(x86,64bit),MSIInstaller(MSI=microsoftinstaller):推荐选择W......
  • C++ Qt开发:Charts与数据库组件联动
    Qt是一个跨平台C++图形界面开发库,利用Qt可以快速开发跨平台窗体应用程序,在Qt中我们可以通过拖拽的方式将不同组件放到指定的位置,实现图形化开发极大的方便了开发效率,本章将重点介绍Charts组件与QSql数据库组件的常用方法及灵活运用。在之前的文章中详细介绍了关于QCharts绘图组件......
  • openGauss学习笔记-188 openGauss 数据库运维-常见故障定位案例-core问题定位
    openGauss学习笔记-188openGauss数据库运维-常见故障定位案例-core问题定位188.1磁盘满故障引起的core问题188.1.1问题现象TPCC运行时,注入磁盘满故障,数据库进程gaussdbcore掉,如下图所示。188.1.2原因分析数据库本身机制,在磁盘满时,Xlog日志无法进行写入,通过panic日志退......
  • Spring中全局捕获数据库唯一约束等异常,返回友好提示给用户
    controller中有如下新增数据的代码@ApiOperation(value="add",notes="新增数据")@PostMapping("add")publicAjaxResultadd(@RequestBodyXxxx){returnAjaxResult.success(xxxService.save(x));}如果想实现数据唯一性检验,并提示用户有如下方法方法一:代码逻辑层面......
  • 数据库索引
    一、索引的基本概念数据库索引是一种数据结构,用于快速定位到表中的数据记录。通过创建索引,数据库系统可以快速找到需要的数据,避免全表扫描,从而大大提高查询速度。索引的创建和使用需要占用额外的存储空间,并会影响数据插入、更新和删除操作的性能。因此,索引的使用需要权衡利弊,根据实......
  • Windows平台安装MongoDB数据库
    一、前言MongoDB是一种流行的文档型NoSQL数据库,它具有高性能、高可用、可伸缩性等优点,因此被广泛应用于web应用程序、分布式系统、云计算等领域。MongoDB是一个介于关系数据库和非关系数据库之间的产品,是非关系数据库当中功能最丰富,最像关系数据库的。它支持的数据结构非常松散,是类......
  • Apache Commons Email在邮件发送中的应用
    第1章:简介大家好,我是小黑,今天咱们聊聊ApacheCommonsEmail这个库,它在发送邮件方面可谓是小而美的利器。ApacheCommonsEmail基于JavaMailAPI,但它提供了更简洁、更易用的接口,让咱们在处理电子邮件发送时可以省去不少麻烦。为什么选它呢?首先,它轻量,无需深入研究复杂的JavaMail......