<?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 Read data from Azure SQL DB in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/read-data-from-azure-sql-db/m-p/10546#M5712</link>
    <description>&lt;P&gt;I am trying to read data into a dataframe from Azure SQL DB, using jdbc.  Here is the code I am using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
&amp;nbsp;
database_host = "server.database.windows.net"
database_port = "1433" 
database_name = "database"
table = "table1"
user = "user@abc.com"
password = "Passwrod123"
&amp;nbsp;
url = f"jdbc:sqlserver://{database_host}:{database_port};database={database_name};"
&amp;nbsp;
&amp;nbsp;
df = (spark.read
  .format("jdbc")
  .option("driver", driver)
  .option("url", url)
  .option("dbtable", table)
  .option("user", user)
  .option("password", password)
  .load()
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here is the error I am receiving:&lt;/P&gt;&lt;P&gt;com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open server "abc.com" requested by the login.  The login failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user does have permission to the server and database and can log in just fine using SSMS or Azure Data Studio.  Is there some other configuration that I need to do so Databricks can talk to Azure SQL DB?  What am I missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
    <pubDate>Fri, 27 Jan 2023 18:40:12 GMT</pubDate>
    <dc:creator>AB_MN</dc:creator>
    <dc:date>2023-01-27T18:40:12Z</dc:date>
    <item>
      <title>Read data from Azure SQL DB</title>
      <link>https://community.databricks.com/t5/data-engineering/read-data-from-azure-sql-db/m-p/10546#M5712</link>
      <description>&lt;P&gt;I am trying to read data into a dataframe from Azure SQL DB, using jdbc.  Here is the code I am using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
&amp;nbsp;
database_host = "server.database.windows.net"
database_port = "1433" 
database_name = "database"
table = "table1"
user = "user@abc.com"
password = "Passwrod123"
&amp;nbsp;
url = f"jdbc:sqlserver://{database_host}:{database_port};database={database_name};"
&amp;nbsp;
&amp;nbsp;
df = (spark.read
  .format("jdbc")
  .option("driver", driver)
  .option("url", url)
  .option("dbtable", table)
  .option("user", user)
  .option("password", password)
  .load()
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here is the error I am receiving:&lt;/P&gt;&lt;P&gt;com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open server "abc.com" requested by the login.  The login failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The user does have permission to the server and database and can log in just fine using SSMS or Azure Data Studio.  Is there some other configuration that I need to do so Databricks can talk to Azure SQL DB?  What am I missing?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 18:40:12 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/read-data-from-azure-sql-db/m-p/10546#M5712</guid>
      <dc:creator>AB_MN</dc:creator>
      <dc:date>2023-01-27T18:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from Azure SQL DB</title>
      <link>https://community.databricks.com/t5/data-engineering/read-data-from-azure-sql-db/m-p/10547#M5713</link>
      <description>&lt;P&gt;Hi there. Probably you also need to specify the correct authentication mechanism to get to the database. Try this one and check if it helps: &lt;A href="https://learn.microsoft.com/en-us/sql/connect/jdbc/connecting-using-azure-active-directory-authentication?view=sql-server-ver15" target="test_blank"&gt;https://learn.microsoft.com/en-us/sql/connect/jdbc/connecting-using-azure-active-directory-authentication?view=sql-server-ver15&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 20:29:47 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/read-data-from-azure-sql-db/m-p/10547#M5713</guid>
      <dc:creator>NakedSnake</dc:creator>
      <dc:date>2023-01-27T20:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from Azure SQL DB</title>
      <link>https://community.databricks.com/t5/data-engineering/read-data-from-azure-sql-db/m-p/10548#M5714</link>
      <description>&lt;P&gt;That did the trick.  Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 20:50:14 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/read-data-from-azure-sql-db/m-p/10548#M5714</guid>
      <dc:creator>AB_MN</dc:creator>
      <dc:date>2023-01-27T20:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from Azure SQL DB</title>
      <link>https://community.databricks.com/t5/data-engineering/read-data-from-azure-sql-db/m-p/48481#M28311</link>
      <description>&lt;P&gt;Hi, I am facing the same error. I have my script as below. database is using Sql Server Authentication. I am not sure how to add the option of authentication. Also, I have a doubt that DB level also some permission is missing for the user login. Can you please guide.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Upen_databricks_0-1696539165225.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/4299i907311CAFECCCD25/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Upen_databricks_0-1696539165225.png" alt="Upen_databricks_0-1696539165225.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 20:54:13 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/read-data-from-azure-sql-db/m-p/48481#M28311</guid>
      <dc:creator>Upen_databricks</dc:creator>
      <dc:date>2023-10-05T20:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Read data from Azure SQL DB</title>
      <link>https://community.databricks.com/t5/data-engineering/read-data-from-azure-sql-db/m-p/48486#M28313</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi, I am facing the same error. I have my script as below. database is using Sql Server Authentication. I am not sure how to add the option of authentication. Also, I have a doubt that DB level also some permission is missing for the user login. Can you please guide.&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Upen_databricks_2-1696539350017.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/4301iE2A7B3455674B2AF/image-size/medium/is-moderation-mode/true?v=v2&amp;amp;px=400" role="button" title="Upen_databricks_2-1696539350017.png" alt="Upen_databricks_2-1696539350017.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 20:55:57 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/read-data-from-azure-sql-db/m-p/48486#M28313</guid>
      <dc:creator>Upen_databricks</dc:creator>
      <dc:date>2023-10-05T20:55:57Z</dc:date>
    </item>
  </channel>
</rss>

