MySQL 8 Internal Architecture (内部架构图)

MySQL 8 Internal Architecture (内部架构图)

PostgreSQL 12 : Prepare statement和plan_cache_mode 参数

在SQL的初始解析阶段PostgreSQL和ORACLE rdbms有很多相似之处, 如开始会进行语法、语义的检查,那些元数据存在system表空间(oracle)或 system catalog(PostgreSQL). 然后根据之前预准备的统计信息(可能动态采样),CBO 会为SQL执行生成一个执行计划. 但是在解析完成后ORACLE和PG(以下用PG代替PostgreSQL)会存在一些差异,oracle会把执行计划存储在shared pool(Libaray cache)中对于所有会话可以共享,但是PG存储在program的本地内存中

, , ,

Oracle12c R2注意事项:ORA-12805问题

一套Oracle 12.2.0.1 4-nodes RAC on Linux 环境, 又一个BUG会生成大量的日志信息如下, 之前分享过一个生成大量trace的笔记
Oracle12c R2注意事项: 因BUG生成大量的trace file 包含KRB: (rman module), 这里记录另一个bug.
# db alert log
2019-08-02T16:45:30.696722+08:00
Errors in file /u01/app/oracle/diag/rdbms/anbob/anbob1/trace/anbob1_cjq0_24035.trc:
ORA-12805: parallel query server died unexpectedly

,

Oracle Kernel Layer & ORA-600 Code Info 内部错误分类

Indexes exist for versions 7.2.2 and 8.0.3. Author: Ric […]

利用RMAN增量备份(Incremental Backup)修复standby 环境中的nologging corupted blocks

有时为了提升SQL执行速度或减少redo而使用NOLOGGING选项, 或者在segment 级使用NOLOGGING属性, 将使用最少的信息记录到online redo logfile,但是对于DataGuard环境是基于redo应用,所以这也是在DATAGUARD配置时需要在数据库级启用FORCE_LOGGING原因,如果缺少了日志必要的信息,在RECOVERY介质恢复期间将受影响的块标记为已损坏, 查询V$DATABASE_BLOCK_CORRUPTION.CORRUPTION_TYPE为NOLOGGING

,

How to disable database link in Oracle? (如何禁用数据库dblink )

前几天有人问到是否有办法禁用Oracle database link?是的, 有时出于安全、性能、防止SCN传播等原因需要禁用本地创建DBLINK,同时也希望其它库不要DBLINK访问我们的库, 但是只要给其它人提供了本库的用户、密码、监听端口、服务名连接的信息,即使只有create session的权限,对方也可以dblink 从其它库连到本地数据库…

,

Troubleshooting High “enq: TX – index contention” events during index split?

经常发生在应用程序的并发性很高的表相关联的索引上,索引叶块、枝块争用较高,尤其当应用程序执行许多INSERT和DELETE时,通常会发生这种情况。原因是在向索引插入新行时索引块分裂,事务将必须在模式4下等待TX锁定,直到执行块拆分的会话完成操作为止, 常伴随[gc] buffer busy waits

Oracle Database 环境整改建议应对 Linux TCP SACK PANIC 内核安全高危漏洞 CVE-2019-11477

在 Linux 内核处理 TCP 网络数据的操作中发现了三个相关的安全漏洞。 其最严重的安全漏洞会被远程攻击者利用在运行受影响软件的系统上触发一个内核崩溃,从而影响到系统的可用性。对于安装现在运行oracle 数据库的环境,anbob建议禁用tcp_sack的方式解决SACK问题高危。

SCN compat no change even Auto-RollOver is enable (SCN 兼容级别未改变)

相信近几个月好些DBA一定都被SCN compat(兼容级别)在2019年6月23日自动从1直接跳级到3的问题搞的紧张兮兮, 现在这个特殊日期已经过去几天,不知道是不是觉的风平浪静有些失望, 最近应该都开始检查是否SCN Compat是否已自动变为3, 在auto rollover未禁用的情况下,还是有些情况下SCN compat当前并没有改变,下面列几种情况。

,

Instance Startup Fails With ORA-00205, ORA-15040 After Applying Patch (安装补丁后实例启动失败)

安装PSU或安装one-off patch补丁时,在relink编译oracle执行文件后文件的group ownership属组可能会发生改变,对比可以和oracle 执行文件相同路径下的oracle0文件(上一版oracle的mv)查看。 当oracle用户和oracle执行文件都没有OS ASM属组如asmadmin时,会无法读取ASM disk.
解决方法,手动修改或使用setasmgidwrap 修改;使用srvctl 启动实例,让oracle自动修改…

, , ,

Script: PostgreSQL 实现字符串拆分 split (二)

几年前写过一篇在oracle 使用oracle函数实现的类似java 语言中的split 拆分功能,这篇改用PostgreSQL实现类型的功能。
在PG提供了两个函数用于拆份字符串:
regexp_split_to_array:它根据正则表达式拆分字符串并将其部分返回到数组中。
regexp_split_to_table:它根据正则表达式将字符串拆分为多个部分,并将其部分返回到表的行中。

, ,

PostGreSQL12 源码安装与时区修改 (一)

这篇简单的记录PostGreSQL12 (以下简称PG)Binary packages on RHEL 7.3安装过程,与后期的PG DB 和RHEL7 OS字符集修改。

,

How to create ASM devices with UDEV

Udev is the mechanism used to create and name /dev device nodes corresponding to the devices that are present in the system. Udev uses matching information provided by sysfs with rules provided by the user to dynamically add the required device nodes.

Troubleshooting kernel: EXT4-fs warning (device dm-0): ext4_dx_add_entry: Directory index full!

The following error message is displayed in the database host operating system log of a customer today.

kernel: EXT4-fs warning (device dm-0): ext4_dx_add_entry: Directory index full!

, ,

Troubleshooting ORA-600 [kcrfw_search_blklctn: Dead loop] and more about NSA process

Starting with 11gR1, Oracle Data Guard asynchronous redo transport will read redo directly from the in-memory log buffer, provided that the requested redo blocks still reside in the log buffer, start 11g R2 use NSA backgroup process do that.

, ,

Scripts: Tablespace Report for Oracle 12c Multitenant Database

You can use this SQL script to report tablespace space details in 12c Multitenant database.

Wait Event: buffer deadlock

Buffer Deadlock is very typical wait event and not so much seen in database. But when you are encountering with this mysterious wait then you would see the effect of wait and performance bottleneck of the server.

Troubleshooting sqlplus logon instance slow and Swap usage high even memory is 50% free

A few days ago, I encountered a case, a 11.2.0.4 three-node Oracle RAC database on RHEL 6.6 , when trying to login to the database instance using sqlplus “/ as sysdba” on the third node, It’s very slow, and vmstat show that there is a very large swap in and out, but there is still a lot of memory free space

,

Troubleshooting Out-Of-Memory(OOM) killer db crash when memory exhausted

If kernel can not find memory to allocate when it’s needed, it puts in-use user data pages on the swap-out queue, to be swapped out. If the Virtual Memory (VM) cannot allocate memory and canot swap out in-use memory, the Out-of-memory killer may begin killing current userspace processes.

Oracle12c R2注意事项: Active DataGuard logon fail with ORA-00604& ORA-04024

一套12c R2 4-nodes Oracle RAC on RHEL 7的环境,已安装0417 RU。 该库有一套Phyical DataGard, 同时也是GoldenGate的target端,存在一个replicat 进程同步数据,因为OGG的认证导致ADG hang最终使归档删除失败。

, ,