[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eAlloyDB Omni does not inherently include the Orafce extension, but it can be manually added to existing installations.\u003c/p\u003e\n"],["\u003cp\u003eBefore adding Orafce, you must have both AlloyDB Omni and the AlloyDB Omni CLI installed on your system.\u003c/p\u003e\n"],["\u003cp\u003eThe process involves determining your current AlloyDB Omni database server version to create a new container image that includes Orafce.\u003c/p\u003e\n"],["\u003cp\u003eAfter building the custom container, you must update the \u003ccode\u003ePG_IMAGE\u003c/code\u003e variable within the \u003ccode\u003edataplane.conf\u003c/code\u003e file to use the new image, and restart the server.\u003c/p\u003e\n"],["\u003cp\u003eWhile Orafce can be installed, it is not recommended to use the \u003ccode\u003edbms_utility.format_call_stack\u003c/code\u003e and \u003ccode\u003edbms_output.get_line\u003c/code\u003e functions due to known issues.\u003c/p\u003e\n"]]],[],null,["# Install Orafce for AlloyDB Omni\n\nSelect a documentation version: 15.5.2keyboard_arrow_down\n\n- [Current (16.8.0)](/alloydb/omni/current/docs/install-orafce)\n- [16.8.0](/alloydb/omni/16.8.0/docs/install-orafce)\n- [16.3.0](/alloydb/omni/16.3.0/docs/install-orafce)\n- [15.12.0](/alloydb/omni/15.12.0/docs/install-orafce)\n- [15.7.1](/alloydb/omni/15.7.1/docs/install-orafce)\n- [15.7.0](/alloydb/omni/15.7.0/docs/install-orafce)\n- [15.5.5](/alloydb/omni/15.5.5/docs/install-orafce)\n- [15.5.4](/alloydb/omni/15.5.4/docs/install-orafce)\n- [15.5.2](/alloydb/omni/15.5.2/docs/install-orafce)\n\n\u003cbr /\u003e\n\nAlloyDB Omni does not include the Orafce extension, but you can manually add it to an existing AlloyDB Omni installation by following the instructions on this page.\n\n\u003cbr /\u003e\n\nBefore you begin\n----------------\n\nEnsure that you meet the following system requirements:\n\n- You've [installed AlloyDB Omni](/alloydb/omni/15.5.2/docs/install)\n on your system.\n\n- You've [installed the AlloyDB Omni\n CLI](/alloydb/omni/15.5.2/docs/omni-cli) on your system.\n\nAdd Orafce to your AlloyDB Omni installation\n--------------------------------------------\n\nTo add the Orafce extension to your AlloyDB Omni installation,\nfollow these steps:\n\n1. Find your installed AlloyDB Omni version labels: \n\n ```text\n sudo alloydb version\n ```\n\n The output is similar to the following: \n\n ```\n AlloyDB Omni CLI version: 1.0\n AlloyDB Omni database server version: 15.2.0\n ```\n\n Take note of the database server version number; you need it in the next step.\n2. Set the `OMNI_VERSION` environment variable: \n\n ```bash\n OMNI_VERSION=VERSION\n ```\n\n Replace \u003cvar translate=\"no\"\u003eVERSION\u003c/var\u003e with the complete database server version\n from the previous step---for example, `15.2.0`.\n3. Create a new AlloyDB Omni container that includes Orafce: \n\n mkdir ~/alloydb-omni-orafce\n tee -a ~/alloydb-omni-orafce/Dockerfile \u003c\u003c EOF\n ARG OMNI_VERSION\n\n FROM postgres:15-bookworm as postgres\n\n RUN apt-get update && \\\n apt-get install -y --no-install-recommends \\\n postgresql-15-orafce && \\\n apt-get purge -y --auto-remove && \\\n rm -rf /var/lib/apt/lists/*\n\n FROM gcr.io/alloydb-omni/pg-service:${OMNI_VERSION}\n\n COPY --from=postgres /usr/lib/postgresql/15/lib/orafce.so /lib/orafce.so\n COPY --from=postgres /usr/share/postgresql/15/extension/orafce* /share/extension/\n\n COPY --from=postgres /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/\n COPY --from=postgres /lib/x86_64-linux-gnu/ /lib/x86_64-linux-gnu/\n EOF\n\n cd ~/alloydb-omni-orafce\n\n sudo docker build --build-arg OMNI_VERSION=$OMNI_VERSION --tag gcr.io/alloydb-omni/pg-service-with-orafce:$OMNI_VERSION .\n\n4. Stop the database server: \n\n ```\n sudo alloydb database-server stop\n ```\n5. Open `/var/alloydb/config/dataplane.conf` in a text editor.\n6. Modify the line that defines the `PG_IMAGE` variable so that it refers to the container that you built in a previous step: \n\n ```\n PG_IMAGE=gcr.io/alloydb-omni/pg-service-with-orafce\n ```\n7. Start AlloyDB Omni: \n\n ```\n sudo alloydb database-server start\n ```\n8. Connect to your database: \n\n ```\n sudo docker exec -it pg-service psql -h localhost -U postgres\n ```\n9. Enable Orafce: \n\n ```sql\n CREATE EXTENSION IF NOT EXISTS ORAFCE;\n ```\n10. Confirm that Orafce is installed and enabled: \n\n ```sql\n SELECT oracle.sysdate();\n ```\n\n| **Note:** Due to some known issues with the Orafce extension on AlloyDB Omni, we do not recommend using `dbms_utility.format_call_stack` and `dbms_output.get_line` functions."]]