Create an Oracle database
Fill in the variables above and set the user’s password in the script. In Oracle a user is a schema — creating the user is what other engines call creating a database, and the schema carries the user’s name. There is no separate CREATE DATABASE step:
ALTER SESSION SET "_ORACLE_SCRIPT"=true;
CREATE USER ${{ USERNAME }} IDENTIFIED BY "put_your_password";GRANT CONNECT, RESOURCE TO ${{ USERNAME }};GRANT CREATE SESSION TO ${{ USERNAME }};GRANT UNLIMITED TABLESPACE TO ${{ USERNAME }};GRANT SELECT ON SYS.DBA_RECYCLEBIN TO ${{ USERNAME }};
QUITSet the SYS password in your shell, then run the script:
export SYS_PASSWORD=put_your_sys_passwordsqlplus sys/$SYS_PASSWORD@${{ HOSTNAME }}:1521/ORCLCDB as SYSDBA @/oracle-init.sql;