Creating the Schemas for the Application

Using the procedure in this section, create the schemas for the application.

Use the following schema names:

Note: For the following procedure, you need the name and password of a user who has the CREATE USER and DROP USER system privileges.

Steps to create the schemas or users:

  1. Using SQL*Plus, connect to Oracle Database as a user with the CREATE USER and DROP USER system privileges.

    The SQL> prompt appears.

  2. In case the schema exists, drop the schema and its objects with this SQL statement:

     DROP USER schema_name CASCADE;
    

    If the schema existed, the system responds:

     User dropped.
    

    If the schema did not exist, the system responds:

     DROP USER schema_name CASCADE
             *
     ERROR at line 1:
     ORA-01918: user 'schema_name' does not exist
    
  3. If schema_name is either app_data, app_code, or app_admin, then create the schema with this SQL statement:

     CREATE USER schema_name IDENTIFIED BY password
     DEFAULT TABLESPACE USERS
     QUOTA UNLIMITED ON USERS
     ENABLE EDITIONS;
    

    Otherwise, create the schema with this SQL statement:

     CREATE USER schema_name IDENTIFIED BY password
     ENABLE EDITIONS;
    

    Caution: Choose a secure password. For guidelines for secure passwords, see Oracle Database Security Guide.

    The system responds:

     User created.
    
  4. (Optional) In SQL Developer, create a connection for the schema, using the instructions in “Connecting to Oracle Database from SQL Developer”.

See Also: