Before you begin
Install AlloyDB Omni on your system.
Add orafce to your AlloyDB Omni installation
To add the orafce extension to your AlloyDB Omni installation, follow these steps:
-
Add the PostgreSQL Yum Repository:
sudo dnf install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-9-x86_64/pgdg-redhat-repo-latest.noarch.rpm -
Install PostgreSQL server and development packages:
sudo dnf install -y "postgresql17-server" -
Install the Orafce extension:
sudo dnf install -y orafce_17 -
Create required symlinks so the extensions are in the expected paths:
set -e PGVER = "17" sudo mkdir -p "/usr/lib/postgresql/ ${ PGVER } /share/extension" for file in /usr/pgsql- ${ PGVER } /share/extension/* ; do target = "/usr/lib/postgresql/ ${ PGVER } /share/extension/ $( basename " $file " ) " if [[ ! -e " $target " ]] ; then sudo ln -s " $file " " $target " || ( echo "Failed to link \" $file \" to \" $target \", exiting." && exit 1 ) echo "Created extension link for $( basename " $file " ) " else echo "Target $target already exists." fi done sudo mkdir -p "/usr/lib/postgresql/ ${ PGVER } /lib" for file in /usr/pgsql- ${ PGVER } /lib/* ; do if [[ ! -e " $target " ]] ; then sudo ln -s " $file " " $target " || ( echo "Failed to link \" $file \" to \" $target \", exiting." && exit 1 ) echo "Created lib link for $( basename " $file " ) " else echo "Target $target already exists." fi done -
Connect to your database with the orafce extension:
/usr/lib/postgresql/17/bin/psql -h localhost -U postgres -
Enable orafce:
CREATE EXTENSION IF NOT EXISTS ORAFCE ; -
Confirm that orafce is installed and enabled:
SELECT oracle . sysdate ();The output is similar to the following:
postgres=# SELECT oracle.sysdate(); sysdate --------------------- 2025-12-12 16:36:30 (1 row)

