Solved

Help me please ! DB2 problem ...

Posted on 2001-08-28
6
658 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Database tuning – How to start and what to tune. This question is frequently asked by many people, both online and offline. There is no hard and fast rule-of-thumb for performance tuning, however, before beginning the tuning process one should a…
Creating and Managing Databases with phpMyAdmin in cPanel.
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…

806 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