Cannot drop table, query hangs

Database
Enthusiast

Cannot drop table, query hangs

hi

I am using a java program to access TD using JDBC driver 13.0.0.6. Where i try following

create table "dbtest"."AATEST123" ( "PKCOL1" char(5) not null, "PKCOL2" varchar(15) not null, "PKCOL3" decimal(7) not null, "STR1" varchar(10) null, primary key( "PKCOL1","PKCOL2","PKCOL3" )

INSERT INTO "dbtest"."AATEST123" ("PKCOL1","PKCOL2","PKCOL3","STR1") VALUES ('def', 'DEF', 200, 'different')
INSERT INTO "dbtest"."AATEST123" ("PKCOL1","PKCOL2","PKCOL3","STR1") VALUES ('ghi', 'GHI', 300, 'Row 3')

INSERT INTO "dbtest"."AATEST123" ("PKCOL1","PKCOL2","PKCOL3","STR1") VALUES ('def', 'DEF', 200, 'Row 2')

Get error 2801, duplicate primary key. Now when i try to drop the table, query hangs. Instead i can select or delete from table successfully.

There are no other constraints on the table. Please help with the same.
2 REPLIES
Junior Supporter

Re: Cannot drop table, query hangs

And what mode 'ANSI/TERADATA' uses your 'java program'? If ANSI, there can be pending transactions that you must terminate with commit or rollback in order to release the table.

HTH.

Cheers.

Carlos.
Teradata Employee

Re: Cannot drop table, query hangs

I have the same problem with a database which I copied from an archive with arcmain. Tried everthing, but also SPs and Views can't be droped either with arcmain, SQL, Teradata Administrator.

Thanks for help.