By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,756 Members | 1,760 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,756 IT Pros & Developers. It's quick & easy.

Triggers crashing database ?

P: n/a
Hi!

I have one table that tells me what data should be deleted. A procedure goes
over this table and deletes the data. After deleting a row an after delete
trigger is fired and inserts a row in another table, so we know what got
deleted. The problem is that sometimes these trigger crashed the database
and I get this error in db2diag.log:
RETCODE : ZRC=0x8602001A=-2046689254=SQLB_BADD "Bad Database, Can't flush"
DIA8427C The database has been marked as being damaged.

All connections are forced and crash recovery is initiated.
When I recreate that trigger everything is ok.

Any clues ?

Best regards,
Kovi
--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
| Gregor Kovac | Gr**********@mikropis.si |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
Mar 28 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Gregor Kovač wrote:
Hi!

I have one table that tells me what data should be deleted. A procedure
goes over this table and deletes the data. After deleting a row an after
delete trigger is fired and inserts a row in another table, so we know
what got deleted. The problem is that sometimes these trigger crashed the
database and I get this error in db2diag.log:
RETCODE : ZRC=0x8602001A=-2046689254=SQLB_BADD "Bad Database, Can't flush"
DIA8427C The database has been marked as being damaged.

All connections are forced and crash recovery is initiated.
When I recreate that trigger everything is ok.

Any clues ?

Best regards,
Kovi

I just found out that there were three aditional triggers (update, delete,
insert) that were inserting rows in a table with over 22 million rows. Then
I dropped them and everything was ok. Hmm....

Kovi
--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
| Gregor Kovac | Gr**********@mikropis.si |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~
Mar 28 '06 #2

P: n/a
Gregor Kovač wrote:
Gregor Kovač wrote:
Hi!

I have one table that tells me what data should be deleted. A procedure
goes over this table and deletes the data. After deleting a row an after
delete trigger is fired and inserts a row in another table, so we know
what got deleted. The problem is that sometimes these trigger crashed the
database and I get this error in db2diag.log:
RETCODE : ZRC=0x8602001A=-2046689254=SQLB_BADD "Bad Database, Can't flush"
DIA8427C The database has been marked as being damaged.

All connections are forced and crash recovery is initiated.
When I recreate that trigger everything is ok.

Any clues ?

Best regards,
Kovi

I just found out that there were three aditional triggers (update, delete,
insert) that were inserting rows in a table with over 22 million rows. Then
I dropped them and everything was ok. Hmm....

Kovi

Kovi,

That doesn't smell right. Please open a PMR so we can get to the bottom
of this.

Cheers
Serge
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Mar 28 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.