<?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 Unable to connect to PostgreSQL database in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/unable-to-connect-to-postgresql-database/m-p/1234331#M62564</link>
    <description>&lt;P&gt;I have a PostgreSQL database with the PostGIS extension and ArcSDE enabled. I am able to connect to this database from ArcGIS Pro when using a superuser account, however, I'm unable to establish a connection from a non-superuser account. When I try to connect from a non-superuser account, the connection hangs indefinitely and no error is returned.&lt;BR /&gt;&lt;BR /&gt;I have followed &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/manage-postgresql/privileges-postgresql.htm" target="_self"&gt;this documentation&lt;/A&gt; and have ensured that the user in question meets the minimum privilege requirements.&lt;BR /&gt;&lt;BR /&gt;I'm currently poring over all of the tables within the information_schema to see if there are any missing privileges that need to be granted to the non-superuser account.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm hoping an Esri rep can point me in the right direction. Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 22 Nov 2022 22:07:33 GMT</pubDate>
    <dc:creator>PhilipOrlando</dc:creator>
    <dc:date>2022-11-22T22:07:33Z</dc:date>
    <item>
      <title>Unable to connect to PostgreSQL database</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/unable-to-connect-to-postgresql-database/m-p/1234331#M62564</link>
      <description>&lt;P&gt;I have a PostgreSQL database with the PostGIS extension and ArcSDE enabled. I am able to connect to this database from ArcGIS Pro when using a superuser account, however, I'm unable to establish a connection from a non-superuser account. When I try to connect from a non-superuser account, the connection hangs indefinitely and no error is returned.&lt;BR /&gt;&lt;BR /&gt;I have followed &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/manage-postgresql/privileges-postgresql.htm" target="_self"&gt;this documentation&lt;/A&gt; and have ensured that the user in question meets the minimum privilege requirements.&lt;BR /&gt;&lt;BR /&gt;I'm currently poring over all of the tables within the information_schema to see if there are any missing privileges that need to be granted to the non-superuser account.&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm hoping an Esri rep can point me in the right direction. Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 22:07:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/unable-to-connect-to-postgresql-database/m-p/1234331#M62564</guid>
      <dc:creator>PhilipOrlando</dc:creator>
      <dc:date>2022-11-22T22:07:33Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to PostgreSQL database</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/unable-to-connect-to-postgresql-database/m-p/1234519#M62586</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/171676"&gt;@PhilipOrlando&lt;/a&gt;&amp;nbsp;Suggest the following:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;use the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/3.0/tool-reference/data-management/create-database-user.htm" target="_blank" rel="noopener"&gt;Create Database User&lt;/A&gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;tool&amp;nbsp;and create a user with DATABASE_USER role&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;test using the newly created user&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;You may be using a&amp;nbsp;PostgreSQL client application to create the user and missing some of the required&amp;nbsp;privileges.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Reference:&amp;nbsp;&lt;A title="Add login roles to PostgreSQL" href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/manage-postgresql/add-users-postgresql.htm" target="_blank" rel="noopener"&gt;Add login roles to PostgreSQL&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 15:22:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/unable-to-connect-to-postgresql-database/m-p/1234519#M62586</guid>
      <dc:creator>AyanPalit</dc:creator>
      <dc:date>2022-11-23T15:22:49Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to PostgreSQL database</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/unable-to-connect-to-postgresql-database/m-p/1234575#M62597</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/512"&gt;@AyanPalit&lt;/a&gt;&amp;nbsp;thanks for the troubleshooting help.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I was trying to use a PostgreSQL client application (psql) to create this user. I followed the previously linked documentation religiously, but there must be some additional privileges that are not documented.&lt;BR /&gt;&lt;BR /&gt;I followed your advice and tried creating this user from ArcGIS Pro via the "Create Database User tool" instead. This required me to first establish a connection from a superuser account, and then pass this connection object to the "Input Database Connection" parameter of the "Create Database User" tool. All of this required a Standard or Advanced license, which is not ideal. Despite these drawbacks, I was able to successfully create a new database user and establish a non-superuser connection.&lt;BR /&gt;&lt;BR /&gt;I'm hoping that the minimum privileges documentation will be updated to include all necessary configuration to achieve the same result from a PostgreSQL client application in the future.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 17:15:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/unable-to-connect-to-postgresql-database/m-p/1234575#M62597</guid>
      <dc:creator>PhilipOrlando</dc:creator>
      <dc:date>2022-11-23T17:15:38Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to connect to PostgreSQL database</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/unable-to-connect-to-postgresql-database/m-p/1235640#M62755</link>
      <description>&lt;P&gt;The solution provided by&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/512"&gt;@AyanPalit&lt;/a&gt;&amp;nbsp;is still valid, but here is another approach to creating database users from a PostgreSQL client application.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I had to consolidate the requirements from the &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/manage-postgresql/privileges-postgresql.htm" target="_self"&gt;Privileges for geodatabases in PostgreSQL&lt;/A&gt; and &lt;A href="https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/manage-postgresql/add-users-postgresql.htm" target="_self"&gt;Add login roles to PostgreSQL&lt;/A&gt; docs in order to figure this out. I also had to compare privileges between a user created from ArcGIS Pro against the PostgreSQL client. It was during this step that I noticed that I needed to grant temporary on my database to the new user. I also needed to create a new schema with the same name as the target user. This schema must also be owned by this user.&lt;BR /&gt;&lt;BR /&gt;The full list of PostreSQL commands are below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="sql"&gt;-- Create new user
CREATE USER {user} WITH PASSWORD 'secret_password';

-- Create matching schema with ownership, create, usage
CREATE SCHEMA AUTHORIZATION {user};

-- Allow new user usage on SDE
GRANT USAGE ON SCHEMA sde TO {user};

-- Additional PostGIS privileges
GRANT TEMPORARY ON DATABASE {database} TO {user}; 
GRANT USAGE ON SCHEMA public TO {user};
GRANT SELECT ON spatial_ref_sys TO {user};
GRANT SELECT ON geography_columns TO {user};
GRANT SELECT ON geometry_columns TO {user};&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;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Nov 2022 21:39:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/unable-to-connect-to-postgresql-database/m-p/1235640#M62755</guid>
      <dc:creator>PhilipOrlando</dc:creator>
      <dc:date>2022-11-28T21:39:40Z</dc:date>
    </item>
  </channel>
</rss>

