Hello! I am encountering an issue when trying to register a Postgres table in an enterprise geodatabase. I am running into the error, "ERROR 001400: Only the data owner may execute register with geodatabase."
My environment:
- ArcGIS Pro 2.9
- Postgres 15.8
- PostGIS 3.4
Background:
I have a PostGIS enabled PostgreSQL database. My database is connected to a Django application, and so my tables are managed by that application. The table I am trying to register with the geodatabase is located at 'mydatabase.public.myspatialtable', meaning that the table I am trying to register with the geodatabase is in the 'public' schema. The 'myspatialtable' is owned by my 'postgres' user. My goal is to be able to write to 'myspatialtable' from ArcPro.
Here are the steps I took to create my enterprise geodatabase in PostgreSQL:
I followed this documentation to create a geodatabase in PostgresSQL in Linux.
In the documentation, I followed steps for being both the PostgreSQL and geodatabase administrator. I ran the Create Enterprise Geodatabase tool in ArcPro, and was able to do so successfully. After running this tool I saw an 'sde' login role created. I was able to make a database connection to my PostgreSQL database successfully with my postgres user, which again is the owner of 'myspatialtable'. I am able to view my point data from the table in ArcPro. Are there steps I missed to enable ArcPro to register a table with a geodatabase?
Thank you in advance!
Hello @Paige_Williams
The nomenclature of the table goes like mydatabase.public.myspatialtable, which indicates it is owned by the public schema.
As a result, when you connect to the PostgreSQL Enterprise geodatabase from ArcGIS Pro using the postgres user, a schema mismatch occurs. This causes ArcGIS Pro to display an error when you try to register data with the geodatabase, since only the data owner is permitted to perform this action.
You could probably Right click on the mydatabase.public.myspatialtable feature class from Pro and click on privileges and check if the postgre user has all the permission boxes checked for this table.
Or, create a copy of the table in Pro with the postgres user and Register it with the geodatabase
Also confirm if there is a probaility to test this behavior without the external Django application?
Hi @RudraniChakraborty , I've been working with Esri support on this, and it seems like the issue is that the table I want to register with the geodatabase is in the 'public' schema, and the Register with Geodatabase tool assumes that the owner of the table must have the same name as the schema it is in. Because 'public' is a reserved keyword in PostgreSQL, I am unable to create a user with the name 'public' to use when connecting to the database and using when running the Register with Geodatabase tool.