标签云
asm恢复 bbed bootstrap$ dul kcbzib_kcrsds_1 kccpb_sanity_check_2 kcratr_nab_less_than_odr MySQL恢复 obet ORA-00312 ORA-00704 ORA-00742 ORA-01110 ORA-01200 ORA-01555 ORA-01578 ORA-01595 ORA-600 2662 ORA-600 2663 ORA-600 3020 ORA-600 4000 ORA-600 4137 ORA-600 4193 ORA-600 4194 ORA-600 16703 ORA-600 kcbzib_kcrsds_1 ORA-600 KCLCHKBLK_4 ORA-600 kcratr_nab_less_than_odr ORA-15042 ORA-15196 ORACLE 12C oracle dul ORACLE PATCH Oracle Recovery Tools oracle加密恢复 oracle勒索 oracle勒索恢复 oracle异常恢复 ORACLE恢复 Oracle 恢复 ORACLE数据库恢复 oracle碎片 OSD-04016 YOUR FILES ARE ENCRYPTED 比特币加密文章分类
- MongoDB (1)
- MongoDB恢复 (1)
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (112)
- 数据库 (1,882)
- DB2 (22)
- MySQL (82)
- Oracle (1,707)
- Data Guard (53)
- EXADATA (8)
- GoldenGate (24)
- ORA-xxxxx (168)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (15)
- ORACLE 21C (3)
- Oracle 23ai (8)
- Oracle ASM (72)
- Oracle Bug (8)
- Oracle RAC (56)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (29)
- Oracle备份恢复 (661)
- Oracle安装升级 (108)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (91)
- PostgreSQL (37)
- pdu工具 (7)
- PostgreSQL恢复 (13)
- SQL Server (34)
- SQL Server恢复 (14)
- TimesTen (7)
- 达梦数据库 (5)
- 达梦恢复 (3)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (51)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (34)
- MongoDB (1)
-
最近发表
- 断电引起ORA-600 3005故障处理
- 记录一次云存储资源到期之后引起的数据库恢复
- Firebird 损坏数据库数据抢救工具—firebirdext
- Oracle 19c 202610补丁(RUs+OJVM)-19.33
- 由于con$.con#值达到极限,触发数据库增加约束报ORA-600 12807错误
- MongoDB 离线提取工具—mongoext
- .bres勒索病毒加密数据库dmp文件可恢复
- ORA-600 krsm_mrp_rebuild_lf_list.lno_mismatch
- 记录一次0丢失的ORA-00354: 损坏重做日志块标头故障恢复
- 不当数据库恢复操作导致一个月数据丢失
- obet快速修复oracle 位图损坏块
- 不太常见的10.2.0.1的oracle redo损坏恢复
- obet forcecopy功能抢救硬件故障中的数据文件
- kcratr_nab_less_than_odr和system坏块故障处理
- 通过obet 恢复system坏块,打开数据库
- obet dbv功能完整说明
- 分享一例运行在aix上的sap系统数据库恢复过程
- OBET-Oracle Block Editor Tool使用说明
- 几乎动用了所有手段的Oracle故障恢复
- Oracle Block Edit Tool (obet) 功能增强–2026.07
分类目录归档:数据库
aix磁盘损坏oracle数据库恢复
客户aix环境硬盘异常导致系统无法启动,初步判断是数据文件存放在本地磁盘的空间中(本地两个盘都异常,系统无法启动),通过硬件恢复厂商镜像出来,但是通过aix文件系统直接挂载提示需要fsck,但是做fsck之后,提示大量文件丢失(最关键的数据文件和备份文件都被自动删除)


基于这种情况,采用镜像主机挂载的方式肯定不行,考虑直接采用软件直接解析,能够看到软件,可惜由于大量的文件系统元数据损坏,解析出来的数据文件和dmp也不可用(大量损坏和空块)

基于上述情况,只能采用碎片级别恢复出来数据文件

然后使用dul工具把数据恢复到表中,实现最大限度抢救客户数据

对于数据库级别恢复,这个是理论上的终极恢复方法
pg误删除数据恢复(PostgreSQL delete数据恢复)
应用维护人员通过应用程序误删除了一些数据,希望对其进行恢复.通过咨询确认是PostgreSQL数据,wal和arch文件都在,取客户删除数据时间点相关wal文件

然后让客户提供具体涉及误删除的相关的库和表信息

通过工具解析wal日志,比较顺利的获取到了undo sql语句
Switch wal to 0000000300000525000000B0 on time 2025-03-05 22:23:14.263661+08 Switch wal to 0000000300000525000000B1 on time 2025-03-05 22:23:14.423082+08 Switch wal to 0000000300000525000000B2 on time 2025-03-05 22:23:15.983833+08 Switch wal to 0000000300000525000000B3 on time 2025-03-05 22:23:17.802107+08 Switch wal to 0000000300000525000000B4 on time 2025-03-05 22:23:18.942125+08 Switch wal to 0000000300000525000000B5 on time 2025-03-05 22:23:20.293585+08 Switch wal to 0000000300000525000000B6 on time 2025-03-05 22:23:21.531484+08 Switch wal to 0000000300000525000000B7 on time 2025-03-05 22:23:24.217501+08 Switch wal to 0000000300000525000000B8 on time 2025-03-05 22:23:27.504164+08 Switch wal to 0000000300000525000000B9 on time 2025-03-05 22:23:29.260754+08 Switch wal to 0000000300000525000000BA on time 2025-03-05 22:23:33.544486+08 Switch wal to 0000000300000525000000BB on time 2025-03-05 22:23:35.568116+08 Switch wal to 0000000300000525000000BC on time 2025-03-05 22:23:37.329659+08 Switch wal to 0000000300000525000000BD on time 2025-03-05 22:23:38.971834+08 Switch wal to 0000000300000525000000BE on time 2025-03-05 22:23:39.922353+08 Switch wal to 0000000300000525000000BF on time 2025-03-05 22:23:40.897294+08

然后把这些sql语句反向插入到生产库,完成这些误操作数据的恢复

如果此类的数据库(oracle,mysql,sql server,PostgreSQL)等恢复请求,需要专业恢复技术支持,请联系我们:
电话/微信:17813235971 Q Q:107644445
E-Mail:dba@xifenfei.com
发表在 PostgreSQL恢复
评论关闭
PostgreSQL表文件损坏恢复—pdu恢复损坏的表文件
在某些情况下,由于PostgreSQL表文件损坏导致无法正常访问,可以通过pdu把好的block中的数据恢复出来
准备一张测试表,里面有97条记录
his5_dms=# \d hiscrm.t_sys_oper_log;
Table "hiscrm.t_sys_oper_log"
Column | Type | Collation | Nullable |Default
--------------------+------------------------+-----------+----------+------------
id | bigint | | not null |
module | character varying(50) | | |
title | character varying(50) | | |
alias | character varying(50) | | |
business_type | integer | | | 0
method | character varying(200) | | |
request_method | character varying(10) | | |
operator_type | integer | | | 0
oper_name | character varying(50) | | |
dept_name | character varying(50) | | |
oper_url | character varying(255) | | |
oper_ip | character varying(50) | | |
oper_location | character varying(255) | | |
oper_param | text | | |
json_result | text | | |
status | integer | | | 0
error_msg | text | | |
oper_time | date | | |
create_id | bigint | | |
create_time | bigint | | |
clinic_id | bigint | | |
group_id | bigint | | |
patient_id | bigint | | |
is_patient_related | integer | | |
business_content | json | | |
his5_dms=# select count(1) from hiscrm.t_sys_oper_log;
count
-------
97
(1 row)
查询表对应的具体文件
his5_dms=# SELECT oid,relfilenode FROM pg_class WHERE relname='t_sys_oper_log';
oid | relfilenode
-------+-------------
16850 | 16850
(1 row)
his5_dms=# SELECT pg_relation_filepath('hiscrm.t_sys_oper_log');
pg_relation_filepath
----------------------
base/16386/16850
(1 row)
his5_dms=# SHOW data_directory;
data_directory
------------------------
/var/lib/pgsql/12/data
(1 row)
使用dd对文件进行破坏
[postgres@xifenfeidg ~]$ ls -l /var/lib/pgsql/12/data/base/16386/16850 -rw-------. 1 postgres postgres 90112 Sep 5 20:26 /var/lib/pgsql/12/data/base/16386/16850 [postgres@xifenfeidg ~]$ dd if=/dev/zero of=/var/lib/pgsql/12/data/base/16386/16850 bs=512 count=1 conv=notrunc 1+0 records in 1+0 records out 512 bytes copied, 0.000158756 s, 3.2 MB/s
重启pg库
[postgres@xifenfeidg bin]$ ./pg_ctl -m fast -D /var/lib/pgsql/12/data/ stop waiting for server to shut down.... done server stopped [postgres@xifenfeidg bin]$ ./pg_ctl -D /var/lib/pgsql/12/data/ start waiting for server to start....2025-03-02 19:02:11.395 HKT [64515] LOG: starting PostgreSQL 12.20 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-22), 64-bit 2025-03-02 19:02:11.396 HKT [64515] LOG: listening on IPv6 address "::1", port 5432 2025-03-02 19:02:11.396 HKT [64515] LOG: listening on IPv4 address "127.0.0.1", port 5432 2025-03-02 19:02:11.396 HKT [64515] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432" 2025-03-02 19:02:11.397 HKT [64515] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" 2025-03-02 19:02:11.403 HKT [64515] LOG: redirecting log output to logging collector process 2025-03-02 19:02:11.403 HKT [64515] HINT: Future log output will appear in directory "log". done server started
查询数据报错
[postgres@xifenfeidg bin]$ psql psql (16.8, server 12.20) Type "help" for help. postgres=# \c his5_dms; psql (16.8, server 12.20) You are now connected to database "his5_dms" as user "postgres". his5_dms=# select count(1) from hiscrm.t_sys_oper_log; ERROR: invalid page in block 0 of relation base/16386/16850
通过pdu进行恢复
跳过了坏块,把好的block中数据均恢复出来
his5_dms.hiscrm=# unload tab t_sys_oper_log;
正在解析表 <t_sys_oper_log>. 已解析数据页: 0, 已解析数据: 0 条
|-块号0 空页面或页面已损坏,已跳过
正在解析表 <t_sys_oper_log>. 已解析数据页: 11, 已解析数据: 86 条
表名<t_sys_oper_log>-</var/lib/pgsql/12/data/base/16386/16850>
解析完成, 11 个数据页 ,共计 86 条数据. 成功 86 条; 失败【0】条
COPY文件路径为:<his5_dms/hiscrm/t_sys_oper_log.csv>
导入pg库中
his5_dms=# truncate table hiscrm.t_sys_oper_log; TRUNCATE TABLE his5_dms=# \i his5_dms/COPY/hiscrm_copy.sql SET COPY 86 his5_dms=#

加我微信(17813235971)
加我QQ(107644445)

