From the course: Learning Oracle Database 19c
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Drop a user account - Oracle Database Tutorial
From the course: Learning Oracle Database 19c
Drop a user account
- [Instructor] Inevitably, a user account is no longer needed if an employee leaves the organization or an application is being retired, and the application schema is no longer needed. It's a simple matter to drop the user, and I'll review a couple of caveats and requirements to do so. The syntax for DROP USER is about the simplest you'll see when dealing with Oracle commands. To drop a user, you must have the DROP USER system privilege, as you might expect. If the schema is not empty, you can use CASCADE to automatically drop all objects. Also, if tables and other schemas had foreign key references to tables in the schema, those are dropped. However, if a private or public synonym is referencing tables in the schema, they are not dropped, and you'll get an error message the next time you try to use the synonym. Here I'm attempting to drop the user BID from a SQL*Plus session, and I can't do that because I get the ORA-01922 error message. There are still tables in the BID schema…