DB2 LUW: OFFLINE (vs) ONLINE Load

Problem statement:

I am seeing below from output of “db2 list utilities show detail”. Can you please explain why it’s OFFLINE load?

OFFLINE LOAD DEL AUTOMATIC INDEXING INSERT NON-RECOVERABLE PROD.CUSTOMER

Answer:

User is trying to do “LOAD INSERT” with out allowing READ Access, something like below:

db2 “LOAD from <filename> MODIFIED BY COLDEL<column delimiter> MESSAGES <messages.out> INSERT INTO PROD.CUSTOMER”

(or)
db2 “LOAD from <filename> MODIFIED BY COLDEL<column delimiter> MESSAGES <messages.out> INSERT INTO PROD.CUSTOMER ALLOW NO ACCESS”

Note: By default LOAD INSERT restricts access to the table. This is the same scenario here.

To convert load into ONLINE mode, we have to add “ALLOW READ ACCESS” clause as below:

db2 “LOAD from <filename> MODIFIED BY COLDEL<column delimiter> MESSAGES <messages.out> INSERT INTO PROD.CUSTOMER ALLOW READ ACCESS

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: