How to Recover Oracle Standby Database Using an Incremental Backup?
Oracle Standby database容灾库有时因为一些原因缺少了Primary database的archivelog未应用而中断同步,如备库归档目录使用率100%,或主库未传输删除了归档等。重新搭建DATAGUARD对于较大的数据库可能是费时费力,通常可以采用增量备份的方式,最近刚好是在处理一个ogg不同步的问题时。
提供综合数据库运维服务与优化方案(不限Oracle MySQL PG GaussDB GoldenDB OceanBase等), 微信/Tel:(+86)134-365-60330
Oracle Standby database容灾库有时因为一些原因缺少了Primary database的archivelog未应用而中断同步,如备库归档目录使用率100%,或主库未传输删除了归档等。重新搭建DATAGUARD对于较大的数据库可能是费时费力,通常可以采用增量备份的方式,最近刚好是在处理一个ogg不同步的问题时。
像v$archived_gap一样有时需要找出一些序列中跳过的数值,如1,2,4,6,10,需要找出3,5,7-9,在数据库中使用SQL可以有多种方法,以下列出几种供参考
在从Oracle Exadata工程系统迁移至非Exadata环境,或配置Data Guard时需特别注意,某些功能属于Exadata专属特性。例如,采用EHCC(Exadata混合列式压缩)的表对象,在备用库查询或使用Data Pump进行迁移过程中,可能会遇到如下错误:
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
昨天遇到一个问题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,这里简单的记录。
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.
enq:CR – block range reuse ckpt 出现该问题时分析等待链通常是前台进程等待CKPT进程在完成checkpoint, 通常是在DBWR进程在争用CPU或I/O 性能时,通常该event会非常短暂,如果该event已经在AWR dbtime中占据了较大占比时,需要引起关注。通常还伴随enq: RO – fast object reuse event, 当时如果做select 在内的DML SQL可能还出现library cache lock,等待ckpt进程。
最近在测试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.”
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.
最近有个datapump跨数据库迁移数据时,提示”ORA-39002: invalid operation”错误, 排除过目录文件权限和语法兼容问题,后来发现是目标库的Timezone Version低于源库的TZ version. 需要升级目标库的TZ VERSION
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.
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.
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.
最近有个客户的表空间使用率使用50%左右就出现了ora-1653,我们知道ora-165N是空间无法扩展,这么多的free空间还无法扩展,其中有可能是存在碎片,也就是数据文件中不连续的”洞”free space, 在申请一个比较大的extents时,无法匹配连续空间而失败, 你是否想过查看数据文件上的段分布?或表空间的碎片情况?或move 哪个对象可以让datafile resize更小?
因为使用dblink需要分配undo段来标示分布式事务,如果在循环中使用dblink并commit,每次会分配新的undo段,同时undo retention如果保留时间较常,那可能会导致undo自动扩展很大(autoextent on ), 或者会出现undo段争用,从未过期的undo段偷窃, 就会影响正常的DML事务
一套MySQL V5.7主从同步(MTS)检查时延时较高,这是mysql的常见现象,如果重启备库时提示err 1236,又是mysql的常见错误, 分析slave上的进程发现 GRANT 在 FLUSH PRIVILEGES 之前获得锁时出现死锁,简单记录这个MySQL 5.7 bug。
就是因为HW的备份软件在备份前需要修改正常库的asm_diskstring 增加它的/dev/cdm*, 挂载它的存储设备到ASMDG, 因为他的软件bug导致期中一块盘处于中间态,磁盘名有,但iscsi未注册,挂载失败立即执行把它自己的ASMDG卸载,alter diskgroup xx dismount,但是这个动作又触发了ORACLE的ASM 自动disconnect 其它未使用diskgroup的预期行为
经典知识库:Oracle 19c避雷经验分享-2022云和恩墨大讲堂 时间: 2022年02月17日 20:00 – 2022年02月17日 21:00 线上直播 回放地址: https://www.modb.pro/event/550 PPT下载 https://www.modb.pro/doc/56350 演讲: 张维照 演讲提纲: 1.19c的版本介绍 2.19c RU与one-off的选择 3.19c的维护注意事项 4.19c一些已知问题案例 适合人群: Oracle数据库技术支持工程师、优化工程师、有oracle升级计划和Oracle运维DBA,以及所有的Oracle技术爱好者
今天在测试一个小功能时发现个人用户密码已过期,当然这时只能去更改密码,改密码时递归更新密码最后更改时间来改变用户状态,此时profile延长过期天数PASSWORD_LIFE_TIME已无法解决, 但是大多数需求是希望是通过改密码的动作清除过期标记又不变原密码,当然这时又受到了user profile中PASSWORD_REUSE_TIME的限制, 你可能已想到了可以使用alter user identifed by VALUES ‘’; 但是这里也有个小细节。
生活看不透,年华算不清,岁月理不出,日子留不住, 2022已经到来,习惯性在春节来临前,小结一下今年收获。
自anbob.com从09年建站以来经历了12个年头,BLOG已经累计了1100余篇,截止2022春节前这一年里新发布近70篇的笔记, 脑子里的cache可以暂时的清空一下。