Makaveli
Makaveli

Reputation: 61

How to delete all tables in Oracle XE 11.2 using Application Express?

I installed Oracle Express Edition 11.2, and have created an outline. Using SQL Developer, SQL to practice, the problem is that every time you create a workspace, sample tables are created.

How I can delete those tables that are automatically created?

enter image description here

The tables are in the red box are those that are automatically created each time you create a workspace.

Upvotes: 2

Views: 4794

Answers (1)

Jeffrey Kemp
Jeffrey Kemp

Reputation: 60262

The tables you listed in your screenshot are created automatically by Application Express when the workspace is created.

Some of them can be avoided by setting Create demonstration objects in new workspaces and Create Websheet objects in new workspaces to No (under Manage Instance -> Feature Configuration).

They are generally safe to drop - but note that the demo application will no longer work, and since the APEX$.. tables are used by Websheets, you won't be able to create Websheet applications in that workspace.

This is the script I used on my last project where we didn't need any of this stuff (adapt to your list as required):

DROP SEQUENCE DEPT_SEQ;
DROP SEQUENCE EMP_SEQ;
DROP TABLE DEPT PURGE;
DROP TABLE EMP PURGE;
DROP TABLE APEX$_ACL PURGE;
DROP TABLE APEX$_WS_FILES PURGE;
DROP TABLE APEX$_WS_HISTORY PURGE;
DROP TABLE APEX$_WS_LINKS PURGE;
DROP TABLE APEX$_WS_NOTES PURGE;
DROP TABLE APEX$_WS_ROWS PURGE;
DROP TABLE APEX$_WS_TAGS PURGE;
DROP TABLE APEX$_WS_WEBPG_SECTIONS PURGE;
DROP TABLE APEX$_WS_WEBPG_SECTION_HISTORY PURGE;

Use of this script is at your risk :)

Upvotes: 3

Related Questions