Solved

Help me please ! DB2 problem ...

Posted on 2001-08-28
6
632 Views
Last Modified: 2008-03-17
Hi , i have some problem with DB2 ..the problem is when i INSERT INTO X table huge amount of data from Y table  and  after that i drop the Y  table... theY table cannot be dropped and the errror message

"SQL0950N The table or index cannot be dropped because it is currently in use.
Explanation: A DROP TABLE or DROP INDEX statement cannot be issued when an open cursor is currently using the table or index. "

it says  that table Y is still in use .... the cursor is still in table Y  ... i tried a lot of method but still cannot solve it... the cursor is still in the Y table    but this problem doesnt happen in Oracle...

hope that someone can help ... thanks in advance

0
Comment
Question by:chekban
6 Comments
 
LVL 15

Expert Comment

by:lyonst
ID: 6435762
Usually,

Cause: A DROP TABLE or DROP INDEX statement cannot be issued when an open cursor is currently using the table or index.

The statement cannot be processed. The table or index is not dropped.

Action: Close any cursors required and resubmit the statement.

sqlcode: -950

Cheers,

T.
0
 
LVL 3

Expert Comment

by:P_S_Price
ID: 6436812
When you insert into X from Y have you first accessed Y via a DECLARE CURSOR and OPEN CURSOR somewhere else in the code? or is there any possibility that another Job elsewhere has the table open (CICS transactions perhaps?)
0
 

Author Comment

by:chekban
ID: 6438897
actually i'm using jdbc to access the DB2 , a have 13 tables in the database , this problem only happens to only one table with data about 61KB .. the others are OK ...
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 3

Expert Comment

by:ibro
ID: 6442273
Try to close the connection from JDBC (hopefuly this will release the opened resource),then open it again and drop the tables.
 hope this works
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7261663

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 

Accepted Solution

by:
Jgould earned 0 total points
ID: 7291796
Question has been closed as per recommendation

JGould-EE Moderator
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now