472,780 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,780 software developers and data experts.

LOAD and LOAD with AMDIN_CMD

Hi!

I've tried LOAD .... INSERT INTO TABLE_NAME. The docs say about INSERT
option:
"One of four modes under which the load utility can execute. Adds the loaded
data to the table without changing the existing table data."

But when I do LOAD I get this in my message file:
Number of rows read = 671
Number of rows skipped = 0
Number of rows loaded = 671
Number of rows rejected = 0
Number of rows deleted = 669
Number of rows committed = 671

Why there are 669 rows being deleted? If rows are being deleted, can I
assume that this is similar to INSERT_UPDATE option with IMPORT?

I've tried to use LOAD with ADMIN_CMD command, but find it not very useful,
because the result set returned by this procedures gives me a MSG_RETRIEVAL
SQL. With this SQL I can get SQLCODE and MSG to get messages. The problem
is that my message file has:
--------------------------------------------------------------------------
SQL3501W The table space(s) in which the table resides will not be placed
in
backup pending state since forward recovery is disabled for the database.

SQL3109N The utility is beginning to load data from file
"/home/gregor/Apps/BLAGAJNA/IMPORT/10.07.2007_15.29.29.887/PODROCJE.IXF".

SQL2036N The path for the file or device
"/home/gregor/Apps/BLAGAJNA/IMPORT/10.07.2007_15.29.29.887/PODROCJE.IX" is
not
valid.

SQL3107W There is at least one warning message in the message file.
Number of rows read = 0
Number of rows skipped = 0
Number of rows loaded = 0
Number of rows rejected = 0
Number of rows deleted = 0
Number of rows committed = 0
--------------------------------------------------------------------------

but MSG_RETRIEVAL SQL only gives me:
SQL3107W There is at least one warning message in the message file.

Why? where is the problem?

Best regards,
Kovi
--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Jul 11 '07 #1
7 3701
Gregor Kovač wrote:
But when I do LOAD I get this in my message file:
Number of rows read = 671
Number of rows skipped = 0
Number of rows loaded = 671
Number of rows rejected = 0
Number of rows deleted = 669
Number of rows committed = 671
Duplicates? Lots of duplicates...
--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 11 '07 #2
Serge Rielau wrote:
Gregor Kovac wrote:
>But when I do LOAD I get this in my message file:
Number of rows read = 671
Number of rows skipped = 0
Number of rows loaded = 671
Number of rows rejected = 0
Number of rows deleted = 669
Number of rows committed = 671
Duplicates? Lots of duplicates...
I was thinking that as well, but wouldn't/shouldn't these just be rejected
i.s.o. loaded+committed+deleted?

--
Jeroen
Jul 11 '07 #3
On Jul 11, 4:07 pm, "The Boss" <use...@No.Spam.Please.invalidwrote:
Serge Rielau wrote:
Gregor Kovac wrote:
But when I do LOAD I get this in my message file:
Number of rows read = 671
Number of rows skipped = 0
Number of rows loaded = 671
Number of rows rejected = 0
Number of rows deleted = 669
Number of rows committed = 671
Duplicates? Lots of duplicates...

I was thinking that as well, but wouldn't/shouldn't these just be rejected
i.s.o. loaded+committed+deleted?

--
Jeroen
Only 2 useful rows loaded. In this case, if you had used exception
table opton on the
load command the deleted rows will be in the exception table.If you
hadn't then either again
load(use exception), take rows /import. BUt since the number of rows
is really low(I even use
import for 50000 rows) you might as well do an import on the whole
file again...
Hope this helps

Arun

Jul 11 '07 #4
The Boss wrote:
Serge Rielau wrote:
>Gregor Kovac wrote:
>>But when I do LOAD I get this in my message file:
Number of rows read = 671
Number of rows skipped = 0
Number of rows loaded = 671
Number of rows rejected = 0
Number of rows deleted = 669
Number of rows committed = 671
Duplicates? Lots of duplicates...
I was thinking that as well, but wouldn't/shouldn't these just be rejected
i.s.o. loaded+committed+deleted?
I think duplicate elimination is done in a post phase.
Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 12 '07 #5
Serge Rielau wrote:
The Boss wrote:
>Serge Rielau wrote:
>>Gregor Kovac wrote:
But when I do LOAD I get this in my message file:
Number of rows read = 671
Number of rows skipped = 0
Number of rows loaded = 671
Number of rows rejected = 0
Number of rows deleted = 669
Number of rows committed = 671
Duplicates? Lots of duplicates...
I was thinking that as well, but wouldn't/shouldn't these just be
rejected i.s.o. loaded+committed+deleted?
I think duplicate elimination is done in a post phase.
Cheers
Serge
I was thinkging something else.
Thedocs says that INSERT option adds the loaded
data to the table without changing the existing table data. but you can see
deletes there, so it does change existing table data, right ?
Does this also mean that rows that are in the table AND in the file being
LOADed, so duplicates, are first deleted and the new rows are inserted?

Why am I asking this? IMPORT on big tables is slow, so I thought of using
LOAD, but LOAD does not support INSERT_UPDATE option only INSERT. But from
the samples I did INSERT actually deletes duplicates and then inserts new
rows, so it basically does INSERT_UPDATE.

Best regards,
Kovi
--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Jul 12 '07 #6
Gregor Kovač wrote:
Why am I asking this? IMPORT on big tables is slow, so I thought of using
LOAD, but LOAD does not support INSERT_UPDATE option only INSERT. But from
the samples I did INSERT actually deletes duplicates and then inserts new
rows, so it basically does INSERT_UPDATE.
Kovi,

I checked with teh load team and they confirmed my belief:

"For load, the "deletes" being performed are based on "new" data. For
duplicates, load does not delete existing rows and replace them with new
data. Instead, load first inserts data (including rows that violates
unique key constraints), and then deletes new data that violates unique
key constraints."

So whatever you saw it wasn't an upsert.

Cheers
Serge

--
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Jul 12 '07 #7
Aha, I see now. :))
I have just one final thing to clear up.
Let's say I have only one table in database, meanin there are no foreign
keys, no check constraint, no nothing. Just one database with it's primary
key and indexes (unique and non-unique). If I now do a LOAD into this table
is it ever going to be put into SET INTEGRITY pending state or any other
state that will prevent me from working with this table (doing
SELECTs, ...)?
How about if I have dropped table recovery feature enabled on the tablespace
that this table is in?

Best regards,
Kovi

Serge Rielau wrote:
Gregor Kovač wrote:
>Why am I asking this? IMPORT on big tables is slow, so I thought of using
LOAD, but LOAD does not support INSERT_UPDATE option only INSERT. But
from the samples I did INSERT actually deletes duplicates and then
inserts new rows, so it basically does INSERT_UPDATE.
Kovi,

I checked with teh load team and they confirmed my belief:

"For load, the "deletes" being performed are based on "new" data. For
duplicates, load does not delete existing rows and replace them with new
data. Instead, load first inserts data (including rows that violates
unique key constraints), and then deletes new data that violates unique
key constraints."

So whatever you saw it wasn't an upsert.

Cheers
Serge
--
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
| In A World Without Fences Who Needs Gates? |
| Experience Linux. |
-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
Jul 18 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: JS | last post by:
EE instance DB2 v7.2.0 fixpack 3 on WIN2K. I select some data from a table A and write it to a file using the COALESCE function and whitespace as the null character: eg coalesce(col1, ' '). This...
2
by: **Developer** | last post by:
I have a Form (FV&C) containing a userconrtrol (CF&E) I do a ShowDialog for the form and the form's Load calls a method of the UserControl. The first time I do this the usercontrol appears on...
3
by: db2udbgirl | last post by:
Env: DB2 UDB 8.2, AIX 5.3 While trying to load data (73 Million rows, Medium size table uses 4K tablespace) into a table using cursor it fails with "SQL0964C The transaction log for the database...
1
by: dbagirltx | last post by:
We have done some testing with mixed and forgotten results. So I'm hoping that asking here can clarify some issues for us. Right now we do one weekly warm backup. Throughout the week there are...
1
by: huyuhui | last post by:
The following is a question of LOAD utility. Question: How does the DB2 enforce table check constraints for data added to table with the LOAD utility? A. With the BUILD phase of LOAD B. With the...
2
by: contractsup | last post by:
Environment: $ uname -a AIX <withheld2 5 000100614C00 $ db2level DB21085I Instance "<withheld>" uses "32" bits and DB2 code release "SQL08024" with level identifier "03050106"....
5
by: danfan46 | last post by:
Hi. I'm on DB2 9.5.0.1 on Linux AMD 64 and the database has four partitions where catalog is on partion 0 and user data on 1 thru 3. After a load failure (path to load file was wrong) I...
2
by: David Thielen | last post by:
So we have moved our app from .NET version 2.X in IIS6 to a Windows 2008 Server running IIS7. We have copied all files to the Windwardreports\apps directory and that apps directory has been...
13
by: rdudejr | last post by:
Hi all, I hardly ever make a post unless I am having a very purplexing issue, so this one should be good... I am trying to do a load against a database on an AIX server into a DB2 v9.1...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
linyimin
by: linyimin | last post by:
Spring Startup Analyzer generates an interactive Spring application startup report that lets you understand what contributes to the application startup time and helps to optimize it. Support for...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.