How do I best manage database connections and locks?

1799
3
11-27-2013 11:49 AM
AndrewBlakey
New Contributor III
I am using the geodata.sde database to store data that gets accessed by my web services.  I have connected to it in ArcCatalog using the default "owner" account (with a new password of course) and add/manage tables and feature classes that way.

I am constantly getting issues where I cannot delete a feature class or table because of an existing lock by "owner".  The only way to resolve this is to restart the entire Amazon EC2 instance.  Restarting the ArcGIS Server instance via. the Manager doesn't work, nor does rebooting my machine.  There are no other possible outside connections causing this lock.

So I'm curious about some best practices, known issues, or various solutions to making sure this doesn't keep happening.  Any thoughts on what I might be doing wrong or what I should investigate?
0 Kudos
3 Replies
NidhinKarthikeyan
Occasional Contributor III
Set the TCPKEEPALIVE parameter to equal TRUE, to remove Orphaned gsrvr processes running on the server.

Use the Geodatabase Administration dialog box, to view the locks applied to the database and disconnect user(s).
0 Kudos
KimPeter
Esri Contributor
Andrew,

If the data is being used by a web service, I'm curious why you would delete the data and not the service...

Please elaborate on your workflow.
0 Kudos
AlexCrothers
New Contributor III
I use truncate and append via Arcpy to manage updates to FC's on our Amazon
GeoDB. Is this an option? Locks not an issue...

Although I'd rather SQL Server transactional replication eventually.
0 Kudos