Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to delete large data.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
Mounika Nemani

New User


Joined: 25 May 2018
Posts: 5
Location: India

PostPosted: Wed Jun 13, 2018 1:58 pm    Post subject: How to delete large data.
Reply with quote

Hi All,

I tried to run a delete query in SPUFI.

Code:
DELETE                               
FROM     HIST_QUANTITY         
WHERE    TERMINAL_ID = 'SPRLOD' 


the above query was suppose to delete 1574180 rows from the table.

but I am getting a -904 error with the following reason.
Code:
SQLCODE = -904, ERROR:  UNSUCCESSFUL EXECUTION CAUSED BY AN         
UNAVAILABLE RESOURCE. REASON 00C90096, TYPE OF RESOURCE 00000302, AND
RESOURCE NAME TCPUD1PK.PK000070.X'00004E8A'


need help on how to increase the page locks. or is there any optimization needed for the query to be executed so, that the table doesn't throw -904.

Thanks in Advance
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2126
Location: UK

PostPosted: Wed Jun 13, 2018 3:49 pm    Post subject: Reply to: How to delete large data.
Reply with quote

The table did not 'throw' anything. Nothing gets thrown on the mainframe. Your query abended.
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 194
Location: Toronto, ON, Canada

PostPosted: Fri Jun 29, 2018 10:19 pm    Post subject:
Reply with quote

You can use the below to lock the entire table prior to the delete. You need to be sure no one else needs the table
LOCK TABLE HIST_QUANTITY IN EXCLUSIVE MODE
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 2064
Location: NY,USA

PostPosted: Sat Jun 30, 2018 4:06 am    Post subject:
Reply with quote

Such things are always discussed with DBAs.
Please do that
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts To get the count of PDS data sets whi... Vignesh Sid JCL & VSAM 4 Fri Nov 30, 2018 8:38 pm
No new posts DB2 - loading data Joshua1066 DB2 5 Sun Nov 18, 2018 4:58 am
This topic is locked: you cannot edit posts or make replies. DFSORT output in CSV for data spans i... hiravibk DFSORT/ICETOOL 3 Tue Nov 13, 2018 7:55 pm
No new posts REFORMATTING WITH JFY CLOBBERING OUTP... speermb DFSORT/ICETOOL 12 Thu Nov 08, 2018 7:20 pm
No new posts Migrating AS400 to HIVE; Data type ma... sindhu.jose All Other Mainframe Topics 1 Tue Nov 06, 2018 1:06 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us