Oracle DROP TABLESPACE statement examples To drop the SYSAUX tablespace, you need to have the SYSDBA system privilege. You need to have the DROP TABLESPACE system privilege to execute the DROP TABLESPACE statement. Note that you cannot drop the SYSTEM tablespace and only can drop the SYSAUX tablespace when you started the database in the MIGRATE mode. However, it’s good practice to take the tablespace offline before removing it to ensure that no sessions are currently accessing any objects in the tablespace. You can use the DROP TABLESPACE to remove a tablespace regardless of whether it is online and offline. If you omit the CASCACDE CONSTRAINTS clause in such situations, Oracle returns an error and does not remove the tablespace. Fourth, if the tablespace that has objects such as tables whose primary keys are referenced by referential integrity constraints from tables outside the tablespace, you must use the CASCADE CONSTRAINTS option to drop these constraints.Third, use AND DATAFILES option to instruct Oracle to delete the datafiles of the tablespace and KEEP DATAFILES option to leave the datafiles untouched. Any attempt to remove a tablespace that has objects without specifying the INCLUDING CONTENTS option will result in an error. If the tablespace has any objects, you must use this option to remove the tablespace.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |