Is there any way to setup a
Begin Transaction
and
Commit or rollback
in a python script beside the try and except:
Not sure what your trying to do. You may find this link helpful ArcGIS Help 10.1
Hi Wes thank you for your prompt answer. I have to run some back-up process during night that are very critical, What I am trying to catch is , if the script start running and it is half way through, suddenly stop for some reason, I would like to come back or RollBack my transaction to the 0 stage that why I am looking for type sort Begin transaction and Commit/rollback transaction as it is in SQL server.
This article ArcGIS Help 10.1 will help with error catching and traceback for where the script fails. If you are backing up shapefiles or geodatabases i would simply rerun the script.
I think you are going to be stuck using a try catch block as it sounds like the python script is controlling how the update happens in your process. As Wes Miller suggests you could use an edit session to provide rollback capabilities but it is the try/catch block that will end up triggering the stopOperation or abortOperation calls for the edit session.