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

Corrupt Trigger Nameless

P: n/a
Hello,

I'm having a big problem on one very important table in the system I'm
developing. Everything started when I tried to insert some columns to
this table, and AS400 DB2 told me that there was a corrupt trigger. So
I recreated the triggers for that table and nothing happened. I've
retaken this issue now and did a Generate SQL thru the iSeries Nav and
got a nameless trigger. WHAT the hell I said! ... I was supposed to
recreate that table with all the data and triggers, but I prefer to
just try to delete this trigger. Now since I don't have a name for the
trigger:

(this is how I got it from the iSeries)
CREATE TRIGGER
AFTER INSERT ON MY_TABLE
REFERENCING NEW AS INSERTED

I can't do a drop trigger directly right? Now I do know that there are
some files where one can find this relationships between the table and
the triggers. If I could somehow manually edit those files, maybe I
can get this error fixed right?

Now, the reasons why it got nameless, we have no clue on that also.
Has anyone seen something like this?

I'm not that experienced in as400 Db2 so answers for newbies please!
=)

Thanks a lot in advance
KATLIM

Jul 2 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
As far as I saw "DB2 for iSeries SQL Reference Version 5", from syntax
of CREATE TRIGGER, trigger-name is mandatory.
>>-- CREATE TRIGGER -- trigger-name -- [NO CASCADE] BEFORE | AFTER --->
-- INSERT | DELETE | UPDATE -- ON table-name -->
......

So, if iSeries Nav generated nameless trigger, that might be bug of
iSeries Nav. And, if DB2 iSeries itself accepts nameless TRIGGER, that
might be bug of DB2 for iSeries.

Jul 2 '07 #2

P: n/a
kr***@tss.com.pe wrote:
[...]
I can't do a drop trigger directly right?
Just a thought, try:

drop trigger <schema>." "

I have no idea if it will work, but i might be worth a try

/Lennart

[...]
Jul 2 '07 #3

P: n/a
kr***@tss.com.pe wrote:
I'm having a big problem on one very important table in the system I'm
developing. Everything started when I tried to insert some columns to
this table, and AS400 DB2 told me that there was a corrupt trigger. So
I recreated the triggers for that table and nothing happened. I've
retaken this issue now and did a Generate SQL thru the iSeries Nav and
got a nameless trigger. WHAT the hell I said! ... I was supposed to
recreate that table with all the data and triggers, but I prefer to
just try to delete this trigger. Now since I don't have a name for the
trigger:

(this is how I got it from the iSeries)
CREATE TRIGGER
AFTER INSERT ON MY_TABLE
REFERENCING NEW AS INSERTED

I can't do a drop trigger directly right? Now I do know that there are
some files where one can find this relationships between the table and
the triggers. If I could somehow manually edit those files, maybe I
can get this error fixed right?

Now, the reasons why it got nameless, we have no clue on that also.
Has anyone seen something like this?

I'm not that experienced in as400 Db2 so answers for newbies please!
=)

Thanks a lot in advance
KATLIM
Perhaps discovery what name it is being used may help - on DB2 UDB you
could use:

SELECT SCHEMA,NAME,DEFINER,QUALIFIER from SYSIBM.SYSTRIGGERS

You could verify exactly what name is by replacing NAME with HEX(NAME)
in above query.

You can check column names and properties of SYSIBM.SYSTRIGGERS catalog
table by describing it:

DESCRIBE TABLE SYSIBM.SYSTRIGGERS
Jan M. Nelken
Jul 2 '07 #4

P: n/a
You know that that nameless trigger didn't show on the iSeries Nav. So
probably i wasn't gonna be able to do any selects or describes ... My
guess is that the cross reference files got corrupted (which it seems
that internally they are called somehow) ... In the end I had to
recreate the table, did a drop table and recreated everything. That
obviously fixed it.

Thanks all for replying
KATLIM

Jul 4 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.