标签云
asm恢复 bbed bootstrap$ dul In Memory kcbzib_kcrsds_1 kccpb_sanity_check_2 kfed MySQL恢复 ORA-00312 ORA-00607 ORA-00704 ORA-01110 ORA-01555 ORA-01578 ORA-08103 ORA-600 2131 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-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 勒索恢复 比特币加密文章分类
- Others (2)
- 中间件 (2)
- WebLogic (2)
- 操作系统 (102)
- 数据库 (1,670)
- DB2 (22)
- MySQL (73)
- Oracle (1,532)
- Data Guard (52)
- EXADATA (8)
- GoldenGate (21)
- ORA-xxxxx (159)
- ORACLE 12C (72)
- ORACLE 18C (6)
- ORACLE 19C (14)
- ORACLE 21C (3)
- Oracle 23ai (7)
- Oracle ASM (65)
- Oracle Bug (8)
- Oracle RAC (52)
- Oracle 安全 (6)
- Oracle 开发 (28)
- Oracle 监听 (28)
- Oracle备份恢复 (560)
- Oracle安装升级 (91)
- Oracle性能优化 (62)
- 专题索引 (5)
- 勒索恢复 (78)
- PostgreSQL (18)
- PostgreSQL恢复 (6)
- SQL Server (27)
- SQL Server恢复 (8)
- TimesTen (7)
- 达梦数据库 (2)
- 生活娱乐 (2)
- 至理名言 (11)
- 虚拟化 (2)
- VMware (2)
- 软件开发 (37)
- Asp.Net (9)
- JavaScript (12)
- PHP (2)
- 小工具 (20)
-
最近发表
- ORA-600 krse_arc_complete.4
- Oracle 19c 202410补丁(RUs+OJVM)
- ntfs MFT损坏(ntfs文件系统故障)导致oracle异常恢复
- .mkp扩展名oracle数据文件加密恢复
- 清空redo,导致ORA-27048: skgfifi: file header information is invalid
- A_H_README_TO_RECOVER勒索恢复
- 通过alert日志分析客户自行对一个数据库恢复的来龙去脉和点评
- ORA-12514: TNS: 监听进程不能解析在连接描述符中给出的SERVICE_NAME
- ORA-01092 ORA-00604 ORA-01558故障处理
- ORA-65088: database open should be retried
- Oracle 19c异常恢复—ORA-01209/ORA-65088
- ORA-600 16703故障再现
- 数据库启动报ORA-27102 OSD-00026 O/S-Error: (OS 1455)
- .[metro777@cock.li].Elbie勒索病毒加密数据库恢复
- 应用连接错误,初始化mysql数据库恢复
- RAC默认服务配置优先节点
- Oracle 19c RAC 替换私网操作
- 监听报TNS-12541 TNS-12560 TNS-00511错误
- drop tablespace xxx including contents恢复
- Linux 8 修改网卡名称
标签归档:rm datafile恢复
Oracle误删除数据文件恢复
有客户通过sftp误删除oracle数据文件,咨询我们是否可以恢复,通过远程上去检查,发现运气不错,数据库还没有crash,通过句柄找到被删除文件
oracle@cwgstestdb[testwctdb]/proc/20611/fd$ls -ltr total 0 lr-x------ 1 oracle oinstall 64 Feb 20 14:03 9 -> /oracle/db19c/rdbms/mesg/oraus.msb lrwx------ 1 oracle oinstall 64 Feb 20 14:03 8 -> /oracle/db19c/dbs/lkTESTWCTDB lrwx------ 1 oracle oinstall 64 Feb 20 14:03 7 -> /oracle/db19c/dbs/hc_testwctdb.dat lr-x------ 1 oracle oinstall 64 Feb 20 14:03 6 -> /var/lib/sss/mc/passwd lr-x------ 1 oracle oinstall 64 Feb 20 14:03 5 -> /proc/20611/fd lr-x------ 1 oracle oinstall 64 Feb 20 14:03 4 -> /oracle/db19c/rdbms/mesg/oraus.msb lrwx------ 1 oracle oinstall 64 Feb 20 14:03 305 -> /oradata/ftms_zx_test01_data8.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 304 -> /oradata/ftms_zx_test01_data7.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 303 -> /oradata/ftms_zx_test01_data6.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 302 -> '/oradata/ftms_zx_test01_data5.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 301 -> '/oradata/ftms_zx_test01_data4.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 300 -> '/oradata/ftms_zx_test01_data3.dbf (deleted)' lr-x------ 1 oracle oinstall 64 Feb 20 14:03 3 -> /dev/null lrwx------ 1 oracle oinstall 64 Feb 20 14:03 299 -> '/oradata/ftms_zx_test01_data2.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 298 -> '/oradata/ftms_zx_test01_data1.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 297 -> '/oradata/ftms_zx_test01_data.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 296 -> /oradata/ftms_zx_test_data.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 295 -> '/oradata/TESTWCTDB/sd.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 294 -> /oradata/TESTWCTDB/ftms_cs3_jiamiceshi lrwx------ 1 oracle oinstall 64 Feb 20 14:03 293 -> /langchao/dumpdata/FTMS_CS_TDE.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 292 -> /oradata/ftms_zx_test01.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 291 -> /langchao/dumpdata/FTMS_CS_DATA4.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 290 -> '/oradata/ftms_zx_data5.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 289 -> /langchao/dumpdata/FTMS_CS_DATA3.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 288 -> /langchao/dumpdata/FTMS_CS_DATA2.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 287 -> /langchao/dumpdata/FTMS_JD_DATA2.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 286 -> '/oradata/LCBIPECDS _TEMP_DAT.DBF' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 285 -> '/oradata/rTB_MBFE_TEMP (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 284 -> '/oradata/TESTWCTDB/temp01.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 283 -> '/oradata/ftms_credit_data5.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 282 -> /oradata/ftmshtdata.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 281 -> '/oradata/dump_data/FTMS_CSBF_DATA.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 280 -> /langchao/dumpdata/FTMS_NEWBL2_DATA.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 279 -> /langchao/dumpdata/FTMS_CS_DATA.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 278 -> /oradata/LCBIPECDS_DAT.DBF lrwx------ 1 oracle oinstall 64 Feb 20 14:03 277 -> /oradata/rTB_MBFE lrwx------ 1 oracle oinstall 64 Feb 20 14:03 276 -> /oradata/udpcount_02.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 275 -> /oradata/udpcount_01.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 274 -> '/oradata/ftms_credit_data_6.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 273 -> /langchao/dumpdata/FTMS_JD_DATA.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 272 -> '/oradata/ftms_old.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 271 -> '/oradata/ftms_credit_data2.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 270 -> /langchao/dumpdata/PJDIP_DATA.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 269 -> '/oradata/ftms_credit_data.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 268 -> /langchao/dumpdata/FTMS_NEWBL_DATA.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 267 -> '/oradata/ftms_zx_data4.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 266 -> /langchao/dumpdata/QIANZHANG_DATA.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 265 -> '/oradata/ftms_zx_data3.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 264 -> '/oradata/ftms_zx_data2.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 263 -> '/oradata/ftms_zx_data.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 262 -> /langchao/dumpdata/FTMSDIP_DATA.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 261 -> /oradata/TESTWCTDB/users01.dbf lrwx------ 1 oracle oinstall 64 Feb 20 14:03 260 -> '/oradata/TESTWCTDB/undotbs01.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 259 -> '/oradata/TESTWCTDB/sysaux01.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 258 -> '/oradata/TESTWCTDB/system01.dbf (deleted)' lrwx------ 1 oracle oinstall 64 Feb 20 14:03 257 -> /oradata/TESTWCTDB/control02.ctl lrwx------ 1 oracle oinstall 64 Feb 20 14:03 256 -> /oradata/TESTWCTDB/control01.ctl l-wx------ 1 oracle oinstall 64 Feb 20 14:03 2 -> /dev/null lrwx------ 1 oracle oinstall 64 Feb 20 14:03 10 -> 'socket:[823411]' l-wx------ 1 oracle oinstall 64 Feb 20 14:03 1 -> /dev/null lr-x------ 1 oracle oinstall 64 Feb 20 14:03 0 -> /dev/null
查询数据文件大小(被删除的文件文件大小通过v$datafile查询为0)
SQL> select name,bytes/1024/1024/1024 from v$datafile; NAME BYTES/1024/1024/1024 -------------------------------------------------------------------------------- -------------------- /oradata/TESTWCTDB/system01.dbf 0 /oradata/TESTWCTDB/sysaux01.dbf 0 /oradata/TESTWCTDB/undotbs01.dbf 0 /oradata/TESTWCTDB/users01.dbf .004882813 /langchao/dumpdata/FTMSDIP_DATA.dbf 3 /oradata/ftms_zx_data.dbf 0 /oradata/ftms_zx_data2.dbf 0 /oradata/ftms_zx_data3.dbf 0 /langchao/dumpdata/QIANZHANG_DATA.dbf 5 /oradata/ftms_zx_data4.dbf 0 /langchao/dumpdata/FTMS_NEWBL_DATA.dbf 30 /oradata/ftms_credit_data.dbf 0 /langchao/dumpdata/PJDIP_DATA.dbf 20 /oradata/ftms_credit_data2.dbf 0 /oradata/ftms_old.dbf 0 /langchao/dumpdata/FTMS_JD_DATA.dbf 15 /oradata/ftms_credit_data_6.dbf 0 /oradata/udpcount_01.dbf 5 /oradata/udpcount_02.dbf 5 /oradata/rTB_MBFE .03125 /oradata/LCBIPECDS_DAT.DBF .5 /langchao/dumpdata/FTMS_CS_DATA.dbf 30 /langchao/dumpdata/FTMS_NEWBL2_DATA.dbf 30 /oradata/dump_data/FTMS_CSBF_DATA.dbf 0 /oradata/ftmshtdata.dbf .087890625 /oradata/ftms_credit_data5.dbf 0 /langchao/dumpdata/FTMS_JD_DATA2.dbf 3 /langchao/dumpdata/FTMS_CS_DATA2.dbf 31.9999847 /langchao/dumpdata/FTMS_CS_DATA3.dbf 10 /oradata/ftms_zx_data5.dbf 0 /langchao/dumpdata/FTMS_CS_DATA4.dbf 12.109375 /oradata/ftms_zx_test01.dbf 19.0527344 /langchao/dumpdata/FTMS_CS_TDE.dbf 1 /oradata/TESTWCTDB/ftms_cs3_jiamiceshi .029296875 /oradata/TESTWCTDB/sd.dbf 0 /oradata/ftms_zx_test_data.dbf .009765625 /oradata/ftms_zx_test01_data.dbf 0 /oradata/ftms_zx_test01_data1.dbf 0 /oradata/ftms_zx_test01_data2.dbf 0 /oradata/ftms_zx_test01_data3.dbf 0 /oradata/ftms_zx_test01_data4.dbf 0 /oradata/ftms_zx_test01_data5.dbf 0 /oradata/ftms_zx_test01_data6.dbf 12.5976563 /oradata/ftms_zx_test01_data7.dbf 9.08203125 /oradata/ftms_zx_test01_data8.dbf 6.25 45 rows selected.
把数据文件拷贝回来
cp /proc/20611/fd/302 /langchao/orabak/ cp /proc/20611/fd/301 /langchao/orabak/ cp /proc/20611/fd/300 /langchao/orabak/ cp /proc/20611/fd/299 /langchao/orabak/ cp /proc/20611/fd/298 /langchao/orabak/ cp /proc/20611/fd/297 /langchao/orabak/ cp /proc/20611/fd/295 /langchao/orabak/ cp /proc/20611/fd/290 /langchao/orabak/ cp /proc/20611/fd/285 /langchao/orabak/ cp /proc/20611/fd/284 /langchao/orabak/ cp /proc/20611/fd/283 /langchao/orabak/ cp /proc/20611/fd/281 /langchao/orabak/ cp /proc/20611/fd/274 /langchao/orabak/ cp /proc/20611/fd/272 /langchao/orabak/ cp /proc/20611/fd/271 /langchao/orabak/ cp /proc/20611/fd/269 /langchao/orabak/ cp /proc/20611/fd/267 /langchao/orabak/ cp /proc/20611/fd/265 /langchao/orabak/ cp /proc/20611/fd/264 /langchao/orabak/ cp /proc/20611/fd/263 /langchao/orabak/ cp /proc/20611/fd/260 /langchao/orabak/ cp /proc/20611/fd/259 /langchao/orabak/ cp /proc/20611/fd/258 /langchao/orabak/
由于涉及system表空间数据文件被删除,无法在open情况下直接操作,直接关闭数据库,启动到mount状态,重命名数据文件路径,recover数据文件,open库,恢复完成
参考以前类似恢复:
Solaris rm datafile recovery—利用句柄误删除数据文件恢复
如果数据库已经关闭,需要考虑以下类似恢复方式:
dbca删除库和rm删库恢复
记录一次rm -rf 删除数据文件异常恢复