<?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 SQL to find the version name that is locking default version in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/sql-to-find-the-version-name-that-is-locking/m-p/1497517#M9111</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm seeking the most effective method to identify which version is locking the default version before initiating maintenance routines. This is my current approach, but I'm uncertain about its correctness.&lt;/P&gt;&lt;P&gt;Any suggestions on this matter would be greatly appreciated.&lt;/P&gt;&lt;P&gt;1. Find witch one is blocking:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;select p.owner,oselect p.owner,o.lock_time
from sde.OBJECT_LOCKS o
inner join sde.process_information p on o.sde_id = p.sde_id
where object_id = 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.get the process info:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;select sde_id from process_information
where owner = 'U2PH5'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.get state_id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;select state_id from STATE_Locks
where sde_id in (606147,606139)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4.get the version name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;select NAME from versions where state_id in(5690105,
5690987,
5691192,
5690541,
5691075)&lt;/LI-CODE&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>Wed, 26 Jun 2024 10:21:44 GMT</pubDate>
    <dc:creator>IrisHadarStltd</dc:creator>
    <dc:date>2024-06-26T10:21:44Z</dc:date>
    <item>
      <title>SQL to find the version name that is locking default version</title>
      <link>https://community.esri.com/t5/geodatabase-questions/sql-to-find-the-version-name-that-is-locking/m-p/1497517#M9111</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm seeking the most effective method to identify which version is locking the default version before initiating maintenance routines. This is my current approach, but I'm uncertain about its correctness.&lt;/P&gt;&lt;P&gt;Any suggestions on this matter would be greatly appreciated.&lt;/P&gt;&lt;P&gt;1. Find witch one is blocking:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;select p.owner,oselect p.owner,o.lock_time
from sde.OBJECT_LOCKS o
inner join sde.process_information p on o.sde_id = p.sde_id
where object_id = 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.get the process info:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;select sde_id from process_information
where owner = 'U2PH5'&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.get state_id&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;select state_id from STATE_Locks
where sde_id in (606147,606139)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4.get the version name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;select NAME from versions where state_id in(5690105,
5690987,
5691192,
5690541,
5691075)&lt;/LI-CODE&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>Wed, 26 Jun 2024 10:21:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/sql-to-find-the-version-name-that-is-locking/m-p/1497517#M9111</guid>
      <dc:creator>IrisHadarStltd</dc:creator>
      <dc:date>2024-06-26T10:21:44Z</dc:date>
    </item>
  </channel>
</rss>

