If you’re a database person like me, and you often stand up new geodatabases for whatever the reason, you already know that migrating permissions can be challenging, depending on your requirements. Let’s say you’re tasked with creating a new copy of a geodatabase but, for various reasons, you aren’t able to use traditional DBMS tools to clone or replicate the source geodatabase. Instead, maybe you are left with performing a copy/paste of the data using ArcCatalog. Alternatively, perhaps you’re organization is migrating from one DBMS platform to another, such as moving from Oracle to SQL Server or vice versa. Whatever the reason may be, the method in which you migrate your data will more than likely not include the original permissions within the target geodatabase output. If only you had an easy way to extract the geodatabase’s spatial data permissions and then subsequently apply those permissions to your new geodatabase. Otherwise, you’ll find yourself manually setting permissions for each dataset while trying to map which roles should be granted read versus read/write permissions. Well, with a little bit of SQL and the use of ArcPy, you can bridge this gap quite easily.
For the two most popular DBMS platforms (Oracle and SQL Server), I’ve included custom SQL that will interrogate your database and extract its spatial data permissions in Python format. It doesn’t matter if your data is versioned or not, or if your data exists in feature datasets or at the root of the geodatabase. Even geometric networks are covered with this SQL. Run these scripts with an elevated account in your source geodatabase, capture the results, and you’ll be up and running in no time with permissions properly set in your target geodatabase.
General Workflow
- With an elevated account, run the appropriate script depending on your DBMS platform within your source geodatabase.
- Save the resulting Python code to a .PY script file.
- In the target geodatabase, run the script file to apply the original source geodatabase permissions.

What do you think?