Solved

Help me please ! DB2 problem ...

Posted on 2001-08-28
6
699 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
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…

710 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