<?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: deadlock occurs with use statement in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/deadlock-occurs-with-use-statement/m-p/135155#M50288</link>
    <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/176316"&gt;@donlxz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try improving the JDBC URL like&amp;nbsp;&lt;/P&gt;&lt;P&gt;jdbc:databricks://adb-1234567890123456.7.azuredatabricks.net:443/my_schema;&lt;BR /&gt;HttpPath=/sql/1.0/endpoints/abcd1234;&lt;BR /&gt;AuthMech=3;&lt;BR /&gt;UID=myuser;&lt;BR /&gt;PWD=mypassword;&lt;BR /&gt;Catalog=my_catalog;&lt;BR /&gt;Schema=my_schema;&lt;BR /&gt;RetryCount=5;&lt;BR /&gt;RetryInterval=2000;&lt;/P&gt;&lt;P&gt;On data bricks side&lt;/P&gt;&lt;P&gt;Workload design Separate concurrent ETL jobs into different schemas or catalogs Prevents two jobs from contending for locks on the same schema&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ManojkMohan_0-1760633900284.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20786i5AF9ACE790E1429E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ManojkMohan_0-1760633900284.png" alt="ManojkMohan_0-1760633900284.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;SQL design best practice Use fully qualified table names instead of relying on USE Eliminates the need for schema context switching&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ManojkMohan_1-1760634022800.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20787i66C0B69D373E1A77/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ManojkMohan_1-1760634022800.png" alt="ManojkMohan_1-1760634022800.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Monitoring and troubleshooting Track queries causing deadlocks using Databricks system tables Helps identify which workflow/session caused the lock&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ManojkMohan_2-1760634164823.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20788iBEB5EB8C54A87171/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ManojkMohan_2-1760634164823.png" alt="ManojkMohan_2-1760634164823.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Cache meta data as best practise&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ManojkMohan_3-1760634260341.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20789iA50AF12494FDDF69/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ManojkMohan_3-1760634260341.png" alt="ManojkMohan_3-1760634260341.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Oct 2025 17:05:25 GMT</pubDate>
    <dc:creator>ManojkMohan</dc:creator>
    <dc:date>2025-10-16T17:05:25Z</dc:date>
    <item>
      <title>deadlock occurs with use statement</title>
      <link>https://community.databricks.com/t5/data-engineering/deadlock-occurs-with-use-statement/m-p/134988#M50244</link>
      <description>&lt;P&gt;&lt;SPAN&gt;When issuing a query from Informatica using a Delta connection, the statement&amp;nbsp;&lt;/SPAN&gt;use catalog_name.schema_name&lt;SPAN&gt;&amp;nbsp;is executed first. At that time, the following error appeared in the query history:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Query could not be scheduled: (conn=5073499)&lt;BR /&gt;Deadlock found when trying to get lock; try restarting transaction&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I understand that deadlocks can occur when multiple Informatica workflows are writing to the same table at the same time, but I’m not sure why this would happen with a USE statement.&lt;/P&gt;&lt;P&gt;Has anyone else experienced this situation?&lt;/P&gt;</description>
      <pubDate>Wed, 15 Oct 2025 11:29:52 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deadlock-occurs-with-use-statement/m-p/134988#M50244</guid>
      <dc:creator>donlxz</dc:creator>
      <dc:date>2025-10-15T11:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: deadlock occurs with use statement</title>
      <link>https://community.databricks.com/t5/data-engineering/deadlock-occurs-with-use-statement/m-p/134991#M50245</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/176316"&gt;@donlxz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Informatica documentation and community discussions mention deadlock retry strategies, primarily for DML operations. However, metadata locks for catalog or schema operations can also lead to deadlocks.&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.informatica.com/data-integration/powercenter/10-5/workflow-basics-guide/targets/working-with-relational-targets/deadlock-retry.html" target="_blank"&gt;https://docs.informatica.com/data-integration/powercenter/10-5/workflow-basics-guide/targets/working-with-relational-targets/deadlock-retry.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Solution thinking:&lt;/P&gt;&lt;P&gt;To prevent deadlocks related to USE statements and metadata locking:&lt;/P&gt;&lt;P&gt;Serialization of Workflows&lt;BR /&gt;Schedule workflows that write to the same catalog or schema to avoid running at the same time. This will reduce lock contention on metadata.&lt;/P&gt;&lt;P&gt;Implement Deadlock Retry Logic&lt;BR /&gt;Set up Informatica session properties to retry on deadlock errors with a backoff delay. This includes specifying deadlock retry counts and wait times, as supported by Informatica PowerCenter.&lt;/P&gt;&lt;P&gt;&lt;A href="https://network.informatica.com/s/question/0D56S0000AD6vkxSQB/how-to-avoid-deadlocks-when-to-session-access-one-table-at-same-time" target="_blank"&gt;https://network.informatica.com/s/question/0D56S0000AD6vkxSQB/how-to-avoid-deadlocks-when-to-session-access-one-table-at-same-time&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.informatica.com/data-integration/powercenter/10-5/transformation-guide/lookup-transformation/database-deadlock-resilience.html" target="_blank"&gt;https://docs.informatica.com/data-integration/powercenter/10-5/transformation-guide/lookup-transformation/database-deadlock-resilience.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Oct 2025 11:53:53 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deadlock-occurs-with-use-statement/m-p/134991#M50245</guid>
      <dc:creator>ManojkMohan</dc:creator>
      <dc:date>2025-10-15T11:53:53Z</dc:date>
    </item>
    <item>
      <title>Re: deadlock occurs with use statement</title>
      <link>https://community.databricks.com/t5/data-engineering/deadlock-occurs-with-use-statement/m-p/135114#M50279</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/155141"&gt;@ManojkMohan&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;BR /&gt;I understand that adjustments are needed on the Informatica side, and I’ll ask them to review the deadlock retry settings.&lt;BR /&gt;Is there anything that can be changed or configured on the Databricks side to help with this issue?&lt;/P&gt;&lt;P&gt;Also, is it possible to avoid deadlocks by tweaking the JDBC driver’s retry strategy?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="donlxz_0-1760618637296.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20769i4D00B6D0F268F125/image-size/medium?v=v2&amp;amp;px=400" role="button" title="donlxz_0-1760618637296.png" alt="donlxz_0-1760618637296.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 12:44:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deadlock-occurs-with-use-statement/m-p/135114#M50279</guid>
      <dc:creator>donlxz</dc:creator>
      <dc:date>2025-10-16T12:44:03Z</dc:date>
    </item>
    <item>
      <title>Re: deadlock occurs with use statement</title>
      <link>https://community.databricks.com/t5/data-engineering/deadlock-occurs-with-use-statement/m-p/135155#M50288</link>
      <description>&lt;P&gt;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/176316"&gt;@donlxz&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try improving the JDBC URL like&amp;nbsp;&lt;/P&gt;&lt;P&gt;jdbc:databricks://adb-1234567890123456.7.azuredatabricks.net:443/my_schema;&lt;BR /&gt;HttpPath=/sql/1.0/endpoints/abcd1234;&lt;BR /&gt;AuthMech=3;&lt;BR /&gt;UID=myuser;&lt;BR /&gt;PWD=mypassword;&lt;BR /&gt;Catalog=my_catalog;&lt;BR /&gt;Schema=my_schema;&lt;BR /&gt;RetryCount=5;&lt;BR /&gt;RetryInterval=2000;&lt;/P&gt;&lt;P&gt;On data bricks side&lt;/P&gt;&lt;P&gt;Workload design Separate concurrent ETL jobs into different schemas or catalogs Prevents two jobs from contending for locks on the same schema&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ManojkMohan_0-1760633900284.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20786i5AF9ACE790E1429E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ManojkMohan_0-1760633900284.png" alt="ManojkMohan_0-1760633900284.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;SQL design best practice Use fully qualified table names instead of relying on USE Eliminates the need for schema context switching&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ManojkMohan_1-1760634022800.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20787i66C0B69D373E1A77/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ManojkMohan_1-1760634022800.png" alt="ManojkMohan_1-1760634022800.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Monitoring and troubleshooting Track queries causing deadlocks using Databricks system tables Helps identify which workflow/session caused the lock&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ManojkMohan_2-1760634164823.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20788iBEB5EB8C54A87171/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ManojkMohan_2-1760634164823.png" alt="ManojkMohan_2-1760634164823.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Cache meta data as best practise&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ManojkMohan_3-1760634260341.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/20789iA50AF12494FDDF69/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ManojkMohan_3-1760634260341.png" alt="ManojkMohan_3-1760634260341.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 17:05:25 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deadlock-occurs-with-use-statement/m-p/135155#M50288</guid>
      <dc:creator>ManojkMohan</dc:creator>
      <dc:date>2025-10-16T17:05:25Z</dc:date>
    </item>
    <item>
      <title>Re: deadlock occurs with use statement</title>
      <link>https://community.databricks.com/t5/data-engineering/deadlock-occurs-with-use-statement/m-p/135210#M50305</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I’ll try making adjustments on the Informatica side.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your help.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Oct 2025 07:58:30 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/deadlock-occurs-with-use-statement/m-p/135210#M50305</guid>
      <dc:creator>donlxz</dc:creator>
      <dc:date>2025-10-17T07:58:30Z</dc:date>
    </item>
  </channel>
</rss>

