dbTalk Databases Forums  

activate not logged initially - bug or feature?

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss activate not logged initially - bug or feature? in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bughunter@ru
 
Posts: n/a

Default activate not logged initially - bug or feature? - 05-19-2006 , 01:20 AM






I'm sorry but previously command

ALTER TABLE tbl ACTIVATE NOT LOGGED INITIALLY

on table created without NOT LOGGED INITIALLY option was impossible.
Or not?

IMHO, more better give error or warning on this statement for table
created wihtout NOT LOGGED INITIALLY.

Andy


Reply With Quote
  #2  
Old   
Serge Rielau
 
Posts: n/a

Default Re: activate not logged initially - bug or feature? - 05-19-2006 , 01:32 AM






bughunter@ru wrote:
Quote:
I'm sorry but previously command

ALTER TABLE tbl ACTIVATE NOT LOGGED INITIALLY

on table created without NOT LOGGED INITIALLY option was impossible.
Or not?

IMHO, more better give error or warning on this statement for table
created wihtout NOT LOGGED INITIALLY.
You are correct that this used to be teh case.
However to perform such an alter you need at leats control over the
table and the amount of damage that can be done is no bigger (or
smaller) than using a LOAD REPLACE with empty table.
So there was really no point in an error.
Warnings in my experience get either ignored by customers or treated
like error....

Either way, it is what it is now. There is no going back.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab


Reply With Quote
  #3  
Old   
bughunter@ru
 
Posts: n/a

Default Re: activate not logged initially - bug or feature? - 05-19-2006 , 08:13 AM



I'm customer too and don't ignore any warnings :-) But I was very
surprised when a some numbers of table was in inconsistence state after
restore from online backup. And it was very important tables. Yes, it
was a bug in my script - I made mistake in schema name. But no way to
detect this sutiation. For example, I can detect tables with not logged
property and can use this attribute to avoid sutiation with lost
table/data after restore from online backup. Currently this property is
not useful :-(.

Another question - how detect inconsistence tables after restore?

Andy


Reply With Quote
  #4  
Old   
Lennart
 
Posts: n/a

Default Re: activate not logged initially - bug or feature? - 05-19-2006 , 03:26 PM




bughunter@ru wrote:
Quote:
I'm customer too and don't ignore any warnings :-) But I was very
surprised when a some numbers of table was in inconsistence state after
restore from online backup. And it was very important tables. Yes, it
was a bug in my script - I made mistake in schema name. But no way to
detect this sutiation. For example, I can detect tables with not logged
property and can use this attribute to avoid sutiation with lost
table/data after restore from online backup. Currently this property is
not useful :-(.

Another question - how detect inconsistence tables after restore?

Dont know whether restore is a special case, but status is normally
what I look for

select tabschema, tabname, status from syscat.tables where status <>
'N'


/Lennart



Reply With Quote
  #5  
Old   
bughunter@ru
 
Posts: n/a

Default Re: activate not logged initially - bug or feature? - 05-25-2006 , 12:59 AM



Status = 'N'. I have no idea how found a tables with

[IBM][CLI Driver][DB2/NT] SQL1477N Table "LOADING.ACCNTAB" cannot be
accessed. SQLSTATE=55019

Only one method - create script with select from all tables

select 'select 1 from ' || CREATOR ||'.'||name||' fetch first row
only;'
from SYSIBM.SYSTABLES
where creator not like 'SYS%' and type = 'T'
;

then run and check. But for db with more 1K tables it's a very long
process.

2ibm team - what's do you think? Why are you change a normal working
ability?
More better do storing a original text (format) for
view/trigger/function.

Andy


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.