Select to view content in your preferred language

Manage geodatabase locks…but not as the SDE geodatabase administrator – Possible?

2009
9
Jump to solution
09-06-2023 02:17 AM
JamesMorrison1
Frequent Contributor

Hello Data Managers

Linux / Oracle 19c / Geodatabase 11.1 / ST_GEOMERTY - not real Schema just for this example: SDE, FORESTS, RIVERS, LAKES.

On our Test Database the Schema FORESTS holds several Feature Classes. These can have old locks on them. So when we try and add a Field to a Feature Class it is not possible due to locks. Or if we want to drop the Feature Class it is not possible due to locks.

https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/manage-geodatabase-locks.ht....

Naturally, we can drop the locks as the SDE User.

Right-click the database connection in the Catalog pane and click Administration > Locks. Right-click the database connection in the Catalog pane and click Administration > Locks. The geodatabase administrator requires elevated privileges to disconnect users.  ALTER SYSTEM SELECT_CATALOG_ROLE*

Is it possible to assign these two Privilege to the User FORESTS so they can delete their own older connections? I have the feeling this is not possible?

Can a User disconnect their own locks or is this just the job of the SDE User as the geodatabase administrator?

Feedback welcome.

0 Kudos
1 Solution

Accepted Solutions
MarceloMarques
Esri Regular Contributor

Only the sde user can remove geodatabase locks because the sde user is the arcsde geodatabase repository owner.

Note, database locks are different from geodatabase locks, the database locks can only be removed by the database administrator via the sysadmin database user.

| Marcelo Marques | Esri Principal Product Engineer | Cloud & Database Administrator | OCP - Oracle Database Certified Professional | "In 1992, I embarked on my journey with Esri Technology, and since 1997, I have been working with ArcSDE Geodatabases, right from its initial release. Over the past 32 years, my passion for GIS has only grown stronger." | “ I do not fear computers. I fear the lack of them." Isaac Isimov |

View solution in original post

9 Replies
A_Wyn_Jones
Esri Contributor

Hi @JamesMorrison1

You're correct that those privileges are required to drop connections as described here:

https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/manage-oracle/privileges-oracle.htm#...

You could grant these to the user directly in Oracle - please consider the impact of this though and test it to see if its your desired outcome. 

I'd be asking why these locks are being held and turning into "old locks" - are you using feature datasets in your Enterprise geodatabase?

It might mean that users are actively using the feature class and potentially making edits to the dataset - is that a good time to remove their lock? Normally, a user would release their own lock by ending their ArcGIS Pro session - if the locks are being retained then there's a issue.

 

 

"We've boosted the Anti-Mass Spectrometer to 105 percent. Bit of a gamble, but we need the extra resolution."
JamesMorrison1
Frequent Contributor

Thank you very much for your feedback AWJ.

>> You could grant these to the user directly in Oracle - please consider the impact of this though and test it to see if its your desired outcome.

What impacts are you alluding to here?


>> I'd be asking why these locks are being held and turning into "old locks" - are you using feature datasets in your Enterprise geodatabase?

No Feature Datasets. Just Feature Classes. Since I started with Oracle / SDE way back in 2004 we have always encountered these old connections. Never really found a reason for them.....we just killed them via a script run at night. So one editing.

Thanks.

0 Kudos
RhettZufelt
MVP Notable Contributor

Do you have any services that are using these feature classes?

R_

0 Kudos
JamesMorrison1
Frequent Contributor

No.

0 Kudos
A_Wyn_Jones
Esri Contributor

>> What impacts are you alluding to here?

SELECT_CATALOG_ROLE is required to drop connections. It also allows for that connection to upgrade a geodatabase. This capability should probably not sit with your day to day user.

>> No Feature Datasets. Just Feature Classes. Since I started with Oracle / SDE way back in 2004 we have always encountered these old connections. Never really found a reason for them.....we just killed them via a script run at night. So one editing.

Which version of Geodatabase are you currently running? Locks should be terminated as soon as the user session is shutdown. At version 10.6.1 - a known bug with SDE on SQL caused some connections to become "orphaned" and would cause disruption when it comes to admin tasks i.e. changing a schema. I should make it clear that this information pertains to SQL databases which I normally work with (and the bug relates to).

Hope this helps you somehow!

https://support.esri.com/en-us/bug/accessing-a-geodatabases-locks-information-returns-the-bug-000110... 

"We've boosted the Anti-Mass Spectrometer to 105 percent. Bit of a gamble, but we need the extra resolution."
JamesMorrison1
Frequent Contributor

AWJ - we have used all SDE versions 8, 9.x, 10.x now 11.x over the years and we always experienced  old connections. Since this a Test system the Developers are often changing the data model and so the old connections stop them. Hence my original question posted below. Thank you for your feedback.

However, my post this time was more on the question: Can a User disconnect their own locks or is this just the job of the SDE User as the geodatabase administrator?

0 Kudos
RudraniChakraborty
Occasional Contributor

Hello @JamesMorrison1 

The data owner only has the privilege to view the existing locks at the dataset level by the following steps:

>>Start ArcGIS Pro and connect to the geodatabase as the dataset owner.
>>Right-click the dataset in the Catalog pane and click Locks.

If you want to delete the locks, we need to connect with the Geodatabase administrator user, which is sde user. Please check the "View locks on your dataset" section in below document:

Manage geodatabase locks

Even though I am able to see the existing locks on my dataset with the data owner, however, when I click on disconnect, I see below error related to insufficient permission:

commu.PNG

 

MarceloMarques
Esri Regular Contributor

Only the sde user can remove geodatabase locks because the sde user is the arcsde geodatabase repository owner.

Note, database locks are different from geodatabase locks, the database locks can only be removed by the database administrator via the sysadmin database user.

| Marcelo Marques | Esri Principal Product Engineer | Cloud & Database Administrator | OCP - Oracle Database Certified Professional | "In 1992, I embarked on my journey with Esri Technology, and since 1997, I have been working with ArcSDE Geodatabases, right from its initial release. Over the past 32 years, my passion for GIS has only grown stronger." | “ I do not fear computers. I fear the lack of them." Isaac Isimov |
Bud
by
Esteemed Contributor
0 Kudos