CREATE TABLE X ( myid DECIMAL(10) GENERATED BY DEFAULT AS IDENTITY (START WITH 0, INCREMENT BY 1, NO CACHE), ... );
fetch first N rows only kann man native dem DB2 sagen, dass nur die ersten N Zeilen interessieren.
catalog tcpip node <mynodename> remote db001.noc.goebl.com server 50190 catalog db <mydbname> at node <mynodename>
list db directory list node directory
A string representation of a timestamp is a string that starts with a digit and has a length of at least 16 characters. The complete string representation of a timestamp has the form yyyy-mm-dd-hh.mm.ss.nnnnnn. Trailing blanks may be included. Leading zeros may be omitted from the month, day, and hour part of the timestamp, and microseconds may be truncated or entirely omitted. If any trailing zero digits are omitted in the microseconds portion, an implicit specification of 0 is assumed for the missing digits. Thus, 1991-3-2-8.30.00 is equivalent to 1991-03-02-08.30.00.000000.
db2 -c ==> automatic commit -t ==> semicolon as separator -s ==> stop after error -f sqlfile -l logfile -z outputfile
db2 => connect to dbname user username using password db2 => update monitor switches using statement on db2 => create event monitor rkmon for statements write to table db2 => set event monitor rkmon state=1 (schaltet den Monitor ein)
db2 => set event monitor rkmon state=0 (schaltet den Monitor aus)
db2 => select START_TIME,FETCH_COUNT,ROWS_READ,STMT_TEXT from STMT_RKMON order by rows_read desc;