<?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: One Role to back up data with arcpy across multiple Schema in Oracle in Geodatabase Questions</title>
    <link>https://community.esri.com/t5/geodatabase-questions/one-role-to-back-up-data-with-arcpy-across/m-p/1405307#M8982</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/102272"&gt;@JamesMorrison1&lt;/a&gt;&amp;nbsp;- I made a few more updates to my reply above. I hope this clarifies and helps.&lt;/P&gt;</description>
    <pubDate>Wed, 03 Apr 2024 16:32:25 GMT</pubDate>
    <dc:creator>MarceloMarques</dc:creator>
    <dc:date>2024-04-03T16:32:25Z</dc:date>
    <item>
      <title>One Role to back up data with arcpy across multiple Schema in Oracle</title>
      <link>https://community.esri.com/t5/geodatabase-questions/one-role-to-back-up-data-with-arcpy-across/m-p/1405150#M8980</link>
      <description>&lt;P&gt;Hello Everyone.&lt;/P&gt;&lt;P&gt;Oracle 19c / ArcGIS Pro 3.2 / eGDB 11.1&lt;/P&gt;&lt;P&gt;I wish to have one sde connection file to have read-only access to data across multiple schema to export them via arcpy to a fGDB. With the aim to make a nightly export.&lt;/P&gt;&lt;P&gt;I have read the documentation:&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/grant-dataset-privileges.htm" target="_blank"&gt;Grant and revoke dataset privileges in databases and enterprise geodatabases—ArcGIS Pro | Documentation&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Basically I want one role to rule them all &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Note: Not our real database structure.&lt;/P&gt;&lt;P&gt;AREA1 - user / schema&lt;BR /&gt;FC1&lt;BR /&gt;TAB1&lt;/P&gt;&lt;P&gt;AREA2 - user / schema&lt;BR /&gt;FC1&lt;BR /&gt;FC2&lt;BR /&gt;TAB1&lt;/P&gt;&lt;P&gt;AREA3- user / schema&lt;BR /&gt;FC1&lt;BR /&gt;FC2&lt;BR /&gt;TAB1&lt;BR /&gt;TAB2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question 1&lt;/P&gt;&lt;P&gt;Can I just create a User BACKUP_DB, create a Role backup_data_read_role. Then assign that Role to each Feature Class (FC) or Table (TAB) in each Schema. Then have just one .sde connection file connecting as BACKUP_DB / PW to be used in my arcpy script?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question 2&lt;/P&gt;&lt;P&gt;I assume I have to login to each Schema separately AREA1, AREA2, AREA3 and assign the Feature Classes and Tables to the Role&amp;nbsp;backup_data_read_role? Can you in the ESRI world assign a Role to data in different Schema?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Question 3&lt;/P&gt;&lt;P&gt;Is there a better approach to achieve my results?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Feedback appreciated. Before I make too many mistakes &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 13:33:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/one-role-to-back-up-data-with-arcpy-across/m-p/1405150#M8980</guid>
      <dc:creator>JamesMorrison1</dc:creator>
      <dc:date>2024-04-03T13:33:05Z</dc:date>
    </item>
    <item>
      <title>Re: One Role to back up data with arcpy across multiple Schema in Oracle</title>
      <link>https://community.esri.com/t5/geodatabase-questions/one-role-to-back-up-data-with-arcpy-across/m-p/1405277#M8981</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/102272"&gt;@JamesMorrison1&lt;/a&gt;&amp;nbsp;- see this example.&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;CONNECT /AS SYSDBA

--a. create the role
DROP ROLE "RLDATAREADER";
CREATE ROLE "RLDATAREADER" NOT IDENTIFIED;&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;U&gt;&lt;STRONG&gt;If "not" registered as traditional versioning.&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;--b. grant privileges

--b1. If featureclasses and tables 
--are "not" registered as traditional versioning.

--AREA1 data owner
GRANT SELECT ON AREA1.FC1 TO RLDATAREADER;
GRANT SELECT ON AREA2.Sxxxx_ID$ TO RLDATAREADER;  --FC1 Spatial Index Table
GRANT SELECT ON AREA1.TAB1 TO RLDATAREADER;
--AREA2 data owner
GRANT SELECT ON AREA2.FC1 TO RLDATAREADER;
GRANT SELECT ON AREA2.Sxxxx_ID$ TO RLDATAREADER;  --FC1 Spatial Index Table
GRANT SELECT ON AREA2.FC2 TO RLDATAREADER;
GRANT SELECT ON AREA2.Sxxxx_ID$ TO RLDATAREADER;  --FC2 Spatial Index Table
GRANT SELECT ON AREA2.TAB1 TO RLDATAREADER;
--AREA3 data owner
GRANT SELECT ON AREA3.FC1 TO RLDATAREADER;
GRANT SELECT ON AREA2.Sxxxx_ID$ TO RLDATAREADER;  --FC1 Spatial Index Table
GRANT SELECT ON AREA3.FC2 TO RLDATAREADER;
GRANT SELECT ON AREA2.Sxxxx_ID$ TO RLDATAREADER;  --FC2 Spatial Index Table
GRANT SELECT ON AREA3.TAB1 TO RLDATAREADER;
GRANT SELECT ON AREA3.TAB2 TO RLDATAREADER;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;How to determine the Featureclass ST_Geometry Spatial Index Table&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarceloMarques_2-1712161061450.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99918iC222C6EF232C600E/image-size/large?v=v2&amp;amp;px=999" role="button" title="MarceloMarques_2-1712161061450.png" alt="MarceloMarques_2-1712161061450.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;If registered as traditional versioning.&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;--b2. If featureclasses and tables are 
--registered as traditional versioning then 
--use the ArcGIS Privileges Tool to grant 
--the proper permission to the Roles.

https://pro.arcgis.com/en/pro-app/latest/tool-reference/data-management/change-privileges.htm

/*
Note: a featureclass is in fact many tables in the database 
and when registered as traditional versioning the 
delta tables for the featureclass are created, 
the delta tables are the A table for Adds and 
the D table for Deletes, other geodatabase operations 
can also create more tables in the geodatabase, 
e.g. M:N geodatabase relationship class, 
Geometry Network, Utility Network, Topology, etc.
*/&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;ArcGIS Privileges Tool example.&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarceloMarques_1-1712160495000.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99917i2C322AE7D9AEFA33/image-size/large?v=v2&amp;amp;px=999" role="button" title="MarceloMarques_1-1712160495000.png" alt="MarceloMarques_1-1712160495000.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarceloMarques_0-1712160437768.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99916i95F454CA9CB9A39E/image-size/large?v=v2&amp;amp;px=999" role="button" title="MarceloMarques_0-1712160437768.png" alt="MarceloMarques_0-1712160437768.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;How to determine the Delta Tables - Adds Table, Deletes Table of a Featureclass or Table registered as traditional versioning.&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarceloMarques_3-1712161577965.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99919i6AE8B089B51A7DEF/image-size/large?v=v2&amp;amp;px=999" role="button" title="MarceloMarques_3-1712161577965.png" alt="MarceloMarques_3-1712161577965.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Create the Viewer User&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;--c. create viewer user

DROP USER AREA_VIEWER CASCADE;
CREATE USER AREA_VIEWER PROFILE "GIS_USERS" 
  IDENTIFIED BY *****
  DEFAULT TABLESPACE "USERS" 
  TEMPORARY TABLESPACE "TEMP" ACCOUNT UNLOCK;
ALTER USER "AREA_VIEWER" TEMPORARY TABLESPACE "GIS_TEMP_GROUP";
ALTER USER "AREA_VIEWER" PROFILE "GIS_USERS";
GRANT "CONNECT" TO "AREA_VIEWER";
GRANT "GIS_LOGIN" TO "AREA_VIEWER";
GRANT "RLAREAVIEWER" TO "AREA_VIEWER";
ALTER USER AREA_VIEWER QUOTA UNLIMITED ON "GIS_SDELOGFILE";
ALTER USER AREA_VIEWER QUOTA UNLIMITED ON "GIS_SDELOGFILEIDX";&lt;/LI-CODE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Oracle Enterprise Geodatabases Best Practices&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You can learn more best practices about privileges in my community.esri.com blog below, read the database guidebook for Production Mapping, the best practices can be applied to any industry, there you will also find the database template scripts for Oracle with further recommendations, you can download the guidebook and the database template script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;For a complete example on how to setup the data owner user, the editor and viewer users and how to grant permissions via roles see the Production Mapping Guide Book for Oracle.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.esri.com/t5/mapping-and-charting-enterprise-databases/mapping-and-charting-solutions-mcs-enterprise/ba-p/893351" target="_blank" rel="noopener"&gt;Mapping and Charting Solutions (MCS) Enterprise Da... - Esri Community&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;&lt;A href="https://esriis-my.sharepoint.com/:b:/g/personal/marc3932_esri_com/Ea5fs92EHgJOjeVqGAQRoyMBVWo8uMQf7DghQRZQYkhVbQ" target="_blank" rel="noopener nofollow noreferrer"&gt;Best Practices Production Mapping 3.x Workspace in Oracle®&lt;/A&gt;   &lt;/SPAN&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Oracle 19c Database Template Scripts (*)&lt;/P&gt;&lt;PRE&gt; &lt;A href="https://esriis-my.sharepoint.com/:u:/g/personal/marc3932_esri_com/EWLpgmd12PVFrWEELhc0XRoBoBDJn6eX9JmSmivpopZpdA?e=vPFrno" target="_blank" rel="noopener nofollow noreferrer"&gt;ArcGIS Pro 3.x &amp;amp; ArcMap 10.9.x&lt;/A&gt; &lt;STRONG&gt;June 21, 2022&lt;/STRONG&gt; &lt;SPAN&gt;&lt;STRONG&gt;*New&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;* has all the best practices from the guidebooks and more, including how to setup Oracle windows authentication logins and refresh privileges via roles.&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 16:31:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/one-role-to-back-up-data-with-arcpy-across/m-p/1405277#M8981</guid>
      <dc:creator>MarceloMarques</dc:creator>
      <dc:date>2024-04-03T16:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: One Role to back up data with arcpy across multiple Schema in Oracle</title>
      <link>https://community.esri.com/t5/geodatabase-questions/one-role-to-back-up-data-with-arcpy-across/m-p/1405307#M8982</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/102272"&gt;@JamesMorrison1&lt;/a&gt;&amp;nbsp;- I made a few more updates to my reply above. I hope this clarifies and helps.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 16:32:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/one-role-to-back-up-data-with-arcpy-across/m-p/1405307#M8982</guid>
      <dc:creator>MarceloMarques</dc:creator>
      <dc:date>2024-04-03T16:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: One Role to back up data with arcpy across multiple Schema in Oracle</title>
      <link>https://community.esri.com/t5/geodatabase-questions/one-role-to-back-up-data-with-arcpy-across/m-p/1405646#M8985</link>
      <description>&lt;P&gt;Hello Marcelo&lt;/P&gt;&lt;P&gt;As always great and in-depth replies. Much appreciated.&lt;/P&gt;&lt;P&gt;[1] So I create the Role in Oracle backup_data_read_role&lt;/P&gt;&lt;P&gt;[2] I then use three sde connection files for AREA1, AREA2 and AREA3 to give access to data owned in each separate Schema.&lt;/P&gt;&lt;P&gt;[3] In ArcGIS Pro / Arcpy for each separate sde connection file I can do the following:&lt;/P&gt;&lt;P&gt;AREA1.sde&lt;BR /&gt;arcpy.management.ChangePrivileges(FC1, " backup_data_read_role", "GRANT")&lt;BR /&gt;arcpy.management.ChangePrivileges(TAB1, " backup_data_read_role", "GRANT")&lt;/P&gt;&lt;P&gt;AREA2.sde&lt;BR /&gt;arcpy.management.ChangePrivileges(FC1, " backup_data_read_role", "GRANT")&lt;BR /&gt;arcpy.management.ChangePrivileges(FC2, " backup_data_read_role", "GRANT")&lt;BR /&gt;arcpy.management.ChangePrivileges(TAB1, " backup_data_read_role", "GRANT")&lt;/P&gt;&lt;P&gt;AREA3.sde&lt;BR /&gt;arcpy.management.ChangePrivileges(FC1, " backup_data_read_role", "GRANT")&lt;BR /&gt;arcpy.management.ChangePrivileges(FC2, " backup_data_read_role", "GRANT")&lt;BR /&gt;arcpy.management.ChangePrivileges(TAB1, " backup_data_read_role", "GRANT")&lt;BR /&gt;arcpy.management.ChangePrivileges(TAB2, " backup_data_read_role", "GRANT")&lt;/P&gt;&lt;P&gt;Finally assign Role backup_data_read_role to User BACKUP_DB in Oracle&lt;/P&gt;&lt;P&gt;[4] Create sde connection file for BACKUP_DB and this User should be able to see data in all three Schema AREA1, AREA2 and AREA3 via the backup_data_read_role?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 11:15:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/one-role-to-back-up-data-with-arcpy-across/m-p/1405646#M8985</guid>
      <dc:creator>JamesMorrison1</dc:creator>
      <dc:date>2024-04-04T11:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: One Role to back up data with arcpy across multiple Schema in Oracle</title>
      <link>https://community.esri.com/t5/geodatabase-questions/one-role-to-back-up-data-with-arcpy-across/m-p/1405791#M8986</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/102272"&gt;@JamesMorrison1&lt;/a&gt;&amp;nbsp;- you got it.&amp;nbsp; : )&lt;/P&gt;</description>
      <pubDate>Thu, 04 Apr 2024 15:20:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/one-role-to-back-up-data-with-arcpy-across/m-p/1405791#M8986</guid>
      <dc:creator>MarceloMarques</dc:creator>
      <dc:date>2024-04-04T15:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: One Role to back up data with arcpy across multiple Schema in Oracle</title>
      <link>https://community.esri.com/t5/geodatabase-questions/one-role-to-back-up-data-with-arcpy-across/m-p/1406678#M8987</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/102272"&gt;@JamesMorrison1&lt;/a&gt;&amp;nbsp;- adding as a reference this other discussion.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/data-management-questions/best-practices-with-granting-privileges-and/m-p/1406670#M45064" target="_blank"&gt;Re: Best Practices with Granting Privileges and Ve... - Esri Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Apr 2024 21:40:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/geodatabase-questions/one-role-to-back-up-data-with-arcpy-across/m-p/1406678#M8987</guid>
      <dc:creator>MarceloMarques</dc:creator>
      <dc:date>2024-04-05T21:40:39Z</dc:date>
    </item>
  </channel>
</rss>

