Skip to content

Common Tasks

Once your environment is set up, these are the most common tasks you’ll perform during APEX development.

Terminal window
# Stop database
local-26ai.sh stop
# You could also run this, but the script will gracefully stop the database
# docker compose stop (or: podman compose stop)
local-26ai.sh start
# Or
# docker compose start (or: podman compose start)

The ords-config folder in the root directory contains ORDS configuration files. Modify these files and restart the ORDS container to apply changes:

Terminal window
# After modifying config files
docker compose restart ords-26ai # or: podman compose restart ords-26ai

Enable HTTPS for ORDS by creating self-signed certificates. On MacOS and Linux it will also add the certificate to your system’s keychain:

Terminal window
sudo ./scripts/create-self-signed-certificates.sh
docker compose restart ords-26ai # or: podman compose restart ords-26ai

Access via: https://localhost:8443/ords (Port 8443 instead of 8181).

Keep in mind that the FREE database has a space limitation of 12GB. You can check the used space with:

Terminal window
local-26ai.sh used-space
# CURRENT_GB LIMIT_GB PERCENT_OF_LIMIT STATUS
# _____________ ___________ ___________________ _________
# 5.04 12 41.97 OK
# Tablespace Total MB Used MB Free MB Pct. Free
# _______________________ ___________ __________ __________ ____________
# SYSAUX 3440 3158 282 8
# SYSTEM 690 679 11 2
# USERS 118 59 59 50
# TBS_PLUGINS 112 38 74 66
# UNDOTBS1 103 23 80 78
# TBS_AOP 77 7 70 91

If your tablespaces have grown larger than the space they actually use, you can reclaim that space with:

Terminal window
local-26ai.sh shrink-space

This can take a while. The script works through several steps, each safe to run repeatedly:

  1. Purge audit records – the AUDIT_TRAIL tablespace can balloon to several GB and never shrink back on its own. You are prompted before any audit history is deleted (defaults to yes; non-interactive runs purge automatically).
  2. Drop a leftover old APEX engine – after an APEX upgrade the previous version’s schema (e.g. APEX_240200) is left behind and wastes ~hundreds of MB. If one is found you are asked to confirm before it is dropped. This is irreversible, so it is skipped when the script runs non-interactively.
  3. Shrink the APEX file repository – uploaded/imported files in FLOWS_FILES leave dead space inside the storage that a normal tablespace shrink can’t reclaim. This is compacted without touching your files.
  4. Shrink the tablespaces and resize the datafiles – returns the freed space to your disk.

For development environments, you might want to disable archive logging. You will be asked if you want to do this in the after-first-db-start.sh script, but you can also run it manually:

Terminal window
./scripts/disable-archive-logs.sh

If APEX_PUBLIC_USER or workspace accounts are locked due to password expiration, unlock them with:

Terminal window
./scripts/unexpire-accounts.sh

This is useful after database migrations or when accounts have expired due to time constraints.

To prevent APEX workspace accounts from expiring in the future:

Terminal window
./scripts/disable-password-expiration.sh

Automatically import all export files from the ./backups/import/ directory:

Terminal window
./scripts/import-all.sh

This is particularly useful during database migrations when you need to bulk import multiple workspaces and schemas. The script will provide a summary of successful and failed imports.

When re-importing APEX workspaces, you may encounter issues due to a known bug with group assignments. Fix this automatically:

Terminal window
./scripts/fix-ws-group-ids.sh

This script updates all export files in ./backups/import/ to remove problematic group ID parameters, allowing successful re-import.

To start completely fresh (⚠️ ALL DATA WILL BE LOST):

Terminal window
docker compose down # or: podman compose down
docker volume rm oradata-26ai # or: podman volume rm oradata-26ai
rm .env

Then follow the setup instructions again.