From: Joachim Klassen on 19 Feb 2007 11:21 On 16 Feb., 23:28, "morch" <f...(a)mairhtin.com> wrote: > C'MON... SOMEONE must have an answer to this. :) Please!! > > Mairhtin > > On Jan 30, 10:10 am, "morch" <f...(a)mairhtin.com> wrote: > > > Hello, > > > I have an oddity on a production database. I get the following from > > the DB CFG : > > > Backup pending = NO > > > Database is consistent = NO > > Rollforward pending = TABLESPACE > > Restore pending = NO > > > but no tablespaces are in a state other than 0 when I do a list > > tablespaces show detail. ????? > > > How can I find out which tablespace is in conflict? > > > Mairhtin O'Feannag > > > aka mairhtin at mairhtin dot com Weird - a pragmatic method to test it would be: Just pick by random a table from each tablespace and do a "select * with fetch first 1 rows only". If all selects work well then db2 cfg lies - if not you'll know which tablespace has a problem. You can generate the necessary select with a sql query like this: with temp1 as (SELECT max(rtrim(tabschema) concat '.' concat rtrim(TABNAME)) as TABNAME,TBSPACEID FROM SYSCAT.TABLES where tbspaceid > 0 group by tbspaceid) select 'SELECT * FROM ' concat tabname concat ' FETCH FIRST 1 ROWS ONLY;' as SELECT_STMT from temp1 This method will not cover tablespaces where only indexes are stored in. In this case you will need to modify the selects in such a way that an index access will happen HTH Joachim
From: tony.sardina on 19 Feb 2007 16:56
On Feb 19, 10:21 am, "Joachim Klassen" <JoKlas...(a)email.com> wrote: > On 16 Feb., 23:28, "morch" <f...(a)mairhtin.com> wrote: > > > > > C'MON... SOMEONE must have an answer to this. :) Please!! > > > Mairhtin > > > On Jan 30, 10:10 am, "morch" <f...(a)mairhtin.com> wrote: > > > > Hello, > > > > I have an oddity on a production database. I get the following from > > > the DB CFG : > > > > Backup pending = NO > > > > Database is consistent = NO > > > Rollforward pending = TABLESPACE > > > Restore pending = NO > > > > but no tablespaces are in a state other than 0 when I do a list > > > tablespaces show detail. ????? > > > > How can I find out which tablespace is in conflict? > > > > Mairhtin O'Feannag > > > > aka mairhtin at mairhtin dot com > > Weird - a pragmatic method to test it would be: > > Just pick by random a table from each tablespace and do a "select * > with fetch first 1 rows only". If all selects work well then db2 cfg > lies - if not you'll know which tablespace has a problem. You can > generate the necessary select with a sql query like this: > with temp1 as > (SELECT max(rtrim(tabschema) concat '.' concat rtrim(TABNAME)) as > TABNAME,TBSPACEID > FROM SYSCAT.TABLES where tbspaceid > 0 > group by tbspaceid) > select 'SELECT * FROM ' concat tabname concat ' FETCH FIRST 1 ROWS > ONLY;' as SELECT_STMT from temp1 > > This method will not cover tablespaces where only indexes are stored > in. In this case you will need to modify the selects in such a way > that an index access will happen > > HTH > Joachim http://www-1.ibm.com/support/docview.wss?rs=71&context=SSEPGG&q1=%22Rollforward+pending+TABLESPACE%22&uid=swg1IY85495&loc=en_US&cs=utf-8&lang=en Looks like a known bug. I have a couple production databases showing the same thing. -T |