Re: Removing a DBSpace
Posted in 1997
Gary Duzan wrote: > > I'm having some trouble removing a DBSpace from an old Online 5.0x > server. I created a temporary space to test some things, finished > the testing, and deleted the database I had created, but it complains > that the space isn't empty. Here is the "tbcheck -pe" output: > > Chunk: 4 /dev/rtempdblv Size Used > Free > 262144 7874 > 254270 > > Disk usage for Chunk 4 Start Length > ------------------------------------------- --------- --------- > OTHER RESERVED Pages 0 2 > CHUNK FREE LIST PAGE 2 1 > TBLSPACE TBLSPACE 3 5247 > FREE 5250 19928 > FREE 27802 234342 > > Using "tbcheck -pP" to look at the bit between the FREE regions it looks > like the area is also FREE, but the space doesn't know it. Is there any > way to get rid of this space without going in with a binary editor and > tweaking the numbers in the chunk tables? I'd really prefer not to > attempt that for obvious reasons. Thanks. > > Gary D. Duzan Gary, here's the popular method without binary tweaking, though tbpatch is lots of fun to use. Slightly more exiting than the upside-down roller coaster. (BTW, the tweak would be on the dbspace page, not on the chunk page.) Create a dummy instance with smallish chunks 1, 2, 3 on flat files. Then, in that dummy instance, create chunk 4 exactly overlaying the chunk 4 of your current instance - the troublesome one. When OnLine intiailizes this chunk 4 in the dummy instance, it will be pristine, with no page unaccounted for. Then shut down the dummy instance. You will find that chunk 4 in the live OnLine instance is now clear of all data and anything remotely resembling data. The dbspace can now be removed. What happens is that OnLine knows what an empty chunk's "free page" list is supposed to look like. This got corrupted in your instance; what I am suggesting will clear it. Just be happy it wasn't chunk 50! -- -- Jake (Brain surgeon studying to be a plumber) . . _..-'( )`-.._ ./'. '||\\\\. }\\_/{ .//||` .`\\. ./'.|'.'||||\\\\|.. )o o( ..|//||||`.`|.`\\. ./'..|'.|| |||||\\`````` \\'@'/ ''''''/||||| ||.`|..`\\. ./'.||'.|||| ||||||||||||. | .|||||||||||| ||||.`||.`\\. /'|||'.|||||| ||||||||||||{ | }|||||||||||| ||||||.`|||`\\ '.|||'.||||||| ||||||||||||{ | }|||||||||||| |||||||.`|||.` '.||| ||||||||| |/' ``\\||`` | ''||/'' `\\| ||||||||| |||.` |/' \\./' `\\./ \\!|\\ /|!/ \\./' `\\./ `\\| V V V }' `\\ /' `{ V V V \\ \\ \\ V / / / +-----------------------------------------------------------+ | Impeccable Logic: A thought process which successfully | | resists chicken bites | +-----------------------------------------------------------+