Skip to content

Creating Users

Create a new database schema and APEX workspace in one command:

Terminal window
local-23ai.sh create-user movies

This will:

  • Create a new schema with the given name
  • Store the schema password in the .env file
  • Save the connection in SQLcl’s connection store
  • Add all necessary development grants
  • Give access to datapump directories
  • Create an APEX workspace with convenient settings
  • Optimize workspace settings like session length, max emails and REST messages and password lifetime

If you only need a database schema without an APEX workspace:

Terminal window
local-23ai.sh create-user myschema --skip_workspace

Useful for testing installation scripts multiple times:

Terminal window
local-23ai.sh clear-schema movies
# Asks for confirmation before proceeding

Completely remove a schema and all its objects:

Terminal window
local-23ai.sh drop-user movies

All created users are automatically stored in SQLcl’s connection store:

Terminal window
# Connect using the stored connection
sql -name local-23ai-movies
# Connect to sys user
sql -name local-23ai-sys

You will also find the connections in the VS Code SQL Developer extension. You might need to refresh the connections list after creating a new user.

Use these connection details for other development tools:

  • Host: 23ai
  • Port: 1521
  • Service: FREEPDB1
  • Username: Your schema name