From the course: Learning Oracle Database 19c

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Drop tablespaces

Drop tablespaces

- [Instructor] Disk space is not unlimited. When you don't need a tablespace for an application any longer and need to free up space, you can drop the tablespace and return the disk space to the ASM disk group or OS file system. I'll demonstrate a couple of ways you can drop a tablespace both with the command line and with Oracle SQL Developer. Here's the syntax of the drop tablespace command with the most common clauses. Ideally you want to make sure that users don't have any important tables in the tablespace and that those tables are obsolete or have already been moved elsewhere, but you can use including contents to drop the tablespace even if there are still tables in the tablespace. The cascade constraints option is similar to the same clause in the drop table command. If tables are in the tablespace when it's dropped and there are foreign key constraints that reference one of the tables that is about to be dropped, cascade constraints automatically removes those constraint…

Contents