Drop Temporary Tables

Database

Drop Temporary Tables

Hi,

I have a temporary table that I need to drop but I can't run

DROP TABLE Db1.Table1; because it says error 5337 drop table is not allowed due to materialized temporary tables

So we went to every user that had used it and ran DROP TEMPORARY TABLE Db1.Table1;

But still no joy.

Is there an admin command I can use to force a release of locks and allow the drop?

How else can I do it?

Thanks,

  Tony.

 

3 REPLIES
N/A

Re: Drop Temporary Tables

Hi Tony,

DROP TEMPORARY TABLE db1.table1 ALL;

This drops bith the template and all materiaklized versions. If there's an open transaction using that table the drop will be blocked until the transaction is commited.

Dieter

Re: Drop Temporary Tables

I guess, we can't use TEMPORARY keyword with ALL

Re: Drop Temporary Tables

Thanks Dieter!