use bbed resolve ora-01189 error - maclean_liu (liu bing) - blog park

22
Use bbed resolve ORA-01189 error ORA-01189 error is common to use the Create Controlfile found OFFLINE command data files or backup file is generated in the last RESETLOGS before, in general, if it is before RESETLOGS offline data files, you can omit it from the CREATE CONTROLFILE command offline datafile In use after opening the database rename file command to repair their lost data file name, then after the data files online; offline datafile if it is caused by ORA-01189 error, it is necessary to find other data files with the same version of the data file or backup to resolve the issue. Imagine the existence of such a scenario: no backup database is non- filing status, use the shutdown immediate command in the Sun cleanly shut down the database, to Monday because of a disk failure found lost all control files, use the Create Controlfile RESETLOGS had to rebuild the control file , and in the rebuilding process has lost some pieces missing data file records and later use the alter database open resetlogs reset the log file and open the database, then found to be missing a data file, try using processing method for offline datafile will lost data file rename (rename), and try to online the data file, there is no doubt that we will encounter ORA-01190 "control file or data file% s is from Navigation Blog park H o m e New Essay C o n t a c t S u b s c r i p t i M a n a g e m e n < March 2013 > Day A TwoThreeFourFiveSix 24 25 26 27 28 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 2 3 4 5 6 Announcement Learn Maclean Liu | to Maclean Liu asked Oracle ALLSTARS All-Star (within the group have multiple Oracle Advanced aftermarket support, N bits OCM and ACE) QQ group # QQ group number: 23549328 # 2000 has been upgraded to the crowd, a lot of space. Welcome to have some basic Oracle bone friends to join into the group now need to go through the technical interview Maclean, welcome interviews, please add QQ: 47079569 Friends interview two groups based group just portal for students, will share best practices and Getting Started Information QQ group # QQ group number: 171 092 051 # 500 has been upgraded to the super group, lots of space, no interview ORACLE database data recovery, performance tuning, fault diagnosis to ask MACLEAN Liu Bing (Maclean Liu) Mail: liu.maclean @ gmail.com Phone: 13764045638, ORA-ALLSTARS Exadata elite group of users QQ group: 23549328, base population: 171,092,051 Essay - 1178 article - 0 Comments - 2 references - 0

Upload: tran-duc-dai

Post on 02-Jan-2016

47 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

Use bbed resolve ORA-01189 error

ORA-01189 error is common to use the Create Controlfile found OFFLINE command data

files or backup file is generated in the last RESETLOGS before, in general, if it is before

RESETLOGS offline data files, you can omit it from the CREATE CONTROLFILE command

offline datafile In use after opening the database rename file command to repair their lost

data file name, then after the data files online; offline datafile if it is caused by ORA-01189

error, it is necessary to find other data files with the same version of the data file or backup

to resolve the issue. Imagine the existence of such a scenario: no backup database is non-

filing status, use the shutdown immediate command in the Sun cleanly shut down the

database, to Monday because of a disk failure found lost all control files, use the Create

Controlfile RESETLOGS had to rebuild the control file , and in the rebuilding process has lost

some pieces missing data file records and later use the alter database open resetlogs reset

the log file and open the database, then found to be missing a data file, try using processing

method for offline datafile will lost data file rename (rename), and try to online the data file,

there is no doubt that we will encounter ORA-01190 "control file or data file% s is from

Navigation

Blog park

H o m e

New Essay

C o n t a c t

S u b s c r i p t i o n

M a n a g e m e n t

< March 2013 >

Day A TwoThreeFourFiveSix

24 25 26 27 28 1 2

3 4 5 6 7 8 9

10 11 12 13 14 15 16

17 18 19 20 21 22 23

24 25 26 27 28 29 30

31 1 2 3 4 5 6

Announcement

Learn Maclean Liu | to Maclean Liu asked Oracle ALLSTARS All-Star (within thegroup have multiple Oracle Advanced aftermarket support, N bits OCM and ACE) QQ group # QQ group number:23549328 # 2000 has been upgraded to the crowd, a lot of space. Welcome to have some basic Oracle bonefriends to join into the group now need to go through the technical interview Maclean, welcome interviews,please add QQ: 47079569 Friends interview

two groups based group just portalfor students, will share best practices and Getting Started Information QQ group # QQ group number: 171 092051 # 500 has been upgraded to the super group, lots of space, no interview

ORACLE database data recovery, performance tuning, fault diagnosis to

ask MACLEANLiu Bing (Maclean Liu) Mail: liu.maclean @ gmail.com Phone: 13764045638, ORA-ALLSTARS Exadata elite group of usersQQ group: 23549328, base population: 171,092,051

Essay - 1178 article - 0 Comments - 2 references - 0

Page 2: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

before the last RESETLOGS" error, then although our hands There are the "clean" data file,

but there is no way to make it online it. Here I introduce a modified data files using bbed way

to solve the ORA-01189 error:

[Oracle @ rh2 controlfile] $ oerr ora 1189

01189, 00000, "file is from a different RESETLOGS than previous files"

/ / * Cause: In a CREATE CONTROLFILE command either this file or all previous

/ / Files were backups from before the last RESETLOGS. This may also

/ / Occur if this is a file that is offline and has been offline since

/ / Before the last RESETLOGS.

/ / * Action: If the file was taken offline normal before the last RESETLOGS,

/ / And is still offline, omit it from the CREATE CONTROLFILE command.

/ / Rename and online the file after the database is open. Otherwise

/ / Find the version of the mentioned file consistent with the rest

/ / Of the datafiles and resubmit the command.

[Oracle @ rh2 controlfile] $ oerr ora 1190

01190, 00000, "control file or data file% s is from before the last RESETLOGS"

/ / * Cause: Attempting to use a data file when the log reset information in

/ / The file does not match the control file. Either the data file

/ / Or the control file is a backup that was made before the most

/ / Recent ALTER DATABASE OPEN RESETLOGS.

/ / * Action: Restore file from a more recent backup.

/ * In our scenario wwli.dbf act as such an "ignore" data file * /

SQL> create tablespace we_will_lost_it datafile '/ flashcard / wwli.dbf' size

20M;

Tablespace created.

SQL> create table lost_data tablespace we_will_lost_it as select * from obj $;

Maclean Liu 10g & 11gOCM, IOUG and ACOUGuser group. Has sevenyears of experience inthe field of the databaseis currently working atOracle China Shanghai,the service industries,includingtelecommunicationsoperators,telecommunicationsequipmentmanufacturers, banks,financial services andother. Click to learnMaclean Liu

Page 3: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

Table created.

SQL> alter database backup controlfile to trace;

Database altered.

SQL> shutdown immediate;

/ * Remove all control files, not for production environments! * /

[Oracle @ rh2 ~] $ rm / flashcard/oradata/G10R2/controlfile/1.ctl

[Oracle @ rh2 ~] $ sqlplus / as sysdba

SQL * Plus: Release 10.2.0.4.0 - Production on Wed Apr 27 20:42:31 2011

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> startup mount;

ORACLE instance started.

Total System Global Area 1224736768 bytes

Fixed Size 2083560 bytes

Variable Size 318768408 bytes

Database Buffers 889192448 bytes

Redo Buffers 14692352 bytes

ORA-00205: error in identifying control file, check alert log for more info

/ * Use the create controlfile resetlogs rebuild the control file, where we

Nickname:

Maclean_Liu (Liu Bing)

Park Age: 4 months

Fans: 2

Concern: 0

+ Plus interest

Search

Look for

Google Search

Useful Links

My essay

My comments

My participation

Latest Comments

My Tags

My Tags

jdbc performanceoptimization(1)

Essays Files

March 2013 (787)

December 2010 (49)

November 2010 (27)

October 2010 (16)

September 2010 (30)

August 2010 (39)

July 2010 (32)

June 2010 (31)

May 2010 (13)

April 2010 (5)

Page 4: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

"unintentional" and lost a data file * /

SQL> CREATE CONTROLFILE REUSE DATABASE "G10R2" RESETLOGS NOARCHIVELOG

2 MAXLOGFILES 16

3 MAXLOGMEMBERS 3

4 MAXDATAFILES 100

5 MAXINSTANCES 8

6 MAXLOGHISTORY 292

7 LOGFILE

8 GROUP 1 (

9 '/ flashcard/oradata/G10R2/onlinelog/o1_mf_1_6v34jnkn_.log',

10 '/ s01/flash_recovery_area/G10R2/onlinelog/o1_mf_1_6v34jnst_.log'

11) SIZE 50M,

12 GROUP 2 (

13 '/ flashcard/oradata/G10R2/onlinelog/o1_mf_2_6v34jokt_.log',

14 '/ s01/flash_recovery_area/G10R2/onlinelog/o1_mf_2_6v34jotq_.log'

15) SIZE 50M,

16 GROUP 3 (

17 '/ flashcard/oradata/G10R2/onlinelog/o1_mf_3_6v34jpmp_.log',

18 '/ s01/flash_recovery_area/G10R2/onlinelog/o1_mf_3_6v34jpyn_.log'

19) SIZE 50M

20 - STANDBY LOGFILE

21 DATAFILE

22 '/ flashcard/oradata/G10R2/datafile/o1_mf_system_6v34hhyw_.dbf',

23 '/ flashcard/oradata/G10R2/datafile/o1_mf_undotbs1_6v34hj0l_.dbf',

24 '/ flashcard/oradata/G10R2/datafile/o1_mf_sysaux_6v34hhyx_.dbf',

25 '/ flashcard/oradata/G10R2/datafile/o1_mf_users_6v34hj0p_.dbf',

26 '/ flashcard/oradata/G10R2/datafile/o1_mf_example_6v34jthj_.dbf',

27 '/ flashcard/oradata/G10R2/datafile/o1_mf_test_6vhlm3mv_.dbf',

28 '/ flashcard/oradata/G10R2/datafile/o1_mf_lostfile_6vhtgo7w_.dbf'

March 2010 (9)

January 2010 (8)

December 2009 (1)

November 2009 (5)

October 2009 (2)

September 2009 (40)

August 2009 (32)

July 2009 (9)

June 2009 (21)

May 2009 (4)

April 2009 (4)

March 2009 (3)

January 2009 (1)

Latest Comments

1. Re: Mysql fewsuccess stories

Large enterprises, there are cattle people, clusters, load balancing. . . What differences are not large database.

- Younotalone

2. Re: Mysql fewsuccess stories

Learn

- Xiaoxiang hermit

Reading list

1. Mysql few successstories (289)

2. 11gR2 New Features:Heavy swappingobserved on system inlast 5 mins. (162)

3. Java Jdbc reducebatch processing toenhance the interactionbetween Oracleperformance, in the endhow to optimize go?(142)

Page 5: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

29 - we lost datafile here!!! '/ Flashcard / wwli.dbf'

30 CHARACTER SET UTF8

31;

Control file created.

SQL> recover database using backup controlfile;

ORA-00279: change 690423 generated at 04/27/2011 20:40:36 needed for thread 1

ORA-00289: suggestion:

/ S01/flash_recovery_area/G10R2/archivelog/2011_04_27/o1_mf_1_1_% u_.arc

ORA-00280: change 690423 for thread 1 is in sequence # 1

Specify log: {= suggested | filename | AUTO | CANCEL}

/ Flashcard/oradata/G10R2/onlinelog/o1_mf_1_6v34jnkn_.log

Log applied.

Media recovery complete.

SQL> alter database open resetlogs;

Database altered.

SQL> select * from v $ recover_file;

FILE # ONLINE ONLINE_ ERROR CHANGE # TIME

-------------------------------------------------- ----------------------------

---------------------- --------

9 OFFLINE OFFLINE FILE MISSING 0

SQL> select name from v $ datafile where file # = 9;

NAME

4. Cursor_sharing ='SIMILAR' will bediscarded (67)

5. Oracle 11gR2 release11.2.0.3 Patchset patchset - anotherheavyweight update(66)

CommentsLeaderboard

1. Mysql few successstories (2)

2. SQL PerformanceAnalyzer SPA commonscripting Summary (0)

3. Java Jdbc reducebatch processing toenhance the interactionbetween Oracleperformance, in the endhow to optimize go? (0)

4. Intro Two-PhaseCommit (2PC) (0)

5. 11g new feature -Adaptive Cursor Sharing(0)

Top Picks

1 [Figure] Hadoop andcommercial databaseperformance comparison(1)

Page 6: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

--------------------------------------------------

/ S01/db_1/dbs/MISSING00009

SQL> alter database rename file '/ s01/db_1/dbs/MISSING00009' to '/ flashcard /

wwli.dbf';

Database altered.

SQL> alter database datafile 9 online;

alter database datafile 9 online

*

ERROR at line 1:

ORA-01190: control file or data file 9 is from

before the last RESETLOGS

ORA-01110: data file 9: '/ flashcard / wwli.dbf'

/ * At this point we have described previously encountered problems! * /

SQL> oradebug setmypid;

Statement processed.

/ * Use the dump file_hdrs command to dump the data file header, we dump data

file header is intended to obtain resetlogs count, resetlogs scn * /

SQL> oradebug dump file_hdrs 8;

Statement processed.

SQL> oradebug tracefile_name;

/ S01/admin/G10R2/udump/g10r2_ora_20029.trc

Page 7: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

Tablespace # 0 - SYSTEM rel_fn: 1

Creation at scn: 0x0000.00000005 03/12/2008 00:39:08

Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread: 0

RESET logs count: 0x2cade887 scn: 0x0000.000a88f9 RESET logs Terminal rcv Data:

0x0 scn: 0x0000.00000000

prev reset logs count: 0x2cadd4e7 scn: 0x0000.000a7f86 prev reset logs

terminal rcv data: 0x0 scn: 0x0000.00000000

recovered at 04/27/2011 20:45:34

status: 0x2004 root dba: 0x00400179 chkpt cnt: 85 ctl cnt: 84

begin-hot-backup file size: 0

Checkpointed at scn: 0x0000.000a88fa 04/27/2011 20:46:00

Tablespace # 1 - UNDOTBS1 rel_fn: 2

Creation at scn: 0x0000.00092a47 03/12/2008 01:19:05

Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread: 0

RESET logs count: 0x2cade887 scn: 0x0000.000a88f9 RESET logs Terminal rcv Data:

0x0 scn: 0x0000.00000000

prev reset logs count: 0x2cadd4e7 scn: 0x0000.000a7f86 prev reset logs

terminal rcv data: 0x0 scn: 0x0000.00000000

recovered at 04/27/2011 20:45:34

status: 0x4 root dba: 0x00000000 chkpt cnt: 45 ctl cnt: 44

begin-hot-backup file size: 0

Tablespace # 10 - WE_WILL_LOST_IT rel_fn: 9

Creation at scn: 0x0000.000a8849 04/27/2011 20:39:27

Backup taken at scn: 0x0000.00000000 01/01/1988 00:00:00 thread: 0

RESET logs count: 0x2cadd4e7 scn: 0x0000.000a7f86 RESET logs Terminal rcv Data:

0x0 scn: 0x0000.00000000

prev reset logs count: 0x2cadcee3 scn: 0x0000.000a2af7 prev reset logs

terminal rcv data: 0x0 scn: 0x0000.00000000

Page 8: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

recovered at 01/01/1988 00:00:00

status: 0x0 root dba: 0x00000000 chkpt cnt: 3 ctl cnt: 2

begin-hot-backup file size: 0

Checkpointed at scn: 0x0000.000a88f7 04/27/2011 20:40:36

thread: 1 rba: (0x1.c6f.10)

Above you can see the data files 1 and 2 resetlogs count (0x2cade887), scn (000a88f9) are

the same value, and our problem corresponding data file header information is contrast!

Next, we use the bbed command to modify the data in the file header problem resetlogs

count, scn information about bbed compile and use can be found here.

[Oracle @ rh2 ~] $ bbed filename = / flashcard / wwli.dbf blocksize = 8192

password = blockedit mode = edit

BBED: Release 2.0.0.0.0 - Limited Production on Wed Apr 27 20:59:14 2011

Copyright (c) 1982, 2007, Oracle. All rights reserved.

*************!!! For Oracle Internal Use only!!! ***************

BBED> set block 1

BLOCK # 1

BBED> map

File: / flashcard / wwli.dbf (0)

Block: 1 Dba: 0x00000000

-------------------------------------------------- ----------

Data File Header

struct kcvfh, 676 bytes @ 0

ub4 tailchk @ 8188

Page 9: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

BBED> p kcvfh

struct kcvfh, 676 bytes @ 0

struct kcvfhbfh, 20 bytes @ 0

ub1 type_kcbh @ 0 0x0b

ub1 frmt_kcbh @ 1 0xa2 format 10.2

ub1 spare1_kcbh @ 2 0x00

ub1 spare2_kcbh @ 3 0x00

ub4 rdba_kcbh @ 4 0x02400001 RDBA

ub4 bas_kcbh @ 8 0x00000000

ub2 wrp_kcbh @ 12 0x0000

ub1 seq_kcbh @ 14 0x01

ub1 flg_kcbh @ 15 0x04 (KCBHFCKV)

ub2 chkval_kcbh @ 16 0xafa1 checksum

ub2 spare3_kcbh @ 18 0x0000

struct kcvfhhdr, 76 bytes @ 20

ub4 kccfhswv @ 20 0x00000000

ub4 kccfhcvn @ 24 0x0a200300 compatible

ub4 kccfhdbi @ 28 0xac859d12

text kccfhdbn [0] @ 32 G DB_NAME

text kccfhdbn [1] @ 33 1

text kccfhdbn [2] @ 34 0

text kccfhdbn [3] @ 35 R

text kccfhdbn [4] @ 36 2

text kccfhdbn [5] @ 37

text kccfhdbn [6] @ 38

text kccfhdbn [7] @ 39

ub4 kccfhcsq @ 40 0x00000245

ub4 kccfhfsz @ 44 0x00000a00

s_blkz kccfhbsz @ 48 0x00

ub2 kccfhfno @ 52 0x0009 FILE NUM

Page 10: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

ub2 kccfhtyp @ 54 0x0003 FILE TYPE

ub4 kccfhacid @ 56 0x00000000

ub4 kccfhcks @ 60 0x00000000

text kccfhtag [0] @ 64

text kccfhtag [1] @ 65

text kccfhtag [2] @ 66

text kccfhtag [3] @ 67

text kccfhtag [4] @ 68

text kccfhtag [5] @ 69

text kccfhtag [6] @ 70

text kccfhtag [7] @ 71

text kccfhtag [8] @ 72

text kccfhtag [9] @ 73

text kccfhtag [10] @ 74

text kccfhtag [11] @ 75

text kccfhtag [12] @ 76

text kccfhtag [13] @ 77

text kccfhtag [14] @ 78

text kccfhtag [15] @ 79

text kccfhtag [16] @ 80

text kccfhtag [17] @ 81

text kccfhtag [18] @ 82

text kccfhtag [19] @ 83

text kccfhtag [20] @ 84

text kccfhtag [21] @ 85

text kccfhtag [22] @ 86

text kccfhtag [23] @ 87

text kccfhtag [24] @ 88

text kccfhtag [25] @ 89

text kccfhtag [26] @ 90

Page 11: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

text kccfhtag [27] @ 91

text kccfhtag [28] @ 92

text kccfhtag [29] @ 93

text kccfhtag [30] @ 94

text kccfhtag [31] @ 95

ub4 kcvfhrdb @ 96 0x00000000

struct kcvfhcrs, 8 bytes @ 100 Creation Checkpointed at scn

ub4 kscnbas @ 100 0x000a8849

ub2 kscnwrp @ 104 0x0000

ub4 kcvfhcrt @ 108 0x2cade6ff

ub4 kcvfhrlc @ 112 0x2cadd4e7 resetlogs count

struct kcvfhrls, 8 bytes @ 116

ub4 kscnbas @ 116 0x000a7f86 resetlogs scn

ub2 kscnwrp @ 120 0x0000

ub4 kcvfhbti @ 124 0x00000000

struct kcvfhbsc, 8 bytes @ 128

ub4 kscnbas @ 128 0x00000000

ub2 kscnwrp @ 132 0x0000

ub2 kcvfhbth @ 136 0x0000

ub2 kcvfhsta @ 138 0x0000 (NONE)

struct kcvfhckp, 36 bytes @ 484

struct kcvcpscn, 8 bytes @ 484 Checkpoint scn

ub4 kscnbas @ 484 0x000a88f7

ub2 kscnwrp @ 488 0x0000

ub4 kcvcptim @ 492 0x2cade744

ub2 kcvcpthr @ 496 0x0001

union u, 12 bytes @ 500

struct kcvcprba, 12 bytes @ 500

ub4 kcrbaseq @ 500 0x00000001

ub4 kcrbabno @ 504 0x00000c6f

Page 12: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

ub2 kcrbabof @ 508 0x0010

ub1 kcvcpetb [0] @ 512 0x02

ub1 kcvcpetb [1] @ 513 0x00

ub1 kcvcpetb [2] @ 514 0x00

ub1 kcvcpetb [3] @ 515 0x00

ub1 kcvcpetb [4] @ 516 0x00

ub1 kcvcpetb [5] @ 517 0x00

ub1 kcvcpetb [6] @ 518 0x00

ub1 kcvcpetb [7] @ 519 0x00

ub4 kcvfhcpc @ 140 0x00000003

ub4 kcvfhrts @ 144 0x00000000

ub4 kcvfhccc @ 148 0x00000002

struct kcvfhbcp, 36 bytes @ 152

struct kcvcpscn, 8 bytes @ 152

ub4 kscnbas @ 152 0x00000000

ub2 kscnwrp @ 156 0x0000

ub4 kcvcptim @ 160 0x00000000

ub2 kcvcpthr @ 164 0x0000

union u, 12 bytes @ 168

struct kcvcprba, 12 bytes @ 168

ub4 kcrbaseq @ 168 0x00000000

ub4 kcrbabno @ 172 0x00000000

ub2 kcrbabof @ 176 0x0000

ub1 kcvcpetb [0] @ 180 0x00

ub1 kcvcpetb [1] @ 181 0x00

ub1 kcvcpetb [2] @ 182 0x00

ub1 kcvcpetb [3] @ 183 0x00

ub1 kcvcpetb [4] @ 184 0x00

ub1 kcvcpetb [5] @ 185 0x00

ub1 kcvcpetb [6] @ 186 0x00

Page 13: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

ub1 kcvcpetb [7] @ 187 0x00

ub4 kcvfhbhz @ 312 0x00000000

struct kcvfhxcd, 16 bytes @ 316

ub4 space_kcvmxcd [0] @ 316 0x00000000

ub4 space_kcvmxcd [1] @ 320 0x00000000

ub4 space_kcvmxcd [2] @ 324 0x00000000

ub4 space_kcvmxcd [3] @ 328 0x00000000

word kcvfhtsn @ 332 10 Tablespace #

ub2 kcvfhtln @ 336 0x000f

text kcvfhtnm [0] @ 338 W TABLESPACE_NAME

text kcvfhtnm [1] @ 339 E

text kcvfhtnm [2] @ 340 _

text kcvfhtnm [3] @ 341 W

text kcvfhtnm [4] @ 342 I

text kcvfhtnm [5] @ 343 L

text kcvfhtnm [6] @ 344 L

text kcvfhtnm [7] @ 345 _

text kcvfhtnm [8] @ 346 L

text kcvfhtnm [9] @ 347 O

text kcvfhtnm [10] @ 348 S

text kcvfhtnm [11] @ 349 T

text kcvfhtnm [12] @ 350 _

text kcvfhtnm [13] @ 351 I

text kcvfhtnm [14] @ 352 T

text kcvfhtnm [15] @ 353

text kcvfhtnm [16] @ 354

text kcvfhtnm [17] @ 355

text kcvfhtnm [18] @ 356

text kcvfhtnm [19] @ 357

text kcvfhtnm [20] @ 358

Page 14: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

text kcvfhtnm [21] @ 359

text kcvfhtnm [22] @ 360

text kcvfhtnm [23] @ 361

text kcvfhtnm [24] @ 362

text kcvfhtnm [25] @ 363

text kcvfhtnm [26] @ 364

text kcvfhtnm [27] @ 365

text kcvfhtnm [28] @ 366

text kcvfhtnm [29] @ 367

ub4 kcvfhrfn @ 368 0x00000009

struct kcvfhrfs, 8 bytes @ 372

ub4 kscnbas @ 372 0x00000000

ub2 kscnwrp @ 376 0x0000

ub4 kcvfhrft @ 380 0x00000000

struct kcvfhafs, 8 bytes @ 384

ub4 kscnbas @ 384 0x00000000

ub2 kscnwrp @ 388 0x0000

ub4 kcvfhbbc @ 392 0x00000000

ub4 kcvfhncb @ 396 0x00000000

ub4 kcvfhmcb @ 400 0x00000000

ub4 kcvfhlcb @ 404 0x00000000

ub4 kcvfhbcs @ 408 0x00000000

ub2 kcvfhofb @ 412 0x0000

ub2 kcvfhnfb @ 414 0x0000

ub4 kcvfhprc @ 416 0x2cadcee3 prev reset logs count

struct kcvfhprs, 8 bytes @ 420 prev reset scn

ub4 kscnbas @ 420 0x000a2af7

ub2 kscnwrp @ 424 0x0000

struct kcvfhprfs, 8 bytes @ 428

ub4 kscnbas @ 428 0x00000000

Page 15: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

ub2 kscnwrp @ 432 0x0000

ub4 kcvfhtrt @ 444 0x00000000

/ * The above kcvfh structure is the main data file header information, which

ub4 kcvfhrlc (offset 112) recorded the resetlogs count,

The struct kcvfhrls 8 bytes (offset 116) recorded the resetlogs scn * /

/ * The next issue will be the head of the data file and kcvfhrls information

kcvfhrlc modified and the 1st document, as

To let that deceive Oracle data files involved in the last RESETLOGS * /

BBED> set offset 112

OFFSET 112

/ * When using bbed modify when the need to pay attention to where the platform

endian, Linux using Little Endian * /

BBED> modify / x 87e8

File: / flashcard / wwli.dbf (0)

Block: 1 Offsets: 112 to 623 Dba: 0x00000000

-------------------------------------------------- ----------------------

87e8ad2c 867f0a00 00000000 00000000 00000000 00000000 00000000 03000000

0,000,000,002,000,000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 0a000000

0f005745 5f57494c 4c5f4c4f 53545f49 54000000 00000000 00000000 00000000

0,900,000,000,000,000 00000000 00000000 00000000 00000000 00000000 00000000

Page 16: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

00000000 00000000 00000000 00000000 e3cead2c f72a0a00 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 f7880a00 00000000 44e7ad2c

01000160 01000000 6f0c0000 10000000 02000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

<32 bytes per line>

BBED> p kcvfhrlc

ub4 kcvfhrlc @ 112 0x2cade887

BBED> set offset 116

OFFSET 116

BBED> modify / x 0xf988

File: / flashcard / wwli.dbf (0)

Block: 1 Offsets: 116 to 627 Dba: 0x00000000

-------------------------------------------------- ----------------------

f9880a00 00000000 00000000 00000000 00000000 00000000 03000000 00000000

0,200,000,000,000,000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 0a000000 0f005745

5f57494c 4c5f4c4f 53545f49 54000000 00000000 00000000 00000000 09000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 e3cead2c f72a0a00 00000000 00000000 00000000

Page 17: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 f7880a00 00000000 44e7ad2c 01000160

01000000 6f0c0000 10000000 02000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

<32 bytes per line>

BBED> p kcvfhrls

struct kcvfhrls, 8 bytes @ 116

ub4 kscnbas @ 116 0x000a88f9

ub2 kscnwrp @ 120 0x0000

/ * Also need to kcvfhckp structure kcvcpscn thing into the same document with

the 1st resetlogs scn,

Otherwise recover data files that may arise when

ORA-00600: internal error code, arguments: [2608], [1], [0], [690423], [0],

[690425], [], [] error * /

BBED> set offset 484

OFFSET 484

BBED> modify / x 0xf9

File: / flashcard / wwli.dbf (0)

Block: 1 Offsets: 484 to 995 Dba: 0x00000000

-------------------------------------------------- ----------------------

f9880a00 00000000 44e7ad2c 01000160 01000000 6f0c0000 10000000 02000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

Page 18: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

0d000d00 0d000100 00000000 00000000 00000000 02004002 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

<32 bytes per line>

BBED> p kcvfhckp

struct kcvfhckp, 36 bytes @ 484

struct kcvcpscn, 8 bytes @ 484

ub4 kscnbas @ 484 0x000a88f9

ub2 kscnwrp @ 488 0x0000

ub4 kcvcptim @ 492 0x2cade744

ub2 kcvcpthr @ 496 0x0001

union u, 12 bytes @ 500

struct kcvcprba, 12 bytes @ 500

ub4 kcrbaseq @ 500 0x00000001

ub4 kcrbabno @ 504 0x00000c6f

ub2 kcrbabof @ 508 0x0010

ub1 kcvcpetb [0] @ 512 0x02

ub1 kcvcpetb [1] @ 513 0x00

Page 19: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

ub1 kcvcpetb [2] @ 514 0x00

ub1 kcvcpetb [3] @ 515 0x00

ub1 kcvcpetb [4] @ 516 0x00

ub1 kcvcpetb [5] @ 517 0x00

ub1 kcvcpetb [6] @ 518 0x00

ub1 kcvcpetb [7] @ 519 0x00

BBED> sum

Check value for File 0, Block 1:

current = 0xb897, required = 0xb899

/ * Use sum apply commands to modify the data block checksum value * /

BBED> sum apply

Check value for File 0, Block 1:

current = 0xb899, required = 0xb899

SQL> alter database datafile '/ flashcard / wwli.dbf' online;

alter database datafile '/ flashcard / wwli.dbf' online

*

ERROR at line 1:

ORA-01113: file 9 needs media recovery

ORA-01110: data file 9: '/ flashcard / wwli.dbf'

/ * Perfectly recover datafile 9, because the data in the data file itself is

"clean",

Only datafile header information in resetlogs inconsistent with other

datafile only * /

SQL> recover datafile 9;

Page 20: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

Maclean_Liu (Liu Bing)

concern - 0

Followers - 2

+ Plus interest

0 0

(Please make

evaluations of the

article)

Media recovery complete.

SQL> select * from v $ recover_file where file # = 9;

no rows selected

SQL> select count (*) from lost_data;

COUNT (*)

----------

51791

/ * That's great!

Although we can also use adjust_scn and setting the hidden parameter

"_allow_resetlogs_corruption" to try to resolve ORA-01189 error, but avoid using bbed use

"_allow_resetlogs_corruption" this dangerous argument, and after more perfectly recover

recover data files. Note that the data file using bbed fix the problem does not guarantee

necessarily succeed, you must perform before using bbed necessary backup and operated

under the guidance of professionals!

Green Channel: Good Man To top concern I

Collect this article contact me

« Previous: row-based tracking ROWDEPENDENCIES ORA_ROWSCN information

Page 21: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

>> Next: Exadata Hybrid Columnar Compression how to handle INSERT and UPDATE

Posted on 2013-03-19 00:47 Maclean_Liu (Liu Bing) reading ( 14) Comments ( 0 ) Edit

Collection

Refresh comments refresh the page Back to top

Registered users logged in to post comments, please log in or register , visit Home.

Blog Home Park Bo asked NEWS FLASH Programmer Job Knowledge

CareerBuilder DAY 2013

www.careerbuilder.vn/careerday

Cơ hội không thể bỏ qua tại sự kiện nghềnghiệp lớn nhất Việt Nam.

Latest IT News :

· Blackberry release low-end models 9720

· Taobao platform restrictions introduced the New Deal for cheap drainage called unintentional

"kill" shopping guide website

· news that Jin will jointly perfection and swim to the mainland market, the game launched

infringement activist

· Google doctrine vs Apple doctrine

· mobile developers love money, but love accomplishment

>> More news ...

Latest Knowledge Base articles :

· I am now so programmed

· How do jQuery-free?

· How to become an outstanding entrepreneurs CEO

Page 22: Use Bbed Resolve ORA-01189 Error - Maclean_Liu (Liu Bing) - Blog Park

· decade ago, Java enterprise application development world

· focus on doing one thing

» More Knowledge Base article ...

Cài đặt iOs chuyên nghiệpVietshop cài đặt phần mềmbản quyền trên mọi phiên bản sản phẩm Apple

vietshop.pro.vn

Powered by: blog Park Copyright © Maclean_Liu (Liu Bing)