View previous topic :: View next topic
|
Author |
Message |
Nagendran
New User
Joined: 24 Jan 2007 Posts: 89 Location: USA
|
|
|
|
Hi,
Is there any DB2 utility available to delete the records from the DB2 table , based on the keys from the input file?
Thanks,
Nagendran.R |
|
Back to top |
|
|
Richa Jain
New User
Joined: 18 Mar 2008 Posts: 35 Location: Gurgaon
|
|
|
|
IKJEFT01 utility can be used |
|
Back to top |
|
|
Nagendran
New User
Joined: 24 Jan 2007 Posts: 89 Location: USA
|
|
|
|
Hi,
If we use IKJEFT01 we need to create an applicaion program, but without program is it possible to do.
thanks,
Nagu |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
If we use IKJEFT01 we need to create an applicaion program, |
Why would you believe you must create your own application program? Yes, a program must be run, but SPUFI is a program and is often executed via IKJEFT01.
If you search in the forum you will find several examples. If you find something you do not understand, post what you found and your question and someone will be able to help. |
|
Back to top |
|
|
Nagendran
New User
Joined: 24 Jan 2007 Posts: 89 Location: USA
|
|
|
|
Hello,
Thanks for ur response.
If we use SPUFI, we need to hardcode query for each records that needs to be deleted.
But i dont like to do it so, i am having millions of record needs to be deleted.
My requirement is, input file is having arounfd 10 million records,
I want to delete all the records that present in the input file. I just want to know whether it is possible by using utility?
Thanks,
Nagu |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
It would probably be better to unload the database, delete the records from the unload, then reload the database. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
I just want to know whether it is possible by using utility?
|
yes, as crag said:
unload, - that is a utility
use sort match/cull - that is a utility
reload - that is a utility |
|
Back to top |
|
|
Pandora-Box
Global Moderator
Joined: 07 Sep 2006 Posts: 1592 Location: Andromeda Galaxy
|
|
|
|
Nagendran,
Try to do a LOAD REPLACE with a dummy file.
Regds,
Prem |
|
Back to top |
|
|
vini_srcna
Active User
Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
|
|
|
|
Dont do Load replace with Dummy SYSREC unless you have to delete all the records in the table.!!!
Do you have any idea how the keys came into file.? was it a unload.???
Deleting 10 million records thru DELETE sql is not preferable. If the file contains unload data, then UNLOAD the data apart from the data in the delete file. Now you can do a LOAD REPLACE with the later data so that the data in delete file is no more in table. This is how it is done in most of the shops.
There is an another option of doing REORG with DISCARD option also. |
|
Back to top |
|
|
|