标签云
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,881)
- DB2 (22)
- MySQL (82)
- Oracle (1,706)
- 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备份恢复 (660)
- 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)
-
最近发表
- 记录一次云存储资源到期之后引起的数据库恢复
- 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
- Oracle 19c 202607补丁(RUs+OJVM)-19.32
分类目录归档:Oracle备份恢复
ODU恢复PACKAGE/VIEW/DBLINK等数据脚本操作
当数据库不能拉起来时候,我们可以通过odu找回丢失的数据,今天客户出要求,需要我帮忙找回不能起来库中的包,过程,函数,视图,触发器等之类东西。这些东西都是存在system空间中,存在一些系统的基表中,我们如果能够拿到这些基表的数据然后进行处理,原则上就可以得到客户需要的东西
一、PROCEDURE/FUNCTION/PACKAGE/PACKAGE BODY/TRIGGER/TYPE/TYPE BODY之类恢复
1. 查看这些数据存储在什么基表中
select u.name, o.name,
decode(o.type#, 7, 'PROCEDURE', 8, 'FUNCTION', 9, 'PACKAGE',
11, 'PACKAGE BODY', 12, 'TRIGGER', 13, 'TYPE', 14, 'TYPE BODY',
'UNDEFINED'),
s.line, s.source
from sys.obj$ o, sys.source$ s, sys.user$ u
where o.obj# = s.obj#
and o.owner# = u.user#
and ( o.type# in (7, 8, 9, 11, 12, 14) OR
( o.type# = 13 AND o.subname is null))
union all
select u.name, o.name, 'JAVA SOURCE', s.joxftlno, s.joxftsrc
from sys.obj$ o, x$joxfs s, sys.user$ u
where o.obj# = s.joxftobn
and o.owner# = u.user#
and o.type# = 28;
通过这个sql知道主要存储在sys.obj$ o, sys.source$ s, sys.user$中(至于x$joxfs表,我暂时在数据库中未找到,不能使用odu提取数据,也就是说我这里不能恢复出来JAVA SOURCE)
2. 使用odu导出数据(注意output_format设置为dmp,防止出现意外)
使用类此unload table sys.obj$ 下面语句导出数据
3. 加载这些数据到新库中(切记不要使用sys schema)
使用类此imp chf/xifenfei file=d:/SYS_OBJ$.dmp fromuser=sys touser=chf导入数据
4. 在查询出需要对象
SELECT u.name USER_NAME,
o.name OBJECT_nAME,
DECODE (o.type#,
7, 'PROCEDURE',
8, 'FUNCTION',
9, 'PACKAGE',
11, 'PACKAGE BODY',
12, 'TRIGGER',
13, 'TYPE',
14, 'TYPE BODY',
'UNDEFINED')
OBJECT_tYPE,
s.line,
s.source
FROM chf.obj$ o, chf.source$ s, chf.user$ u
WHERE o.obj# = s.obj# AND o.owner# = u.user#
AND (o.type# IN (7, 8, 9, 11, 12, 14)
OR (o.type# = 13 AND o.subname IS NULL))
--过来条件选择出需要对象
-- AND U.name='BSSADMIN'
ORDER BY U.NAME,
O.NAME,
O.TYPE#,
S.LINE;
5. 使用说明
在line=1的source前面加上create or replace ,使用合适的用户创建需要对象
二、VIEW恢复
1. 找出视图存储基表
sys.obj$,sys.view$,sys.user$
2. 使用odu导出需要表
3. 使用imp导入数据库
4. 查询语句
SELECT u.name username, o.name viewname, v.text FROM chf.obj$ o, chf.view$ v, chf.user$ u WHERE o.obj# = v.obj# AND o.owner# = u.user# --过滤条件,挑选需要视图 AND u.name = 'MAS_ADMIN';
5. 使用说明
create VIEW OR REPLACE username.viewname AS+TEXT中内容
三、dblink恢复
1. 找出关联基表
Sys.link$和sys.user$
2. odu导出相关表
3. imp导入数据
4. 查询语句
SELECT U.NAME USERNAME,
L.NAME DBLINK_NAME,
L.USERID LOGIN_USER,
L.HOST TNS,
L.CTIME
FROM CHF.LINK$ L, CHF.USER$ U
WHERE L.OWNER# = U.USER#
--过滤条件
AND U.NAME = 'PUBLIC'
5. 使用说明
根据查询出来信息,自己创建DBLINK
发表在 非常规恢复
评论关闭
遭遇ORA-07445[kkdliac()+346]使用odu抢救数据
1.Oracle启动报错
-bash-2.05b$ sqlplus "/ as sysdba" SQL*Plus: Release 9.2.0.8.0 - Production on 星期三 2月 15 10:31:53 2012 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. Connected to an idle instance. SQL> startup mount ORACLE instance started. Total System Global Area 1527846824 bytes Fixed Size 452520 bytes Variable Size 385875968 bytes Database Buffers 1140850688 bytes Redo Buffers 667648 bytes Database mounted. SQL> alter database open; alter database open * ERROR at line 1: ORA-03113: end-of-file on communication channel
2.alert文件
Wed Feb 15 10:32:06 2012 ALTER DATABASE MOUNT Wed Feb 15 10:32:10 2012 Successful mount of redo thread 1, with mount id 412256678 Wed Feb 15 10:32:10 2012 Database mounted in Exclusive Mode. Completed: ALTER DATABASE MOUNT Wed Feb 15 10:33:44 2012 alter database open Wed Feb 15 10:33:44 2012 Beginning crash recovery of 1 threads Wed Feb 15 10:33:44 2012 Started redo scan Wed Feb 15 10:33:44 2012 Completed redo scan 0 redo blocks read, 0 data blocks need recovery Wed Feb 15 10:33:44 2012 Started recovery at Thread 1: logseq 2, block 3, scn 2862.4075508322 Wed Feb 15 10:33:44 2012 Recovery of Online Redo Log: Thread 1 Group 1 Seq 2 Reading mem 0 Mem# 0 errs 0: /data1z/oracle/oradata/ahcx216/redo01.log Wed Feb 15 10:33:44 2012 Completed redo application Wed Feb 15 10:33:44 2012 Ended recovery at Thread 1: logseq 2, block 3, scn 2862.4075528323 0 data blocks read, 0 data blocks written, 0 redo blocks read Crash recovery completed successfully Wed Feb 15 10:33:44 2012 Thread 1 advanced to log sequence 3 Thread 1 opened at log sequence 3 Current log# 3 seq# 3 mem# 0: /data1z/oracle/oradata/ahcx216/redo03.log Successful open of redo thread 1 Wed Feb 15 10:33:45 2012 SMON: enabling cache recovery Wed Feb 15 10:33:45 2012 Errors in file /data1z/oracle/admin/ahcx216/udump/ahcx216_ora_21325.trc: ORA-07445: exception encountered: core dump [kkdliac()+346] [SIGSEGV] [Address not mapped to object] [0x43] [] []
3.trace文件
/data1z/oracle/admin/ahcx216/udump/ahcx216_ora_21325.trc
Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.8.0 - Production
ORACLE_HOME = /data1z/oracle/product/9.2
System name: Linux
Node name: aiserch1
Release: 2.4.21-27.ELsmp
Version: #1 SMP Wed Dec 1 21:59:02 EST 2004
Machine: i686
Instance name: ahcx216
Redo thread mounted by this instance: 1
Oracle process number: 12
Unix process pid: 21325, image: oracle@aiserch1 (TNS V1-V3)
*** SESSION ID:(11.13) 2012-02-15 10:33:44.739
Thread checkpoint rba:0x000002.00000002.0010 scn:0x0b2e.f2eb5261
Cache low rba is 0xffffffff.ffffffff.ffff
Use incremental checkpoint on-disk rba
Thread 1 recovery from rba:0x000002.00000003.0000 scn:0x0b2e.f2eb5262
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 0
Average hash chain = 0/0 = 0.0
Max compares per lookup = 0
Avg compares per lookup = 0/0 = 0.0
----------------------------------------------
*** 2012-02-15 10:33:44.766
KCRA: start recovery claims for 0 data blocks
*** 2012-02-15 10:33:44.766
KCRA: buffers claimed = 0/0, eliminated = 0
*** 2012-02-15 10:33:44.766
Recovery of Online Redo Log: Thread 1 Group 1 Seq 2 Reading mem 0
----- Recovery Hash Table Statistics ---------
Hash table buckets = 32768
Longest hash chain = 0
Average hash chain = 0/0 = 0.0
Max compares per lookup = 0
Avg compares per lookup = 0/0 = 0.0
----------------------------------------------
Exception signal: 11 (SIGSEGV), code: 1 (Address not mapped to object), addr: 0x43, PC: [0x8880c00, kkdliac()+346]
Registers:
%eax: 0xa0f6b170 %ebx: 0x00000003 %ecx: 0xa0f6b170
%edx: 0x00000001 %edi: 0x00000000 %esi: 0x00000000
%esp: 0xbfff1cb8 %ebp: 0xbfff1cd8 %eip: 0x08880c00
%efl: 0x00010286
kkdliac()+329 (0x8880bef) jnz 0x8880f61
kkdliac()+335 (0x8880bf5) mov %edx,%eax
kkdliac()+337 (0x8880bf7) mov 0xc0(%eax),%edx
kkdliac()+343 (0x8880bfd) mov %edx,0xffffffe0(%ebp)
> kkdliac()+346 (0x8880c00) movzw 0x40(%ebx),%esi
kkdliac()+350 (0x8880c04) mov %si,0xffffffd4(%ebp)
kkdliac()+354 (0x8880c08) movb 0x42(%ebx),%al
kkdliac()+357 (0x8880c0b) movb %al,0xffffffd6(%ebp)
kkdliac()+360 (0x8880c0e) movzw 0x8(%ebx),%edx
*** 2012-02-15 10:33:45.029
ksedmp: internal or fatal error
ORA-07445: exception encountered: core dump [kkdliac()+346] [SIGSEGV] [Address not mapped to object] [0x43] [] []
Current SQL statement for this session:
create table bootstrap$ ( line# number not null, obj# number not null,
sql_text varchar2(4000) not null) storage (initial 50K objno 56 extents (file 1 block 377))
----- Call Stack Trace -----
calling call entry argument values in hex
location type point (? means dubious value)
-------------------- -------- -------------------- ----------------------------
ksedmp()+274 call ksedst() 1 ? 0 ? 0 ? 1 ? 65252838 ?
2C297862 ?
ssexhd()+1113 call ksedmp() 3 ? 0 ? 0 ? 0 ? 0 ? 0 ?
__pthread_sighandle call 00000000 B ? B75CEC90 ? B75CED10 ? 0 ?
r_rt()+122 0 ? 0 ?
kkdliac()+346 signal 00000000 B ? B75CEC90 ? B75CED10 ?
ctcdrv()+1688 call kkdlcob() BFFF1DC8 ? 2 ? 0 ? 38 ? 0 ?
0 ? 0 ?
opiexe()+9647 call ctcdrv() B749CD78 ? BFFF3258 ?
BFFF33B0 ?
opiosq0()+1170 call opiexe() 4 ? 0 ? BFFF379C ?
opiosq()+19 call opiosq0() 3 ? F ? BFFF4418 ? 0 ?
opiodr()+1133 call 00000000 4A ? F ? BFFF4418 ?
__PGOSF163_rpidrus( call opiodr() 4A ? F ? BFFF4418 ? 2 ?
)+145
skgmstack()+137 call 00000000 BFFF3ED0 ? 2 ? BFFF428C ?
BFFF3EE8 ? BFFF3ED0 ?
BFFF3EE8 ?
rpidru()+98 call skgmstack() BFFF3EE8 ? AF61BC0 ? F618 ?
821F376 ? BFFF3ED0 ?
rpiswu2()+315 call 00000000 BFFF428C ? 0 ? 0 ? 0 ?
BFFF3F64 ? F618 ?
rpidrv()+1087 call rpiswu2() 9D7416FC ? 0 ? BFFF4394 ? 2 ?
BFFF43B4 ? 0 ?
rpisplu()+298 call rpidrv() 2 ? 4A ? BFFF4418 ? 8 ?
9EA3F16C ? B749DE88 ?
rpispl()+28 call rpisplu() 2 ? 0 ? 0 ? B749DE88 ? BC ?
0 ? 0 ?
kqlbebs()+781 call rpispl() 2 ? 0 ? B749DE88 ? BC ? 0 ?
0 ?
kqlblfc()+106 call kqlbebs() 0 ? BFFF5590 ?
adbdrv()+2220 call kqlblfc() 0 ? BFFF5590 ? BFFF5590 ?
opiexe()+10319 call adbdrv() B74A022C ? AF5A904 ?
B74AD040 ? 1 ? 0 ? 1 ?
opiosq0()+1170 call opiexe() 4 ? 0 ? BFFF6928 ?
kpooprx()+206 call opiosq0() 3 ? E ? BFFF6A68 ? 24 ?
kpoal8()+599 call kpooprx() BFFF7604 ? BFFF7510 ? 13 ?
1 ? 0 ? 24 ?
opiodr()+1133 call 00000000 5E ? 14 ? BFFF7600 ?
ttcpip()+4250 call 00000000 5E ? 14 ? BFFF7600 ? 0 ?
opitsk()+1077 call ttcpip() AF5A900 ? 5E ? BFFF7600 ? 0 ?
BFFF87D8 ? BFFF87D4 ?
opiino()+1287 call opitsk() 0 ? 0 ? AF5A900 ? CC349D8 ?
F1 ? 0 ?
opiodr()+1133 call 00000000 3C ? 4 ? BFFF9B9C ?
opidrv()+418 call opiodr() 3C ? 4 ? BFFF9B9C ? 0 ?
sou2o()+30 call opidrv() 3C ? 4 ? BFFF9B9C ?
main()+187 call sou2o() BFFF9B80 ? 3C ? 4 ?
BFFF9B9C ? 890710 ? 0 ?
__libc_start_main() call 00000000 2 ? BFFF9C04 ? BFFF9C10 ?
+188 890518 ? 2 ? 82174E0 ?
--------------------- Binary Stack Dump ---------------------
从这里看出数据库是在open过程中,创建bootstrap$错误,这个错误对于现在的我来说,暂时没有办法去解决。
为了能够抢救出客户需要的其中一个用户下面的数据,我不得不采用odu来解决问题。
4.填写ontrol.txt文件
SQL> set pagesize 1000
SQL> set linesize 200
SQL> col name for a50
SQL> select file#,ts#,rfile#,name from v$datafile;
FILE# TS# RFILE# NAME
---------- ---------- ---------- ----------------------------------------------
1 0 1 /data1z/oracle/oradata/ahcx216/system01
2 1 2 /data1z/oracle/oradata/ahcx216/undotbs01
3 3 3 /data1z/oracle/oradata/ahcx216/CITY
4 4 4 /data1z/oracle/oradata/ahcx216/DATATS
5 5 5 /data1z/oracle/oradata/ahcx216/indx01
6 6 6 /data1z/oracle/oradata/ahcx216/tools01
7 7 7 /data1z/oracle/oradata/ahcx216/users
8 4 8 /data1z/oracle/oradata/ahcx216/datats02
9 4 9 /data1z/oracle/oradata/ahcx216/datats03
………………
5.登录odu
bash-2.05b$ ./odu Oracle Data Unloader:Release 3.0.8 Copyright (c) 2008,2009 XiongJun. All rights reserved. Web: http://www.laoxiong.net Email: magic007cn@gmail.com loading default config....... byte_order little block_size 8192 db_timezone -7 client_timezone 8 data_path data charset_name ZHS16GBK ncharset_name AL16UTF16 output_format text lob_storage infile clob_byte_order little load control file 'config.txt' successful loading default control file ...... ts# fn rfn bsize blocks bf offset filename ---- ---- ---- ----- -------- -- ------ -------------------------------------------- 0 1 1 8192 32000 N 0 /data1z/oracle/oradata/ahcx216/system01 1 2 2 8192 524288 N 0 /data1z/oracle/oradata/ahcx216/undotbs01 3 3 3 8192 524288 N 0 /data1z/oracle/oradata/ahcx216/CITY 4 4 4 8192 524288 N 0 /data1z/oracle/oradata/ahcx216/DATATS 5 5 5 8192 524288 N 0 /data1z/oracle/oradata/ahcx216/indx01 ……………… load control file 'control.txt' successful loading dictionary data......
6.加载数据字典
ODU> unload dict CLUSTER C_USER# file_no: 1 block_no: 89 TABLE OBJ$ file_no: 1 block_no: 121 CLUSTER C_OBJ# file_no: 1 block_no: 25 CLUSTER C_OBJ# file_no: 1 block_no: 25 found IND$'s obj# 19 found IND$'s dataobj#:2,ts#:0,file#:1,block#:25,tab#:3 found TABPART$'s obj# 230 found TABPART$'s dataobj#:230,ts#:0,file#:1,block#:1657,tab#:0 found INDPART$'s obj# 234 found INDPART$'s dataobj#:234,ts#:0,file#:1,block#:1689,tab#:0 found TABSUBPART$'s obj# 240 found TABSUBPART$'s dataobj#:240,ts#:0,file#:1,block#:1737,tab#:0 found INDSUBPART$'s obj# 245 found INDSUBPART$'s dataobj#:245,ts#:0,file#:1,block#:1777,tab#:0 found IND$'s obj# 19 found IND$'s dataobj#:2,ts#:0,file#:1,block#:25,tab#:3 found LOB$'s obj# 156 found LOB$'s dataobj#:2,ts#:0,file#:1,block#:25,tab#:6 found LOBFRAG$'s obj# 258 found LOBFRAG$'s dataobj#:258,ts#:0,file#:1,block#:1881,tab#:0
7.列出用户
ODU> list user
USER# USERNAME
---------- ------------------------------
…………
20 HS_ADMIN_ROLE
25 MAS_ADMIN
24 HF_CX
21 WMSYS
22 WM_ADMIN_ROLE
23 CITY
26 BB_ADMIN
27 AQ_ADMIN
28 WH_ADMIN
29 LA_ADMIN
…………
8.列出用户表
ODU> list table TL_ADMIN
OBJ# OBJECT_NAME
---------- ------------------------------
2286779 WT_MX_201005
32309 BD_DEALER_308
126172 CDMA_FAVOUR_BAOYUE
79675 DAISHENG_TMP
52634 RYSJ_T_308
25577 FEE_ID_T
931167 A136_20080304
1514084 WANGTONG_MOKUAI_2009
………………
10.导出用户下表
ODU> unload user TL_ADMIN Unloading user TL_ADMIN's tables. Unloading table: WT_MX_201005,object ID: 2286779 Unloading segment,storage(Obj#=2286779 DataObj#=2286779 TS#=3 File#=31 Block#=8571 Cluster=0) 25205 rows unloaded Unloading table: BD_DEALER_308,object ID: 32309 Unloading segment,storage(Obj#=32309 DataObj#=32309 TS#=3 File#=31 Block#=17587 Cluster=0) 60 rows unloaded Unloading table: CDMA_FAVOUR_BAOYUE,object ID: 126172 Unloading segment,storage(Obj#=126172 DataObj#=126172 TS#=3 File#=3 Block#=30899 Cluster=0) 31 rows unloaded Unloading table: DAISHENG_TMP,object ID: 79675 Unloading segment,storage(Obj#=79675 DataObj#=342004 TS#=3 File#=31 Block#=19451 Cluster=0) 7504 rows unloaded …………………………
11.查看导出来数据
-bash-2.05b$ ls -l -rw-r--r-- 1 oracle dba 658 2月 15 08:43 TL_ADMIN_AMORTIZE.ctl -rw-r--r-- 1 oracle dba 763 2月 15 08:43 TL_ADMIN_AMORTIZE_HM_COPY.ctl -rw-r--r-- 1 oracle dba 683 2月 15 08:43 TL_ADMIN_AMORTIZE_HM_COPY.sql -rw-r--r-- 1 oracle dba 45813 2月 15 08:43 TL_ADMIN_AMORTIZE_HM_COPY.txt -rw-r--r-- 1 oracle dba 748 2月 15 08:43 TL_ADMIN_AMORTIZE_HM.ctl -rw-r--r-- 1 oracle dba 686 2月 15 08:43 TL_ADMIN_AMORTIZE_HM.sql -rw-r--r-- 1 oracle dba 263046 2月 15 08:43 TL_ADMIN_AMORTIZE_HM.txt -rw-r--r-- 1 oracle dba 777 2月 15 08:43 TL_ADMIN_AMORTIZE_ID.ctl -rw-r--r-- 1 oracle dba 696 2月 15 08:43 TL_ADMIN_AMORTIZE_ID.sql ……………………………………
12.创建表脚本
-bash-2.05b$ ls -l *.sql -rw-r--r-- 1 oracle dba 312 2月 15 08:43 TL_ADMIN_A136_20080304.sql -rw-r--r-- 1 oracle dba 683 2月 15 08:43 TL_ADMIN_AMORTIZE_HM_COPY.sql -rw-r--r-- 1 oracle dba 686 2月 15 08:43 TL_ADMIN_AMORTIZE_HM.sql -rw-r--r-- 1 oracle dba 696 2月 15 08:43 TL_ADMIN_AMORTIZE_ID.sql -rw-r--r-- 1 oracle dba 147 2月 15 08:44 TL_ADMIN_AMORTIZE_OWE.sql ……………… 复制这些文件列表,使用UltraEdit编辑文件(recover_create_tab.sql),生成如下脚本 @@TL_ADMIN_A136_20080304.sql @@TL_ADMIN_AMORTIZE_HM_COPY.sql @@TL_ADMIN_AMORTIZE_HM.sql @@TL_ADMIN_AMORTIZE_ID.sql @@TL_ADMIN_AMORTIZE_OWE.sql @@TL_ADMIN_AMORTIZE_PAY.sql 然后使用sqlplus登录数据库,直接执行recover_create_tab.sql,创建了所有需要的表
13.加载数据脚本
-bash-2.05b$ ls -l *.ctl -rw-r--r-- 1 oracle dba 507 2月 15 08:43 TL_ADMIN_A136_20080304.ctl -rw-r--r-- 1 oracle dba 658 2月 15 08:43 TL_ADMIN_AMORTIZE.ctl -rw-r--r-- 1 oracle dba 763 2月 15 08:43 TL_ADMIN_AMORTIZE_HM_COPY.ctl -rw-r--r-- 1 oracle dba 748 2月 15 08:43 TL_ADMIN_AMORTIZE_HM.ctl -rw-r--r-- 1 oracle dba 777 2月 15 08:43 TL_ADMIN_AMORTIZE_ID.ctl -rw-r--r-- 1 oracle dba 344 2月 15 08:44 TL_ADMIN_AMORTIZE_OWE.ctl -rw-r--r-- 1 oracle dba 342 2月 15 08:43 TL_ADMIN_AMORTIZE_PAY.ctl 也同样使用UltraEdit出来,生成文件(recover_load_data.sh) sqlldr TL_ADMIN/password control= TL_ADMIN_A136_20080304.ctl sqlldr TL_ADMIN/password control= TL_ADMIN_AMORTIZE.ctl sqlldr TL_ADMIN/password control= TL_ADMIN_AMORTIZE_HM_COPY.ctl sqlldr TL_ADMIN/password control= TL_ADMIN_AMORTIZE_HM.ctl sqlldr TL_ADMIN/password control= TL_ADMIN_AMORTIZE_ID.ctl sqlldr TL_ADMIN/password control= TL_ADMIN_AMORTIZE_OWE.ctl sqlldr TL_ADMIN/password control= TL_ADMIN_AMORTIZE_PAY.ctl sqlldr TL_ADMIN/password control= TL_ADMIN_BD_DEALER_308.ctl sqlldr TL_ADMIN/password control= TL_ADMIN_BRXZ.ctl 然后在shell中执行recover_load_data.sh脚本导入数据,至此数据恢复完成
注意:recover_create_tab.sql和recover_load_data.sh需要在当前抽取出来数据的目录中。
ORA-600[4194]/[4193]解决
朋友的库启动的时候出现ORA-600[4194]/[4193]错误
Tue Feb 14 09:34:11 2012 Errors in file d:\oracle\product\10.2.0\admin\interlib\bdump\interlib_smon_2784.trc: ORA-01595: error freeing extent (2) of rollback segment (3)) ORA-00607: Internal error occurred while making a change to a data block ORA-00600: internal error code, arguments: [4194], [6], [30], [], [], [], [], [] Tue Feb 14 09:35:34 2012 Errors in file d:\oracle\product\10.2.0\admin\interlib\udump\interlib_ora_2824.trc: ORA-00603: ORACLE server session terminated by fatal error ORA-00600: internal error code, arguments: [4193], [2005], [2008], [], [], [], [], [] ORA-00600: internal error code, arguments: [4193], [2005], [2008], [], [], [], [], [] Tue Feb 14 09:36:30 2012 DEBUG: Replaying xcb 0x1fa24174, pmd 0x1fba06d4 for failed op 8 Doing block recovery for file 2 block 177 No block recovery was needed Tue Feb 14 09:37:30 2012 Errors in file d:\oracle\product\10.2.0\admin\interlib\bdump\interlib_pmon_2732.trc: ORA-00600: internal error code, arguments: [4193], [2005], [2008], [], [], [], [], [] Tue Feb 14 09:37:31 2012 Errors in file d:\oracle\product\10.2.0\admin\interlib\bdump\interlib_pmon_2732.trc: ORA-00600: internal error code, arguments: [4193], [2005], [2008], [], [], [], [], []
从这里可以看到出现了ORA-600[4194]/[4193],第一感觉就是undo出现问题。
4193:表示undo和redo不一致(Arg [a] Undo record seq number,Arg [b] Redo record seq number );
4194:表示也是undo和redo不一致(Arg [a] Maximum Undo record number in Undo block,Arg [b] Undo record number from Redo block)
至于为什么有时候会只出现其中一个,我不太清楚,求答案
直接设置了下面参数,数据库就意外的open成功,这位朋友比较幸运
undo_tablespace=SYSTEM undo_management=MANUAL
既然库已经open,然后新建undo空间,删除出问题的undo,做如下修改,数据库恢复完成
undo_tablespace=新undo undo_management=AUTO
如果出现极端的情况可能需要做如下处理:
1.使用_offline_rollback_segments和_corrupted_rollback_segments屏蔽掉有问题的undo segment
2.继续可能出现ora-600[2662],需要推进scn

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

