473,322 Members | 1,671 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

How to drop corrupted tables?

I need to drop my table "13SEPTEMBER2011" because when I open it some error is prompting. It happen to me two times the 1st one is on my DB2 v9.7 and now in my DB2 v10.1. They are both been corrupt after I import data file on that table and I don't know why?

I try dropping the table in GUI form but the command doesn't execute and error comes again.

Help to those who know what may solve my problem.

Thank you very much

Best Regards,

G.L Hernandez
Oct 5 '12 #1

✓ answered by vijay2082

Hi,

Your table looks perfectly fine. It's not corrupt. However it may be the case that you have loaded some data which was not required.

The error which is being received while you browse or edit data is due to character conversion error. There is some data in the table which is not being recognized by the database and it's unable to display. Probably you need to look at your data before loading it again and remove junk/unwanted data.

To remove/drop the table you can use below command. It will completely drop the table and you will have to recreate it once again.

Expand|Select|Wrap|Line Numbers
  1. db2 drop table JUSTIN."13SEPTEMBER2011"
Cheers, Vijay

8 7566
What is the error message when you try to access the table and then when you try to drop it?

How did you import the data: IMPORT, LOAD, GUI, db2move?

Peter,
Oct 5 '12 #2
I have use Import. By the way I'm using Data Studio 3.1.1. So I use GUI to drop table but this error always prompting.

ALTER TABLE JUSTIN."13SEPTEMBER2011" DROP PRIMARY KEY

The table or index cannot be dropped because it is currently in use.. SQLCODE=-950, SQLSTATE=55006, DRIVER=3.63.108
Oct 5 '12 #3
zmbd
5,501 Expert Mod 4TB
That is telling you that there is an index to that table.
You need to go thru your indexs and remove the one that is pointing to the table.
http://publib.boulder.ibm.com/infoce...Fr0002051.html do search on "index"
So much there... this is the reference to version 9 ... take a year to read.
Oct 5 '12 #4
zmbd
5,501 Expert Mod 4TB
Did a quick search out there and this popped up:
http://www.devx.com/dbzone/Article/29585/0/page/4

I haven't finished reading it; however, you might find the information useful as it goes over indexs and table structure
Oct 5 '12 #5
vijay2082
112 100+
Hi,

I can see that you are infact trying to drop your primary key. If you nee to drop your table them use below command

Expand|Select|Wrap|Line Numbers
  1. db2 drop table JUSTIN."13SEPTEMBER2011"
Can you send me output of below query to see what's wrong in your table

Expand|Select|Wrap|Line Numbers
  1. db2 select * from syscat.tables where tabname='13SEPTEMBER2011'
  2.  
  3. db2 select count(*) from JUSTIN."13SEPTEMBER2011"
  4.  
  5. db2look -d <db_name> -a -e -l -t 13september2011 -o outlook.txt
Cheers, Vijay
Oct 6 '12 #6
Sir Vijay,

Thank you so much for replying on both my concerns.

Anyway, the result for:

Expand|Select|Wrap|Line Numbers
  1. db2 select count(*) from JUSTIN."13SEPTEMBER2011"
is 129

and Kindly check the files that I have attach at this post for the other information that you need to help me out.

Also whenever I click Browse data or edit data. This message occurs:

com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][3.63.108] Caught java.io.CharConversionException. See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null
[jcc][t4][1065][12306][3.63.108] Caught java.io.CharConversionException. See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null


Please help me sir. Thank you so much

Best Regards,

G.L Hernandez
Attached Files
File Type: txt outlook.txt (3.4 KB, 422 views)
File Type: txt result for syscat.txt (3.1 KB, 323 views)
Oct 6 '12 #7
vijay2082
112 100+
Hi,

Your table looks perfectly fine. It's not corrupt. However it may be the case that you have loaded some data which was not required.

The error which is being received while you browse or edit data is due to character conversion error. There is some data in the table which is not being recognized by the database and it's unable to display. Probably you need to look at your data before loading it again and remove junk/unwanted data.

To remove/drop the table you can use below command. It will completely drop the table and you will have to recreate it once again.

Expand|Select|Wrap|Line Numbers
  1. db2 drop table JUSTIN."13SEPTEMBER2011"
Cheers, Vijay
Oct 6 '12 #8
Thank you very much! . You have help me a lot. Hope to learn more from you. Thank you again

Best Regards,

G.L Hernandez
Oct 6 '12 #9

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: jeff brubaker | last post by:
Hello, Currently we have a database, and it is our desire for it to be able to store millions of records. The data in the table can be divided up by client, and it stores nothing but about 7...
2
by: Amy | last post by:
This is what I want to do: 1. Delete all tables in database with table names that ends with a number. 2. Leave all other tables in tact. 3. Table names are unknown. 4. Numbers attached to...
2
by: Ryan | last post by:
Just a quicky about temporarary tables. If using QA, when you create a temporary table, it gets dropped if you close the query. Otherwise you need to state 'DROP TABLE myTable' so that you can...
5
by: Jay | last post by:
Hey there, I have a question. Is it possible to to construct something through a combination of php and javascript that (when a browser window is closed) would drop temp tables that are used? I've...
2
by: Patrick Finnegan | last post by:
DB2DART detects problems with SYSIBM.SYSSECTION and SYSIBM.SYSSTMT .. I cannot connect to or drop these tables(system objects). What are my options besides a db restore? Thanks in advance. ...
2
by: Alanoly J. Andrews | last post by:
Hi, I have two tables (that I know of) in a database that seem to be corrupted. All SQL statements on the tables hang, "select * from..", "select count (*) from", "delete from..". I can't even...
3
by: deko | last post by:
I cannot open my Access 2003 database - I receive this error: "The Visual Basic for Applications Project in the database is corrupt." I understand that sudden and inexplicable failures like...
0
by: Jeff Beem | last post by:
In ASP.net 2.0 (it may be possible in previous versions also, I don't know) you can drag a database table from the server explorer to the webform and it will simply run. At least, that's what...
4
by: pagelogix | last post by:
I'm looking for a way to drop multple tables at the same time from my access database. Any ideas? Thanks.
3
hsriat
by: hsriat | last post by:
How can I drop all the tables from the database which start with a common prefix (say t1_)? Query or PHP code... any simple solution?
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.