This is a discussion on bad page within the Informix forums, part of the Database Server Software category; --> Hi all, I can't unload a certain table. Doing an oncheck -cDI database:table, the system gives a bad page ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Danny De Koster wrote: > Hi all, > > I can't unload a certain table. Doing an oncheck -cDI database:table, the > system gives a bad page error. > How can I resolve this or where can I find information on this topic. > > thanks, > Danny > > Version of IDS? O/S? Well, sounds like you have a "bad page". Is it a data page or an index page? Does oncheck -cD database:table show an error? If not, then you have a bad index page, and the oncheck -cDI should have told you which index was bad, then you can just drop and re-create the index. If oncheck -cD database:table does show an error, then you have a bad data page You should receive various bits of information when the engine encounters a bad page; What does the online.log show? Is an af file produced? You would need to unload around the bad data page. Not at work, so can't easily give you an example (amazingly nothing on google either, or of the IBM search support site) |
| |||
| Version 7.30 Linux SuSe. How to get around of the bad table? Yes I get the error doing oncheck -cD database:table "TBP" <TheBigPotato@NotHere.Co.Uk> schreef in bericht news:1pR0g.27130$zf1.12793@newsfe5-gui.ntli.net... > Danny De Koster wrote: >> Hi all, >> >> I can't unload a certain table. Doing an oncheck -cDI database:table, the >> system gives a bad page error. >> How can I resolve this or where can I find information on this topic. >> >> thanks, >> Danny >> >> > Version of IDS? > O/S? > > Well, sounds like you have a "bad page". > > Is it a data page or an index page? > > Does oncheck -cD database:table show an error? > If not, then you have a bad index page, and the oncheck -cDI should have > told you which index was bad, then you can just drop and re-create the > index. > > If oncheck -cD database:table does show an error, then you have a bad data > page > You should receive various bits of information when the engine encounters > a bad page; > > What does the online.log show? > Is an af file produced? > > You would need to unload around the bad data page. > > Not at work, so can't easily give you an example (amazingly nothing on > google either, or of the IBM search support site) |
| |||
| Danny De Koster wrote: >You would need to unload around the bad data page. Unload to good.out select rowid from <table>; If this errors the last rowid in the table should be your last good before the bad page. then try to select rowid > than this until you get to the max rowid or you don't have any errors. This will be the first good rowid after the bad page. Then unload the records with the following unload to good_recs.out select * from <table> where rowid not between <first_bad_page> and <last_bad_page> ; You have all of the data that you can get without doing a restore before the page was corrupted and rolling the logs. |
| |||
| <david@smooth1.co.uk> wrote in message news:1145307003.742249.161280@v46g2000cwv.googlegr oups.com... > > "How to get around of the bad table? " > > Restore from a backup > or > Get IBM to dial in and fix it. Or isolate the rowids of the row(s) affected by the bad page and use rangges to unload all but those, drop and re-create the table then load the uncorrupted rows back in. |
| |||
| thanks for the tips guys !!!! "bozon" <curtis@crowson1.com> schreef in bericht news:1145303901.622126.233710@g10g2000cwb.googlegr oups.com... > Danny De Koster wrote: >>You would need to unload around the bad data page. > > Unload to good.out select rowid from <table>; > > If this errors the last rowid in the table should be your last good > before the bad page. > > then try to select rowid > than this until you get to the max rowid or > you don't have any errors. This will be the first good rowid after the > bad page. > > Then unload the records with the following > > unload to good_recs.out select * from <table> where rowid not between > <first_bad_page> and <last_bad_page> ; > > You have all of the data that you can get without doing a restore > before the page was corrupted and rolling the logs. > |