Today I am going to explain the procedure to delete/drop a user in Oracle database along with tables and mapped files for that user tablespace.
Pre-requisites
Oracle database with the following- User
- Tablespace of the user
- Datafile of the tablespace
Procedure
Drop the user
Syntax: DROP USERExample: DROP USER sampleuser CASCADE;
Make the tablespace offline
Syntax: ALTER TABLESPACEExample: ALTER TABLESPACE sampletablespace OFFLINE;
Drop the tablespace with mapped datafile[s]
Syntax: DROP TABLESPACEExample: DROP TABLESPACE sampletablespace INCLUDING CONTENTS AND DATAFILES
With the above 3 commands, you can make sure that, user and user related data has been completed removed from database.
Hope, it will help to resolve your issue.
Please send your feedback and comments to psrdotcom@gmail.com
No comments:
Post a Comment