<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: install Oracle Instant Client in Warehousing &amp; Analytics</title>
    <link>https://community.databricks.com/t5/warehousing-analytics/install-oracle-instant-client/m-p/76620#M1425</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/108129"&gt;@VKe&lt;/a&gt;,&lt;BR /&gt;I'm reaching out in case you're still troubleshooting connecting to your Oracle database from Databricks. Here are some key points to consider:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Initialization Script Location:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;While older examples used DBFS for init scripts, Unity Catalog might require storing them in volumes or Azure Blob Storage (ABFS) for persistence.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;2. Shared Environment Permissions:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Shared environments no longer provide root access. The spark-users group lacks permissions for folders created by root in the init script.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;3. Single User Environment Solution (Script):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This script installs the Oracle JDBC driver and sets environment variables. It assumes a single user environment create a shell script file and upload it to Volumes folder of your choice (please do not forget to convert EOL to Unix if using windows to create the file):&lt;/P&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Bash&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;#!/bin/bash&lt;/SPAN&gt;

&lt;SPAN class=""&gt;# Install libaio (if needed)&lt;/SPAN&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install -y libaio1

&lt;SPAN class=""&gt;# Download Oracle Instant Client&lt;/SPAN&gt;
&lt;SPAN class=""&gt;wget --quiet -O /tmp/instantclient-basiclite-linuxx64.zip https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip&lt;/SPAN&gt;

&lt;SPAN class=""&gt;# Create Oracle directory&lt;/SPAN&gt;
mkdir /opt/oracle

&lt;SPAN class=""&gt;# Unzip and move Instant Client&lt;/SPAN&gt;
yes | &lt;SPAN class=""&gt;unzip /tmp/instantclient-basiclite-linuxx64.zip -d /databricks/driver/oracle_ctl/
mv /databricks/driver/oracle_ctl/instantclient* /databricks/driver/oracle_ctl/instantclient&lt;/SPAN&gt;

&lt;SPAN class=""&gt;# Set environment variables&lt;/SPAN&gt;
&lt;SPAN class=""&gt;export&lt;/SPAN&gt; LD_LIBRARY_PATH=/databricks/driver/oracle_ctl/instantclient:&lt;SPAN class=""&gt;$LD_LIBRARY_PATH&lt;/SPAN&gt;
&lt;SPAN class=""&gt;export&lt;/SPAN&gt; ORACLE_HOME=/databricks/driver/oracle_ctl/instantclient
&lt;SPAN class=""&gt;export&lt;/SPAN&gt; PATH=&lt;SPAN class=""&gt;$ORACLE_HOME&lt;/SPAN&gt;:&lt;SPAN class=""&gt;$PATH&lt;/SPAN&gt;

&lt;SPAN class=""&gt;# Update library discovery&lt;/SPAN&gt;
&lt;SPAN class=""&gt;echo&lt;/SPAN&gt; &lt;SPAN class=""&gt;"/databricks/driver/oracle_ctl/instantclient"&lt;/SPAN&gt; &amp;gt; /etc/ld.so.conf.d/oracle-instantclient.conf
ldconfig&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;4. Unrestricted Environment without Unity Catalog (Code):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For unrestricted environments without Unity Catalog, use this code in your cluster notebook:&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Python&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;dbutils.fs.put(&lt;SPAN class=""&gt;"/databricks/init/init_oc.sh"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;"""
#!/bin/bash

sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install -y libaio1
mkdir -p /opt/oracle
wget -q -O /opt/oracle/instantclient-basic.zip https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip
cd /opt/oracle
unzip -o instantclient-basic.zip
mv instantclient* instantclient
export LD_LIBRARY_PATH=/opt/oracle/instantclient:$LD_LIBRARY_PATH
export ORACLE_HOME=/opt/oracle/instantclient
export PATH=$ORACLE_HOME:$PATH
echo "/opt/oracle/instantclient" &amp;gt; /etc/ld.so.conf.d/oracle-instantclient.conf
ldconfig
"""&lt;/SPAN&gt;, &lt;SPAN class=""&gt;True&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Let me know if you have any questions or if this works for you.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2024 13:28:26 GMT</pubDate>
    <dc:creator>Zair</dc:creator>
    <dc:date>2024-07-03T13:28:26Z</dc:date>
    <item>
      <title>install Oracle Instant Client</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/install-oracle-instant-client/m-p/73743#M1386</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;I want to install Oracle Instant Client to be able to use python-oracledb in Thick-Mode because one of our databases is old and cannot be reached in Thin-Mode. I have tried the solution from &lt;A href="https://community.databricks.com/t5/community-discussions/action-required-init-scripts-on-dbfs-will-stop-working/td-p/61477" target="_self"&gt;this post&lt;/A&gt;, but it doesn't help me. It seems that the init script does not create the folder with the Instant Client. Is it still possible to install the Instant Client using DBFS?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 07:47:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/install-oracle-instant-client/m-p/73743#M1386</guid>
      <dc:creator>VKe</dc:creator>
      <dc:date>2024-06-13T07:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: install Oracle Instant Client</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/install-oracle-instant-client/m-p/76620#M1425</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/108129"&gt;@VKe&lt;/a&gt;,&lt;BR /&gt;I'm reaching out in case you're still troubleshooting connecting to your Oracle database from Databricks. Here are some key points to consider:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Initialization Script Location:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;While older examples used DBFS for init scripts, Unity Catalog might require storing them in volumes or Azure Blob Storage (ABFS) for persistence.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;2. Shared Environment Permissions:&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Shared environments no longer provide root access. The spark-users group lacks permissions for folders created by root in the init script.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;3. Single User Environment Solution (Script):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;This script installs the Oracle JDBC driver and sets environment variables. It assumes a single user environment create a shell script file and upload it to Volumes folder of your choice (please do not forget to convert EOL to Unix if using windows to create the file):&lt;/P&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;&lt;SPAN class=""&gt;Bash&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;#!/bin/bash&lt;/SPAN&gt;

&lt;SPAN class=""&gt;# Install libaio (if needed)&lt;/SPAN&gt;
sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install -y libaio1

&lt;SPAN class=""&gt;# Download Oracle Instant Client&lt;/SPAN&gt;
&lt;SPAN class=""&gt;wget --quiet -O /tmp/instantclient-basiclite-linuxx64.zip https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip&lt;/SPAN&gt;

&lt;SPAN class=""&gt;# Create Oracle directory&lt;/SPAN&gt;
mkdir /opt/oracle

&lt;SPAN class=""&gt;# Unzip and move Instant Client&lt;/SPAN&gt;
yes | &lt;SPAN class=""&gt;unzip /tmp/instantclient-basiclite-linuxx64.zip -d /databricks/driver/oracle_ctl/
mv /databricks/driver/oracle_ctl/instantclient* /databricks/driver/oracle_ctl/instantclient&lt;/SPAN&gt;

&lt;SPAN class=""&gt;# Set environment variables&lt;/SPAN&gt;
&lt;SPAN class=""&gt;export&lt;/SPAN&gt; LD_LIBRARY_PATH=/databricks/driver/oracle_ctl/instantclient:&lt;SPAN class=""&gt;$LD_LIBRARY_PATH&lt;/SPAN&gt;
&lt;SPAN class=""&gt;export&lt;/SPAN&gt; ORACLE_HOME=/databricks/driver/oracle_ctl/instantclient
&lt;SPAN class=""&gt;export&lt;/SPAN&gt; PATH=&lt;SPAN class=""&gt;$ORACLE_HOME&lt;/SPAN&gt;:&lt;SPAN class=""&gt;$PATH&lt;/SPAN&gt;

&lt;SPAN class=""&gt;# Update library discovery&lt;/SPAN&gt;
&lt;SPAN class=""&gt;echo&lt;/SPAN&gt; &lt;SPAN class=""&gt;"/databricks/driver/oracle_ctl/instantclient"&lt;/SPAN&gt; &amp;gt; /etc/ld.so.conf.d/oracle-instantclient.conf
ldconfig&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;4. Unrestricted Environment without Unity Catalog (Code):&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;For unrestricted environments without Unity Catalog, use this code in your cluster notebook:&lt;/P&gt;&lt;DIV class=""&gt;&lt;SPAN class=""&gt;Python&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;PRE&gt;dbutils.fs.put(&lt;SPAN class=""&gt;"/databricks/init/init_oc.sh"&lt;/SPAN&gt;, &lt;SPAN class=""&gt;"""
#!/bin/bash

sudo apt-get update &amp;amp;&amp;amp; sudo apt-get install -y libaio1
mkdir -p /opt/oracle
wget -q -O /opt/oracle/instantclient-basic.zip https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip
cd /opt/oracle
unzip -o instantclient-basic.zip
mv instantclient* instantclient
export LD_LIBRARY_PATH=/opt/oracle/instantclient:$LD_LIBRARY_PATH
export ORACLE_HOME=/opt/oracle/instantclient
export PATH=$ORACLE_HOME:$PATH
echo "/opt/oracle/instantclient" &amp;gt; /etc/ld.so.conf.d/oracle-instantclient.conf
ldconfig
"""&lt;/SPAN&gt;, &lt;SPAN class=""&gt;True&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Let me know if you have any questions or if this works for you.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 13:28:26 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/install-oracle-instant-client/m-p/76620#M1425</guid>
      <dc:creator>Zair</dc:creator>
      <dc:date>2024-07-03T13:28:26Z</dc:date>
    </item>
    <item>
      <title>Re: install Oracle Instant Client</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/install-oracle-instant-client/m-p/100904#M1733</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/42905"&gt;@Zair&lt;/a&gt;&amp;nbsp; I used your code but it still not working for me. My environment variables are still empty. This is what i did&lt;/P&gt;&lt;P&gt;1. I ran the script to download the instant client into a workspace directory as dbfs is no longer supported for init files&lt;BR /&gt;2. I added the script path to my cluster and restarted my cluster but nothing shows up&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2024 12:39:34 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/install-oracle-instant-client/m-p/100904#M1733</guid>
      <dc:creator>ovbieAmen</dc:creator>
      <dc:date>2024-12-04T12:39:34Z</dc:date>
    </item>
    <item>
      <title>Re: install Oracle Instant Client</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/install-oracle-instant-client/m-p/102070#M1754</link>
      <description>&lt;P&gt;What about shared compute, is it possible? Neither of those scripts is working for me really...&lt;/P&gt;</description>
      <pubDate>Fri, 13 Dec 2024 14:27:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/install-oracle-instant-client/m-p/102070#M1754</guid>
      <dc:creator>NelsonE</dc:creator>
      <dc:date>2024-12-13T14:27:21Z</dc:date>
    </item>
    <item>
      <title>Re: install Oracle Instant Client</title>
      <link>https://community.databricks.com/t5/warehousing-analytics/install-oracle-instant-client/m-p/104713#M1802</link>
      <description>&lt;P&gt;I used a personal compute and it worked&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jan 2025 14:29:22 GMT</pubDate>
      <guid>https://community.databricks.com/t5/warehousing-analytics/install-oracle-instant-client/m-p/104713#M1802</guid>
      <dc:creator>ovbieAmen</dc:creator>
      <dc:date>2025-01-08T14:29:22Z</dc:date>
    </item>
  </channel>
</rss>

