Goldengate extract from Oracle ADG standby side ALO and ADG mode

Yes, you can extract the data from a Physical Standby database. There are actually two methods available in Oracle GoldenGate.,

1. Archived Log Only Mode – ALO Mode
2. Active Data Guard Mode – ADG Mode

,

Troubleshooting RMAN backup hang waiting for Autobackup, DB alert log ORA-00230

昨天遇到一个问题oracle 19c(19.10), 最近一段时间的RMAN备份任务都失败了,错误中有ORA-00230: operation disallowed: snapshot control file enqueue unavailable, 看着是cf的enqueue请求失败。 处理起来比较简单,找到blocker session就可以解决了, 之前的《Troubleshooting performance event ‘enq: CF – contention’》记录过一些分析方法,本次的案例当前还没有匹配的已知bug,这里简单的记录。

,

How to find full table scan SQL in Oracle,MySQL,Postgresql ?(数据库比较系列五)

Queries that do “full table scan” are the ones that don’t use indexes. However, it is more suitable to use a full table scan for small tables, and it will not cause performance problems. Or when the data on the large table is seriously skewed and a large proportion of data records need to be returned, a full table scan will also be better than an index scan.

Troubleshooting performance event ‘enq:CR – block range reuse ckpt’

enq:CR – block range reuse ckpt 出现该问题时分析等待链通常是前台进程等待CKPT进程在完成checkpoint, 通常是在DBWR进程在争用CPU或I/O 性能时,通常该event会非常短暂,如果该event已经在AWR dbtime中占据了较大占比时,需要引起关注。

Oracle、MySQL、PostGreSQL数据库比较系列(四): 可更新VIEW

最近在测试Oracle语法其它数据库的兼容性时,发现postgreq上对于TABLE上创建的简单view操作时还有个Oracle没有的东西:rule, 在openguass 2.1当通过view 做insert操作时会提示下面的错误,但是在postgreSQL 13.2和MoGdb2.1(支持updatable view)上并未报错:
“You need an unconditional ON INSERT DO INSTEAD rule or an INSTEAD OF INSERT trigger.”

WARNING OGG-06439 when table have “enable novalidate” Primary KEY

If a table has a PK constraint or a Unique Constraint that is Non-Validated or Invalid, OGG will by default not use those keys to uniquely identify a row. It will use all columns to uniquely identify a row.

Troubleshooting ORA-39002: invalid operation during datapump TZ version Difference

最近有个datapump跨数据库迁移数据时,提示”ORA-39002: invalid operation”错误, 排除过目录文件权限和语法兼容问题,后来发现是目标库的Timezone Version低于源库的TZ version. 需要升级目标库的TZ VERSION

How to config Keepalived VIP Auto Failover for MySQL?

MySQL master slave replication doesn’t provide any solution in case of master failure, in that scenarios we have to manually do the configuration changes to make the next available server as master. Use keepalived to configure VIP, the application uses VIP to connect to the database, when the node is unavailable, the VIP automatically switches to other nodes.

How to start MySQL slave/replica skip missing binlogs?

Got fatal error 1236 from master when reading data from binary log: ‘Could not find first log file name in binary log index file’

Sometimes our MySQL master-slave environment has not been used for a long time,slave server is stopped for some reason for a few hours/days, and the master binlog has been automatically deleted. when you resume replication on the slave it fails with above error, and I don’t care about the loss of transactions between them in my test DB. Of course, the production environment may need to rebuild the slave database.

How to reset root password if forgotten in MySQL 5.7?

The MySQL root password is often used in practical applications. If you accidentally lose the root password, you can recover the MySQL root password through the methods in this article.

Scripts: 查找Oracle数据文件碎片和extents分布

最近有个客户的表空间使用率使用50%左右就出现了ora-1653,我们知道ora-165N是空间无法扩展,这么多的free空间还无法扩展,其中有可能是存在碎片,也就是数据文件中不连续的”洞”free space, 在申请一个比较大的extents时,无法匹配连续空间而失败, 你是否想过查看数据文件上的段分布?或表空间的碎片情况?或move 哪个对象可以让datafile resize更小?

Troubleshooting large amount of undo/redo generated due to dblink usage

因为使用dblink需要分配undo段来标示分布式事务,如果在循环中使用dblink并commit,每次会分配新的undo段,同时undo retention如果保留时间较常,那可能会导致undo自动扩展很大(autoextent on ), 或者会出现undo段争用,从未过期的undo段偷窃, 就会影响正常的DML事务

,

MySQL 5.7同步延迟案例1: FLUSH PRIVILEGES死锁

一套MySQL V5.7主从同步(MTS)检查时延时较高,这是mysql的常见现象,如果重启备库时提示err 1236,又是mysql的常见错误, 分析slave上的进程发现 GRANT 在 FLUSH PRIVILEGES 之前获得锁时出现死锁,简单记录这个MySQL 5.7 bug。

,

Troubleshooting DB hang, v$asm_diskgroup query hang due to ASM I/O hang案例

就是因为HW的备份软件在备份前需要修改正常库的asm_diskstring 增加它的/dev/cdm*, 挂载它的存储设备到ASMDG, 因为他的软件bug导致期中一块盘处于中间态,磁盘名有,但iscsi未注册,挂载失败立即执行把它自己的ASMDG卸载,alter diskgroup xx dismount,但是这个动作又触发了ORACLE的ASM 自动disconnect 其它未使用diskgroup的预期行为

, ,

Event# 恩墨大讲堂2022 《Oracle 19c避雷经验分享》

经典知识库:Oracle 19c避雷经验分享-2022云和恩墨大讲堂 时间: 2022年02月17日 20:0 […]

ORA-28007: the password cannot be reused 如何破

今天在测试一个小功能时发现个人用户密码已过期,当然这时只能去更改密码,改密码时递归更新密码最后更改时间来改变用户状态,此时profile延长过期天数PASSWORD_LIFE_TIME已无法解决, 但是大多数需求是希望是通过改密码的动作清除过期标记又不变原密码,当然这时又受到了user profile中PASSWORD_REUSE_TIME的限制, 你可能已想到了可以使用alter user identifed by VALUES ‘’; 但是这里也有个小细节。

,

2021年终总结

生活看不透,年华算不清,岁月理不出,日子留不住, 2022已经到来,习惯性在春节来临前,小结一下今年收获。

自anbob.com从09年建站以来经历了12个年头,BLOG已经累计了1100余篇,截止2022春节前这一年里新发布近70篇的笔记, 脑子里的cache可以暂时的清空一下。

工具: Autonomous Health Framework – TFA

Trace File Analyzer(TFA) 是oracle用于分析和收集日志的程序,可以安装在独立或集群节点的数据库节点上。从Oracle12.2开始,这个工具包含在 RDBMS 软件中,当我们运行 root.sh 脚本时,这也是可选的,如果不需要,我们仍然可以跳过它,从19c开始Oracle将ORAchk,EXAchk,TFA等多个诊断工具合并入Autonomous Health Framework(AHF),作为一个独立的安装软件,也被集成到了RAC安装介质中,AHF可以使用root或者非root用户安装,但是用root可以收集更全的日志

, ,

Troubleshooting wait event ‘free buffer waits’

Server processes 扫描 LRU 列表以获取free buffers (例如,在从磁盘读取块时,或为 CR 克隆缓冲区等时)。在将其扫描到阈值级别后,如果Server processes找不到free buffers,它会请求 DBWR 将 LRU 列表中的脏缓冲区写入磁盘,或a pinned buffer is freed。当 DBWR 写入脏缓冲区/释放固定缓冲区时,会话等待 ‘free buffer waits’。

Oracle、MySQL、PostGreSQL、SQL Server数据库比较系列(三): VARCHAR与VARCHAR2

Oracle 数据库中的 varchar 和 varchar2 数据类型都用于存储字母数字值的动态长度。但它们之间存在一些差异。varchar 数据类型是适用于所有关系数据库产品(Oracle、MySQL、PostgreSQL 和等)的 ANSI 标准数据类型,存储长度不同数据库差异较大。而 varchar2 数据类型是 Oracle 标准数据类型。VARCHAR是Varchar2的同义词,当我们创建 varchar 数据类型时,Oracle 服务器会在内部自动将 varchar 数据类型转换为 varchar2 数据类型。而部分国产库是VARCHAR2是VARCHAR的同义词。