[[["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-25 UTC."],[[["\u003cp\u003eAlloyDB Omni does not inherently include the orafce extension, but it can be manually added to an existing installation.\u003c/p\u003e\n"],["\u003cp\u003eAdding orafce involves identifying your specific AlloyDB Omni version number using a Docker or Podman command.\u003c/p\u003e\n"],["\u003cp\u003eYou must create a new Docker container with orafce by creating a new \u003ccode\u003eDockerfile\u003c/code\u003e and running a build command, specifying your version of Omni.\u003c/p\u003e\n"],["\u003cp\u003eAfter creating the new container, you need to connect to your database and then enable the orafce extension by running the command \u003ccode\u003eCREATE EXTENSION IF NOT EXISTS ORAFCE;\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSome functions within orafce, specifically \u003ccode\u003edbms_utility.format_call_stack\u003c/code\u003e and \u003ccode\u003edbms_output.get_line\u003c/code\u003e, are not recommended for use on AlloyDB Omni due to known issues.\u003c/p\u003e\n"]]],[],null,["# Install orafce for AlloyDB Omni\n\nSelect a documentation version: 15.7.0keyboard_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 to provide additional functions and operators from the Oracle database.\n\n\u003cbr /\u003e\n\nBefore you begin\n----------------\n\nEnsure that you've [installed AlloyDB Omni](/alloydb/omni/15.7.0/docs/install) 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\n\u003cbr /\u003e\n\n1. Find your installed AlloyDB Omni version labels:\n\n ### Docker\n\n ```docker\n docker run --rm -it google/alloydbomni cat VERSION.txt\n ```\n\n ### Podman\n\n ```text\n podman run --rm -it google/alloydbomni cat VERSION.txt\n ```\n\n The output is similar to the following: \n\n ```\n AlloyDB Omni version: 15.7.0\n ```\n\n Take note of the AlloyDB Omni 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 from the previous step---for example, `15.7.0`.\n3. Create a new AlloyDB Omni container that includes orafce:\n\n ### Linux\n\n\n mkdir ~/alloydb-omni-orafce\n tee -a ~/alloydb-omni-orafce/Dockerfile \u003c\u003c EOF\n ARG OMNI_VERSION\n FROM google/alloydbomni:${OMNI_VERSION}\n RUN apt-get update && \n\n apt-get install -y --no-install-recommends \n\n postgresql-15-orafce && \n\n apt-get purge -y --auto-remove && \n\n rm -rf /var/lib/apt/lists/*\n EOF\n cd ~/alloydb-omni-orafce\n sudo docker build --build-arg OMNI_VERSION=$OMNI_VERSION --tag google/alloydbomni-with-orafce:$OMNI_VERSION .\n \n \u003cbr /\u003e\n\n ### macOS\n\n\n mkdir ~/alloydb-omni-orafce\n tee -a ~/alloydb-omni-orafce/Dockerfile \u003c\u003c EOF\n ARG OMNI_VERSION\n FROM google/alloydbomni:${OMNI_VERSION}\n RUN apt-get update && \n\n apt-get install -y --no-install-recommends \n\n postgresql-15-orafce && \n\n apt-get purge -y --auto-remove && \n\n rm -rf /var/lib/apt/lists/*\n EOF\n cd ~/alloydb-omni-orafce\n sudo docker build --build-arg OMNI_VERSION=$OMNI_VERSION --tag google/alloydbomni-with-orafce:$OMNI_VERSION .\n \n \u003cbr /\u003e\n\n4. Create a new container with AlloyDB Omni named `my-omni-orafce`:\n\n ```\n docker run --name my-omni-orafce -e POSTGRES_PASSWORD=NEW_PASSWORD -d google/alloydbomni-with-orafce:OMNI_VERSION\n ```\n5. Connect to your database with the orafce extension:\n\n ```\n docker exec -it my-omni-orafce psql -h localhost -U postgres\n ```\n6. Enable orafce: \n\n ```sql\n CREATE EXTENSION IF NOT EXISTS ORAFCE;\n ```\n7. Confirm that orafce is installed and enabled:\n\n ```sql\n SELECT oracle.sysdate();\n ```\n\n The output looks similar to the following: \n\n postgres=# SELECT oracle.sysdate();\n sysdate\n ---------------------\n 2024-06-10 16:36:30\n (1 row)\n\n\u003cbr /\u003e\n\n| **Note:** Due to some known issues with the orafce extension on AlloyDB Omni, we don't recommend using the `dbms_utility.format_call_stack` and `dbms_output.get_line` functions."]]