Today’s blog is about load using database option of load cursor
When would I use this option?
I don’t have federation license.
I don’t have enough disk space for exports.
I want ease of use (No federation setup).
I want better performance as this load type uses fewer layers then federation. If source tables and target tables are on DPF and loads can fetch the data in parallel.
It’s mandatory for databases to be cataloged.
The data types have to be compatible between source and target databases.
How to do:
1. Connect to the target database
2. Declare the cursor
3. Run the load command
As you see load aborted with SQL1188N since the first column of table inventory in source and target is not same data types. Change the column type of first column , recreate the table at target and run the load command again. Another thing is to make sure for load to execute successfully , it should have same sequence of columns in both declare cursor and load statement.
After correcting the data type we repeat the following steps:
1. Recreate the table inventory
2. Rerun the load steps
We see the load finished successfully.
1. The load METHOD N option is not supported.
2. The usedefaults file type modifier is not supported
Tip of the week : db2 9.7 onwards allows you to create the index with compression even if table is not created as compressed table.