Solved

Help me please ! DB2 problem ...

Posted on 2001-08-28
6
646 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
database design books 12 91
SQL Server backup strategy: Commvault and/or maintenance job (Ola Hallengren scripts) 6 67
Update in Sql 7 30
Sql Join Problem 2 19
Introduction: I have seen many questions on EE and elsewhere, asking about how to find either gaps in lists of numbers (id field, usually) ranges of values or dates overlapping date ranges combined date ranges I thought it would be a good …
APEX (Application Express) is used to develop a web application from Oracle. SQL Workshop is one of the tools that comes with Oracle APEX to query or modify the database objects or to make any changes to the structure.
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…

930 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

11 Experts available now in Live!

Get 1:1 Help Now