Migrate to 25.3
If you haven’t installed uc-local-apex-dev yet, you can find the setup instructions here.
Make sure you are on 25.2 before you start. Do the previous migrations if not.
Changes
Section titled “Changes”- DB 23.7 → 23.8 (DB files are compatible)
- ORDS Developer 24.4 → ORDS 25.2
- Includes migration from
ords-developer
to theords
image because of deprecation.
- Includes migration from
- New scripts
test-script-install
to test SQL scripts in a clean environment (more on test-script-install)used-space
to check the used space of the database (more on used-space)shrink-space
to reclaim space from tablespaces (more on shrink-space)
Migration
Section titled “Migration”Make sure your database is running:
docker ps
Otherwise start the database:
local-23ai.sh start
Backup the database
Section titled “Backup the database”This will backup all schemas and APEX workspaces that where created with the local-23ai.sh create-user
script. If you have additional schemas or workspaces you need to backup them manually.
local-23ai.sh backup-all
Now check the backups/export
directory if the backup was created successfully.
Optional: backup the oradata volume
Section titled “Optional: backup the oradata volume”Optionally also back up the oradata files. This can take a moment, mine is about 10GB big. Make sure that ./backups/oradata
does not exist.
source ./scripts/util/load_env.sh
docker exec $CONTAINER_NAME bash -c "echo 'shutdown immediate;exit' | sqlplus / as sysdba && exit"
docker cp $CONTAINER_NAME:/opt/oracle/oradata ./backups/oradata
Copy APEX images
Section titled “Copy APEX images”# copy images out of the old ORDS containerdocker cp local-ords:/opt/oracle/apex/24.1.0/images .
# rename the images directory to apex-imagesmv images apex-images
# delete things we do not need anymorerm .env.ordsrm -r ords-secrets
# add ORDS relevant environment variablesecho "DBSERVICENAME=\"FREEPDB1\"" >>.envecho "DBHOST=\"23ai\"" >>.envecho "DBPORT=\"1521\"" >>.envecho "FORCE_SECURE=\"false\"" >>.env
Stop the containers
Section titled “Stop the containers”local-23ai.sh stop
Switch branch
Section titled “Switch branch”If you don’t have the repository cloned yet, you can clone from GitHub.
git fetchgit checkout 25-3
Give permission to all new scripts
Section titled “Give permission to all new scripts”chmod +x ./local-23ai.sh ./setup.sh ./scripts/*.sh
Start the containers
Section titled “Start the containers”local-23ai.sh start
Caution: HTTPS
Section titled “Caution: HTTPS”If you use HTTPS, you need to know go to https://localhost:8443/ords
to access ORDS.
Disable password expiration
Section titled “Disable password expiration”Run this script as the sys
user. You can use sqlcl
: sql -name local-23ai-sys
or with the SQL Developer connection local-23ai-sys
.
declare l_username varchar2(100);begin select creator into l_username from PUBLICSYN where SNAME = 'APEX_UTIL' fetch first 1 row only;
execute IMMEDIATE ' update ' || l_username || q'!.wwv_flow_platform_prefs set VALUE = 10000 where NAME = 'ACCOUNT_LIFETIME_DAYS' !'; commit;end;/
Optional: delete old docker images
Section titled “Optional: delete old docker images”docker image lsdocker image rm {image_name}
Hotfix: DEBUG env var
Section titled “Hotfix: DEBUG env var”(The new SQLcl version also uses this variable to output debug information. As some scripts read the output of SQLcl, it can cause issues.)
If you don’t have it in your .env
file, you can proceed without any changes.