MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

empty a db2 table

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Tue Jul 05, 2005 4:44 am    Post subject: empty a db2 table Reply with quote

What is the optimised way to delete all rows in a db2 table
isntead of using delete from table name
1 method i can think of is load an empty dsn extract
ls help as soon as possible
Thanks & rgs
deepa
_________________
deepa
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue Jul 05, 2005 6:01 am    Post subject: Reply with quote

deepa12,

A LOAD DATA REPLACE LOG NO with a dummy DSN will be more efficient way of emptying a table rather than using an utility.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Tue Jul 05, 2005 7:50 am    Post subject: Reply with quote

Thanks a lot
deepa
_________________
deepa
Back to top
View user's profile Send private message Send e-mail
videlord
Beginner


Joined: 09 Dec 2004
Posts: 147
Topics: 19

PostPosted: Wed Jul 06, 2005 10:41 am    Post subject: Reply with quote

Be careful of using LOAD to empty table.
If more than 1 table in the tablespace, then all tables in the tablaspace would be emptied.
Back to top
View user's profile Send private message
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Thu Jul 07, 2005 12:29 am    Post subject: Reply with quote

Hi
Thanks... yes. i will ensure that it is a segmented table space
rgs
deepa
_________________
deepa
Back to top
View user's profile Send private message Send e-mail
videlord
Beginner


Joined: 09 Dec 2004
Posts: 147
Topics: 19

PostPosted: Thu Jul 07, 2005 4:14 am    Post subject: Reply with quote

Segment tablespace is not 1 table/tablespace,.
1 page of segment tablespace can contain data only from one table.
It's permited to put several tables in one segment tablespace.
Back to top
View user's profile Send private message
deepa12
Beginner


Joined: 05 Apr 2005
Posts: 131
Topics: 64
Location: chennai

PostPosted: Thu Jul 07, 2005 10:46 pm    Post subject: Reply with quote

Hi
Am very sorry... I dont understand
I have always read that simple table space can have many tables
And segmented tablespace can have only 1 table.
So even segmented tablespace can have more than 1 table is it?
_________________
deepa
Back to top
View user's profile Send private message Send e-mail
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Fri Jul 08, 2005 1:25 pm    Post subject: Reply with quote

deepa12,

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNITH11/1.2.2.5?DT=20010710161352

Regards,
Manas
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group