Question

I am using an Oracle 18c database in a build system.

One of my builds is for a JPA/Hibernate project, which is configured as "create-drop". This means it will create all tables during startup and drop all of them again at the end.

The problem is: I can't configure Hibernate to create "drop ... purge" statements.

It seems that as a result the recycle bin has grown with each build, exceeding now the maximum allowed database size of 12 GB - and I am not even able to open the database anymore:

alter database open
*
ERROR at line 1:
ORA-12954: The request exceeds the maximum allowed database size of 12 GB.

I have now droped the PDB and created a new one - but this will last for at most a month, before I run into the same problem again.

My question: Is there any option to tell Oracle to immediately purge dropped tables?

Was it helpful?

Solution

Is there any option to tell Oracle to immediately purge dropped tables?

That would be disabling the recycle bin, if only for the current session. Include ALTER SESSION SET recyclebin = OFF in your build process, or, if this is a development system, you can consider turning it off via the instance initialization parameter.

Alternatively, you can choose running the build as a dedicated Oracle user; you will then DROP USER ... CASCADE at the end, which will drop all user's tables and other objects without placing them in the recycle bin.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top