Amazon deals

Wednesday, September 10, 2008

Don't move a database that has it's tables linked in db2

Hey guys, don't make the mistake I did by trying to move a database that has its tables linked. You'll get an sql error numbered 3304.

LOAD is a very fast and direct way to get data from a file residing in the file system into a table in your database. LOAD does not use SQL INSERT statements, as does IMPORT. Instead, it writes the data directly to the data pages in the tablespace. Additionally, less logging occurs to further improve performance of the load process.

So, we need to keep the behavior of LOAD itself in mind. If there are any dependent tables (tables that have a foreign key referencing the table into which data is to be loaded, for example), they might be placed in the CHECK PENDING state. Additionally, further constraints could also result in the table not being available right after the LOAD operation, requiring you to run the SET INTEGRITY SQL statement first.

So, you could either set INTEGRITY SQL or you could do the mapping in your buisness logic using entity beans.

3 comments:

  1. [...] - Don’t move a database that has it’s tables linked in db2 saved by MagicWolf642008-10-03 - Migrating from Wordpress to Joomla saved by [...]

    ReplyDelete
  2. It's perfect time to make some plans for the long run and it is time to be happy. I have read this put up and if I may I wish to counsel you few attention-grabbing issues or tips. Maybe you can write next articles regarding this article. I want to read even more things approximately it!

    ReplyDelete