Load using database option of load cursor

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.
Restrictions :
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.


  1. Hello , you are awsome writer, i love your site
    MMA odds

  2. Enrique Guzman

    I feel chosen to be currently working with a DB2 DBA magnate
    such as Renu. Not only is she very knowledgeable in the DB2 arena, but she doesn’t hesitate to share that knowledge with her peers.
    She has pulled me out of some very tight spots in Production.
    My most recent occurrence is when she recommended using the Load using the Database option of Load Cursor. I completed a Production request in no time.
    Renu is an asset to the DB2 world,


Leave a CommentLeave a Reply to thefightbetting