Is there a way to have a python script check if the AcceptConnections tool is set to True or False?
arcpy.AcceptConnections(admin_workspace, False)
I need to check what the current state is in the enterprise geodatabase?
Without knowing more context, it might be easier to simply attempt to do something and handle the exception otherwise. For example, if you need to connect but you're not sure if connections are allowed, just attempt to connect in a try block and handle the case it's denied in the except. Or, if you need to know if you need to turn connections back on, just turn it on (even if it's already on).
So I have a co worker that does some database administration stuff and he sometimes forgets to check the box to allow connections. I just want to have a quick little script that checks if he left it unchecked or not.
Will you take any action based on the result or just ask your coworker if the current state is intended?
Yes action will be taken. Mostly an email will be sent to notify of the issue. If it is intended then at least he will know I am watching 🙂
From what I can tell there must not be a property to describe the state of the check box. That is all I am looking for. I have another route I can go but if there was this option then that would make it easy.