Save the edits before disconnecting users form an enterprise geodatabase

3796
5
02-27-2015 08:31 AM
AhmadSALEH1
Occasional Contributor III

Hello All,

 

Is there any method that enables the Administrator to save the users edits before disconnecting them for an enterprise geodatabase. Because I am disconnecting users  as shown  in the screenshot, but  if they didn’t save their edits before disconnecting them all edits will be lost.

I am using ArcGIS 10.2.2 , and SQL server 2014

Clip_8.jpg

 

Thanks,

Ahmad

0 Kudos
5 Replies
AsrujitSengupta
Regular Contributor III

No. there is no such way to automatically notify them or save the edits done till that point.

0 Kudos
AlicePence
Occasional Contributor II

I kinda use of version of this python script to let the people who are connected know when I'm doing any kind of maintenance on our geodatabases.

AhmadSALEH1
Occasional Contributor III

Many thanks Alice, but where should I past this code since I have no experience  in scripting using python, and how could I create  user lists and there emails ? I will be very thankful if you provide me with screenshots

Regards,

Ahmad

0 Kudos
AlicePence
Occasional Contributor II

Within ArcCatalog or ArcMap there is a Python tool found here:

py1.png

Then all i do is copy the code from the link I gave above into the python box:

# get a list of connected users.
userList = arcpy.ListUsers("Database Connections/admin.sde")
# get a list of usernames from the list of named tuples returned from ListUsers
userNames = [u.Name for u in userList]

And we don't have very many people on our databases so from here I can usually just write a quick email to the few that are on. I just keep a draft of the generic email I send out, so i can pull it up and send it real quick and not have to retype it every time. The draft email pretty much looks like the one in the link -short and simple: Server maintenance will be performed in 15 minutes. Please log off

And if they don't log off by the time I give them, then they will lose their edits.

AhmadSALEH1
Occasional Contributor III

Many thanks Alice for your prompt help.

excuse me for my new naif question, I am trying first to get the list of users who are connected to the enterprise geodatabase "Admin"

in my case I have two users ( user1 and user 2 )

Clip_13.jpg

But when I past the code:

userList = arcpy.ListUsers("Database Connections/admin.sde")

nothing happens, what other issues should I consider ?

Best Regards,

Ahmad

0 Kudos