473,396 Members | 1,967 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 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 3752
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing,...

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.