<?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: Deleting Domains Owned by Others in SQL/SDE Geodatabases in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118148#M6724</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/ideas/5690" target="_blank"&gt;https://community.esri.com/ideas/5690&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can "Vote Up" the Idea here!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jun 2021 08:20:41 GMT</pubDate>
    <dc:creator>Asrujit_SenGupta</dc:creator>
    <dc:date>2021-06-22T08:20:41Z</dc:date>
    <item>
      <title>Deleting Domains Owned by Others in SQL/SDE Geodatabases</title>
      <link>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118144#M6720</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are running ArcSDE 10.1 in a SQL 2012 environment.&amp;nbsp; I manage the database but I do not own all of the domains.&amp;nbsp; A couple versions ago the Domains were stored in their own SQL GDB table so it was very easy to change a domains owner through a SQL update script, but now that domains are store in XML (stored in the database) I don't know how to change ownership.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can you delete in a domain in SQL/SDE that is owned by someone else? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Aug 2015 16:28:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118144#M6720</guid>
      <dc:creator>RandyKreuziger</dc:creator>
      <dc:date>2015-08-11T16:28:36Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Domains Owned by Others in SQL/SDE Geodatabases</title>
      <link>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118145#M6721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We also&amp;nbsp;have a domain created by user account long since deleted.&amp;nbsp; Have you found a way to delete it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 19:30:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118145#M6721</guid>
      <dc:creator>JohannaKraus1</dc:creator>
      <dc:date>2016-12-12T19:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Domains Owned by Others in SQL/SDE Geodatabases</title>
      <link>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118146#M6722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In Microsoft SQL Server you can list your domains via SQL Server with this query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 10pt;"&gt;&lt;SPAN style="background: #eeeeee; color: green;"&gt;--SQL Server&lt;/SPAN&gt; &lt;SPAN style="background: #eeeeee; color: blue;"&gt;SELECT&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt; items.Name &lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: blue;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="background: #eeeeee; color: #a31515;"&gt;"Domain Name"&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt;, items.Definition.value(&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #a31515;"&gt;'(/*/Owner)[1]'&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #a31515;"&gt;'nvarchar(max)'&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: blue;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="background: #eeeeee; color: #a31515;"&gt;"Owner"&lt;/SPAN&gt; &lt;SPAN style="background: #eeeeee; color: blue;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt; dbo.GDB_ITEMS &lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: blue;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt; items &lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: blue;"&gt;INNER&lt;/SPAN&gt; &lt;SPAN style="background: #eeeeee; color: blue;"&gt;JOIN&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt; dbo.GDB_ITEMTYPES &lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: blue;"&gt;AS&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt; itemtypes &lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: blue;"&gt;ON&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt; items.&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: blue;"&gt;Type&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt; = itemtypes.UUID &lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: blue;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt; itemtypes.Name &lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: blue;"&gt;IN&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #a31515;"&gt;'Coded Value Domain'&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #a31515;"&gt;'Range Domain'&lt;/SPAN&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 10pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 10pt;"&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt;You can then construct a SQL delete statement to delete the single domain entry but make sure it's not in use.&amp;nbsp; This was the only solution I could get from ESRI Tech support last year when I too had this issue.&amp;nbsp; You need to be able to run the SQL code in Management Studio&amp;nbsp;if you have the rights and be sure to back up your database!&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 10pt;"&gt;&lt;/P&gt;&lt;P style="margin: 0in; font-size: 10pt;"&gt;&lt;SPAN style="background: #eeeeee; color: #4d4d4d;"&gt;I've put in an enhancement request a couple of years ago for changing the OWNER of a DOMAIN but I don't believe anything will come of it.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 21:23:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118146#M6722</guid>
      <dc:creator>RandyKreuziger</dc:creator>
      <dc:date>2016-12-12T21:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Domains Owned by Others in SQL/SDE Geodatabases</title>
      <link>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118147#M6723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh wow, thanks.&amp;nbsp; Everything I read seems to indicate you weren't able to do this, but I'm glad to know we have the option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is your enhancement request something to vote on geonet?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 21:31:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118147#M6723</guid>
      <dc:creator>JohannaKraus1</dc:creator>
      <dc:date>2016-12-12T21:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Domains Owned by Others in SQL/SDE Geodatabases</title>
      <link>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118148#M6724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/ideas/5690" target="_blank"&gt;https://community.esri.com/ideas/5690&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can "Vote Up" the Idea here!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jun 2021 08:20:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118148#M6724</guid>
      <dc:creator>Asrujit_SenGupta</dc:creator>
      <dc:date>2021-06-22T08:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Domains Owned by Others in SQL/SDE Geodatabases</title>
      <link>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118149#M6725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;done, thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 18:17:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118149#M6725</guid>
      <dc:creator>JohannaKraus1</dc:creator>
      <dc:date>2016-12-13T18:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Domains Owned by Others in SQL/SDE Geodatabases</title>
      <link>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118150#M6726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately, that ArcGIS Idea was first posted 4 and a half years ago.&amp;nbsp; I voted it up but the VAST majority of Ideas never get implemented, IMHO.&amp;nbsp; ESRI is too busy adding functionality and too often breaking things that work in the process.&amp;nbsp; Don't get me wrong, I've been working with ESRI software 28 years and have no desire to switch!&amp;nbsp; I just wish there would make more minor enhancements for usability vs new functionality.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 18:25:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118150#M6726</guid>
      <dc:creator>RandyKreuziger</dc:creator>
      <dc:date>2016-12-13T18:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Domains Owned by Others in SQL/SDE Geodatabases</title>
      <link>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118151#M6727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Agreed!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 18:29:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118151#M6727</guid>
      <dc:creator>JohannaKraus1</dc:creator>
      <dc:date>2016-12-13T18:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Domains Owned by Others in SQL/SDE Geodatabases</title>
      <link>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118152#M6728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Further information from anonymous rogue GIS person,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Background: I had domains created by old user accounts and couldn't delete. I setup an Oracle trace and deleted a test domain to see which SDE tables were affected. The trace&amp;nbsp;showed the SDE tables &lt;SPAN&gt;SDE.GDB_ITEMS and&amp;nbsp;sde_xml_doc1&lt;/SPAN&gt;&amp;nbsp;being deleted from.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find your domains, using queries like above. Here is the online help reference for your type of database:&amp;nbsp;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/10.4/manage-data/using-sql-with-gdbs/example-finding-domain-owners.htm" title="http://desktop.arcgis.com/en/arcmap/10.4/manage-data/using-sql-with-gdbs/example-finding-domain-owners.htm"&gt;Example: Finding domain owners using SQL—Help | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;. I recommend adding the GDB_ITEMS OBJECTID and DEFINITION column to the query. The&amp;nbsp;&lt;SPAN&gt;DEFINITION column will be the key for &amp;nbsp;deleting in the table sde_xml_doc1.&amp;nbsp;&lt;/SPAN&gt;One thing is that the xml magic query for the owner column may not work. For example in Oracle, we don't have the arcgis extproc setup (it's the dll or so file to access shape columns...something like that). You should know which domains to delete even without the owner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Query for Oracle without the OWNER:&lt;/P&gt;&lt;P&gt;select a.OBJECTID, a.name "DOMAIN_NAME", b.name "TYPE", a.definition&lt;BR /&gt;FROM SDE.GDB_ITEMS a INNER JOIN SDE.GDB_ITEMTYPES b ON a.Type = b.UUID &lt;BR /&gt;WHERE b.Name IN ('Coded Value Domain', 'Range Domain');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OBJECTID &amp;nbsp;DOMAIN_NAME &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;TYPE &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DEFINITION&lt;/SPAN&gt;&lt;BR /&gt;--------------------------------------------------------------------------------&lt;BR /&gt;&lt;SPAN&gt;1921&lt;/SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; test_domain &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Coded Value Domain &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;181&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you would like to risk corrupting the delicate web of SDE, make sure all tables/feature classes are no longer referencing the domain or deleted. Then something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DELETE FROM SDE.GDB_ITEMS WHERE OBJECTID = 1921;&lt;BR /&gt;DELETE FROM SDE.sde_xml_doc1 WHERE SDE_XML_ID = 181;&lt;/P&gt;&lt;P&gt;Commit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Embedded xml domains -- worst idea ever Esri!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Jul 2017 22:35:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118152#M6728</guid>
      <dc:creator>DouglasHall</dc:creator>
      <dc:date>2017-07-21T22:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Domains Owned by Others in SQL/SDE Geodatabases</title>
      <link>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118153#M6729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I found a way to change ownership at least in &amp;nbsp;Microsoft SQL Server using the SET statement with a modify function. In the example below, I change the domain owner of the 'DATA QUALITY CODE_3' to the user 'SDE', but it could be set to any user account regardless of the owner. &amp;nbsp;At that point I was able to login as SDE and edit the domain as well as delete it. &amp;nbsp;I was able to figure this out using ESRI's tech article "&lt;A href="https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fsupport.esri.com%2Fen%2Ftechnical-article%2F000011487" target="_blank"&gt;How To: Return information on coded value domains using ArcSDE 10.x for SQL Server&lt;/A&gt;."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;UPDATE&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;GeoLib&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;sde&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;GDB_ITEMS&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;SET&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;Definition&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;modify&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'
replace value of 
(/GPCodedValueDomain2/Owner/text())[1]
with ("SDE")'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;WHERE&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;TYPE&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;in&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'8C368B12-A12E-4C7E-9638-C9C64E69E98F'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'C29DA988-8C3E-45F7-8B5C-18E51EE7BEB4'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&amp;nbsp; &lt;SPAN class="operator token"&gt;AND&lt;/SPAN&gt; PhysicalName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'DATA QUALITY CODE_3'&lt;/SPAN&gt;

&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 06:55:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118153#M6729</guid>
      <dc:creator>RandyKreuziger</dc:creator>
      <dc:date>2021-12-11T06:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Domains Owned by Others in SQL/SDE Geodatabases</title>
      <link>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118154#M6730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Randy, found it very useful and works really well.&amp;nbsp;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: fuchsia; font-size: 9.5pt;"&gt;UPDATE&lt;/SPAN&gt;&lt;SPAN style="color: teal; font-size: 9.5pt;"&gt;[sde]&lt;/SPAN&gt;&lt;SPAN style="color: gray; font-size: 9.5pt;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal; font-size: 9.5pt;"&gt;[GDB_ITEMS]&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.5pt;"&gt;SET&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt;"&gt; &lt;SPAN style="color: teal;"&gt;[Definition]&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;modify&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: red;"&gt;'replace value of &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: red; font-size: 9.5pt;"&gt;(/GPCodedValueDomain2/Owner/text())[1] with &lt;SPAN style="background: yellow;"&gt;("New_Owner"&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: red; font-size: 9.5pt;"&gt;'&lt;/SPAN&gt;&lt;SPAN style="color: gray; font-size: 9.5pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.5pt;"&gt;FROM&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt;"&gt; &lt;SPAN style="color: teal;"&gt;sde&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;GDB_ITEMS&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: teal;"&gt;items&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;INNER&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;JOIN&lt;/SPAN&gt; &lt;SPAN style="color: teal;"&gt;sde&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;GDB_ITEMTYPES&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;AS&lt;/SPAN&gt; &lt;SPAN style="color: teal;"&gt;itemtypes&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.5pt;"&gt;ON&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt;"&gt; &lt;SPAN style="color: teal;"&gt;items&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;Type&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: teal;"&gt;itemtypes&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;UUID&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.5pt;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt;"&gt; &lt;SPAN style="color: teal;"&gt;itemtypes&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;Name&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;IN&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: red;"&gt;'Coded Value Domain'&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: red;"&gt;'Range Domain'&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: gray; font-size: 9.5pt;"&gt;and&lt;/SPAN&gt;&lt;SPAN style="font-size: 9.5pt;"&gt; &lt;SPAN style="color: teal;"&gt;items&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: blue;"&gt;Definition&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;.&lt;/SPAN&gt;&lt;SPAN style="color: teal;"&gt;value&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: red;"&gt;'(/GPCodedValueDomain2/Owner/text())[1]'&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: red;"&gt;'nvarchar(max)'&lt;/SPAN&gt;&lt;SPAN style="color: gray;"&gt;)&lt;/SPAN&gt; &lt;SPAN style="color: gray;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: red; background: yellow;"&gt;'Old_Owner'&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="color: blue; font-size: 9.5pt;"&gt;GO&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Dec 2017 01:53:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118154#M6730</guid>
      <dc:creator>JackZHANG</dc:creator>
      <dc:date>2017-12-04T01:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: Deleting Domains Owned by Others in SQL/SDE Geodatabases</title>
      <link>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118155#M6731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks everyone.&amp;nbsp; the info you shared helped me resolve our similar problem.&amp;nbsp;&amp;nbsp;I then prevented our problem from happening again, and share back in case the info is useful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When Esri enables or creates a 10.5 enterprise geodatabase in SQL Server, the "Data viewer" "type of user" indicated here (&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/manage-data/gdbs-in-sql-server/privileges-sqlserver.htm" title="http://desktop.arcgis.com/en/arcmap/latest/manage-data/gdbs-in-sql-server/privileges-sqlserver.htm"&gt;Privileges for geodatabases in SQL Server—Help | ArcGIS Desktop&lt;/A&gt;)&amp;nbsp;by default is allowed to create domains and feature datasets, although Esri doesn't mention this situation in the help documentation (as of now, maybe they'll update it, maybe not).&amp;nbsp; These enterprise geodatabase objects get stored in the GDB_ITEMS table in the enterprise geodatabase schema.&amp;nbsp; During configuration, Esri grants delete, insert, and update to the PUBLIC server role.&amp;nbsp; We have our "Data viewer" users in the PUBLIC server role and require that&amp;nbsp;they cannot create anything in our enterprise geodatabases, so I obtained this fix during an Esri technical support request:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--stop allowing "Data viewer" database users to create, update, and delete domains and feature datasets&lt;/P&gt;&lt;P&gt;REVOKE DELETE ON sde.GDB_ITEMS FROM PUBLIC CASCADE;&lt;BR /&gt;REVOKE INSERT ON sde.GDB_ITEMS FROM PUBLIC CASCADE;&lt;BR /&gt;REVOKE UPDATE ON sde.GDB_ITEMS FROM PUBLIC CASCADE;&lt;BR /&gt;GO&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--let the "Data creator" database user ("DataCreator" below) or any other user you want continue to create, update, and delete domains and feature datasets&lt;BR /&gt;GRANT INSERT ON sde.GDB_ITEMS TO &lt;SPAN&gt;DataCreator&lt;/SPAN&gt;;&lt;BR /&gt;GRANT UPDATE ON sde.GDB_ITEMS TO &lt;SPAN&gt;DataCreator&lt;/SPAN&gt;;&lt;BR /&gt;GRANT DELETE ON sde.GDB_ITEMS TO &lt;SPAN&gt;DataCreator&lt;/SPAN&gt;;&lt;BR /&gt;GO&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jun 2018 18:26:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/deleting-domains-owned-by-others-in-sql-sde/m-p/118155#M6731</guid>
      <dc:creator>TimMinter</dc:creator>
      <dc:date>2018-06-06T18:26:30Z</dc:date>
    </item>
  </channel>
</rss>

