Skip to content

Drop an Oracle database

oracle-init.sql
ALTER SESSION SET "_ORACLE_SCRIPT"=true;
DROP USER ${{ USERNAME }} CASCADE;
QUIT

Set the SYS password in your shell, then run the script:

Terminal window
export SYS_PASSWORD=put_your_sys_password
sqlplus sys/$SYS_PASSWORD@${{ HOSTNAME }}:1521/ORCLCDB as SYSDBA @/oracle-init.sql;