Select to view content in your preferred language

ArcSDESQLExecute Commit with after "ALTER TABLE" locks in database

06-22-2018 03:39 AM
New Contributor II

I am converting a table from SQL Server ArcSDE Enable to PostgreSQL. I have PostgreSQL and SQL Server installed on same one server machine. I am exporting a table from SQL Server to PostgreSQL using ArcPy, and then after exporting that table into PostgreSQL, i am running an ALTER TABLE   command on the table and then committing the connection using ArcSDESQLExecute Commit. Commit does not give any response, as it create a locks on the database and then that lock is not released. This is causing my script to be stuck there for a long time, and nothing happens.

I am using ArcGIS 10.2 with SQL Server 12.  Operating system is Windows Server.

While the same script is working perfect on a machine that has, CentOS Docker based ArcSDE SQL Server, and Docker based PostgresSQL, and ArcMap 10.4.1.

What issue would be causing problem of creating lock on the PostgreSQL database while committing a transaction.

This is a Script that is built using ArcPy.

0 Kudos
1 Reply
Esri Esteemed Contributor

What transaction are you committing?  CREATE TABLE is not logged, nor is ALTER TABLE.  Both must occur outside a transaction.

It seems you are using the transaction environment incorrectly.  Please add the relevant pieces of your script to the question, so we have a chance to figure out what is wrong.

- V

0 Kudos