Least privilege means giving a user only the rights they need to perform a specific task, and nothing more. In SQL*Plus, every privilege granted through a database role or system privilege expands the attack surface. The more rights assigned, the greater the risk of accidental damage or malicious use.
Start with the smallest set of permissions. For administrative scripts, create dedicated accounts with tightly scoped privileges. Separate accounts for read-only queries, schema changes, and production maintenance help prevent privilege creep. Review GRANT statements line by line. Avoid blanket grants such as GRANT ALL PRIVILEGES or elevated roles like DBA unless essential and time-limited.
Use database auditing to verify that accounts only perform authorized actions. Combine SHOW USER and system views like DBA_SYS_PRIVS or ROLE_SYS_PRIVS to inspect current rights. Remove unused privileges immediately. Every unnecessary right is a possible exploit.