Creating Users
Create User and Workspace
Section titled “Create User and Workspace”Create a new database schema and APEX workspace in one command:
local-26ai.sh create-user moviesThis will:
- Create a new schema with the given name
- Store the schema password in the
.envfile - 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
Create Schema Only
Section titled “Create Schema Only”If you only need a database schema without an APEX workspace:
local-26ai.sh create-user myschema --skip-workspaceCreate a Compressed Schema
Section titled “Create a Compressed Schema”Add --compress to enable Advanced Compression (included in Oracle Database Free) on the new schema’s tablespace from the start. Every table and index created afterwards is stored compressed automatically — advanced row compression for tables, advanced index compression for B-tree indexes — keeping the schema’s disk footprint smaller as it grows.
local-26ai.sh create-user movies --compress# Combine with other flags as needed:local-26ai.sh create-user myschema --skip-workspace --compressClear a Schema
Section titled “Clear a Schema”Useful for testing installation scripts multiple times:
local-26ai.sh clear-schema movies# Asks for confirmation before proceedingTo skip the confirmation prompt (useful for automation), use the -y flag:
local-26ai.sh clear-schema movies -yDrop a Schema
Section titled “Drop a Schema”Completely remove a schema and all its objects. This also drops the schema’s dedicated tablespace and its datafile, so the disk space is reclaimed instead of being left behind as an orphan:
local-26ai.sh drop-user movies# Asks for confirmation before proceedingTo skip the confirmation prompt (useful for automation), use the -y flag:
local-26ai.sh drop-user movies -yDatabase Access
Section titled “Database Access”SQLcl and SQL Developer Access
Section titled “SQLcl and SQL Developer Access”All created users are automatically stored in SQLcl’s connection store:
# Connect using the stored connectionsql -name local-26ai-movies
# Connect to sys usersql -name local-26ai-sysYou 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.
Other Development Tools
Section titled “Other Development Tools”Use these connection details for other development tools:
- Host: localhost
- Port: 1521
- Service: FREEPDB1
- Username: Your schema name
- Password: The
<NAME>_USER_PASSWORDvalue in the.envfile