Amazon deals

Showing posts with label sql error 3304. Show all posts
Showing posts with label sql error 3304. Show all posts

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.