Posts

Showing posts from 2010

DB2 Miscellania

We (the current project I am working on) are in the process of migrating an existing ITIM database from Oracle 10g to DB2 9.1. This is still a work in progress, and something I want to write about simply because it hasn't been done (to the best of my knowledge). Not even the ITIM engineers I checked with have ever heard of a customer converting their database after the fact. In any case, I have had to learn a little more about DB2 and one of the more useful tasks that I've had to learn is how to clear all of the records out of a table. My first attempt was to simply call  ' DELETE FROM TABLE '. This may work for small tables, but does not work for larger tables, simply because DB2 has to keep a transaction log in case of a rollback. If the size of the table is larger than the size of your transaction logs this simply does not work. As an alternative, you can use an import statement such as: ' IMPORT FROM /dev/null OF DEL REPLACE INTO TABLE '. This does an im...