Skip to content

Command Reference

The local-26ai.sh wrapper gives you every feature of this project as a single command. This page lists all of them. Run local-26ai.sh --help to see the same list in your terminal.

Terminal window
local-26ai.sh <command> [arguments]
CommandDescription
startStart the database and ORDS containers.
stopShut the database down cleanly, then stop the containers. If the used space is CRITICAL, the command first runs shrink-space --auto. If the space is still CRITICAL afterward, the command does not stop anything and exits with code 11. Run stop --force to skip the shrink and stop anyway.

See Common Tasks → Managing Containers.

CommandDescription
create-user <name>Create a database schema and an APEX workspace with all development grants. Use --skip-workspace for a schema only. Use --compress to store the data compressed.
clear-schema <name>Drop all objects in a schema and keep the schema itself. Use it to test an install script many times. -y skips the confirmation.
drop-user <name>Drop a schema with its tablespace and datafile. -y skips the confirmation.

See Creating Users.

CommandDescription
backup-allExport every schema with DataPump to ./backups/export, with the APEX workspaces, applications, and ORDS modules.
backup-user <name>Export a single schema with DataPump, with its APEX workspace and applications.
import-backup <name>Restore a schema from a backup. If the user does not exist, the script creates it first.
import-datapump <name> [-rs <target>] [-rt <old>=<new>]Import a DataPump dump for a schema. With -rs the script imports the dump into a different schema name. With -rt the script puts the tables of a dump tablespace into a local tablespace.
import-all [-y] [-j N]Import the schemas of ./backups/import/recovery/schemas.tsv, or of .env if that file does not exist. Use it during a migration. -y skips the confirmation. -j N runs the DataPump import of N schemas at the same time. The command runs recovery/00_pre.sql before and recovery/10_post.sql after the imports, puts back the files of custom directories, and then compares the object names with recovery/manifest.tsv.
export-gapsShow what a schema export does not carry. It writes 00_pre.sql, 10_post.sql, schemas.tsv, manifest.tsv, dirs.tsv, the files of custom directories, and unrecoverable.txt to ./backups/export/recovery. backup-all runs it first.
rebuild [-y] [-j N] [--accept-losses]Run backup-all, delete the database volume, install a new database, and run import-all. The command shows what no backup holds and asks you to type the volume name. Exit code 2 means that the import was successful, but you must do the steps in unrecoverable.txt.
test-backup-fixtures create|probe|compare|dropCreate hand-made users, grants, jobs, and policies on a test database, and compare them before and after a restore. Do not run it on a database that you use.
sync-backups-folder [push|pull|both] [schema]Copy ./backups/import into the DataPump directory of the container, and copy new exports back out. A schema needs push or pull. Then the command copies only the dump of that schema, and with pull also its log. The APEX and ORDS files stay on the host.
fix-ws-group-idsDelete the group IDs from the APEX workspace export files in ./backups/import, so the files import correctly.

See Backups and Common Tasks → Workspace Import/Export.

CommandDescription
test-app-install <file.sql>Install an APEX application export into the clean UC_TESTINSTALL_1 schema. Shows object counts, invalid objects, and the results of the dependency scan. -y skips the confirmation.
test-script-install <file.sql>Run any SQL script in the clean UC_TESTINSTALL_1 schema. Shows object counts and invalid objects. -y skips the confirmation.

See Install Apps or Scripts.

CommandDescription
used-spaceShow the used database space per tablespace, against the 12GB limit of the Free edition. --summary gives key=value lines, and --quiet gives the exit code alone. The exit code is 0 for OK, 10 for WARNING, and 11 for CRITICAL.
cap-tablespacesGive every datafile a size ceiling, so one datafile cannot fill the 12GB limit alone. --check reports and changes nothing. --apply sets the ceilings. -y skips the confirmation.
shrink-spaceShrink tablespaces and datafiles to reclaim unused space. The command asks three questions. With --auto, it does not ask. It purges the audit records, keeps the old APEX schemas, and rebuilds the bloated tables.
compress-space <name>Enable Advanced Compression on the tablespace of a schema, rebuild its objects in compressed form, and return the free space to the operating system. -y skips the confirmation.
create-purge-jobsCreate the jobs UC_APEX_DEBUG_PURGE and UC_LOGGER_PURGE. Each job keeps 7 days of data. The command runs both jobs one time.

See Common Tasks → Maintenance Tasks.

CommandDescription
after-first-db-startInstall APEX and apply the defaults for development. install.sh runs this command. You need it only for a manual installation.
upgrade-apexDownload the latest APEX version, run the installer, copy the images, and set the workspace settings again.
fix-jvm [--force]Reload the in-database JVM after a change of the database image. The image change can stop the JVM without a message, and every Java call then raises ORA-29548. The command tests the JVM first and does nothing if it works. --force reloads it anyway.
unexpire-accountsUnlock the APEX and ORDS accounts. This corrects an “Account Is Locked” message.
set-open-cursors [value]Raise the open_cursors setting of the database. The default of the Free image is too low for the APEX import of a large application, which then fails with ORA-01000. The default value is 1000. The command raises the setting only, and never lowers it. install.sh runs this command.
disable-password-expirationStop the passwords of database accounts from expiring.
disable-archive-logsDisable archive logging to save disk space. Archive logs are not necessary in development.
create-self-signed-certificatesCreate self-signed SSL certificates so ORDS serves HTTPS on port 8443. Run with sudo.
install-dbms-cloudInstall the DBMS_CLOUD package into the database.
upgrade-dbms-cloudReload the DBMS_CLOUD packages after a change of the database image. The command stops with an error if DBMS_CLOUD is not installed. It does not change the wallet, and it does not restart the database.
install-utplsql [version] [--force]Install or upgrade utPLSQL in the schema UTPLSQL. The command downloads the latest release from GitHub and checks the checksum. It installs the DDL trigger. To upgrade, the command drops the schema and creates it again. It saves the password as UTPLSQL_USER_PASSWORD in .env. See utPLSQL.

See Upgrade APEX and Common Tasks.