Skip to main content

New answers tagged

2 votes
Accepted

DB2 TRIGGER "FOR EACH STATEMENT", with "AFTER UPDATE OR INSERT" gives SQL code -104, SQL state 42601

According to the docs, if multiple events are specified (and you specify two, update or insert), then the triggered action has to be a compiled statement (i.e. cannot be "Begin atomic"). ...
mao's user avatar
  • 217
0 votes

How to update rows in GENERATED ALWAYS FOR EACH ROW ON UPDATE AS ROW CHANGE TIMESTAMP without changing timestamp

As far as I know, there's no easy way to do it. I don't believe you can alter an existing column to ROW CHANGE TIMESTAMP, but you can ADD a column with it. You could try (I haven't tested this) ALTER ...
Greg's user avatar
  • 56
0 votes

DB2 Tablespace has no space SQLcode -960 SQLState=57011

If that is the correct error message, my guess is you are creating all your tables, maybe indexes etc. in IS_SMALL_TS tablespace. Straight from the manual: SQL0960C The maximum number of objects have ...
Greg's user avatar
  • 56
1 vote
Accepted

Need to create a duplicate table in a separate schema automatically whenever a new table is being created

The solution could be to use Db2 ATS (or any other scheduler) and the undocumented SYSPROC.DB2LK_GENERATE_DDL routine, which may be called for every table existing in your schema A and not existing in ...

Top 50 recent answers are included