Solved

Help me please ! DB2 problem ...

Posted on 2001-08-28
6
676 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
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 
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 learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ODBC Question 3 49
Generate Scripts of Schema/Data with "WHERE" clause 6 74
Documenting Data flow 4 48
ESX 6.0 Best Practices for datastore size 5 132
SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
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…

821 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