+1  A: 

Could you try forcing the activity to a particular orientation so that it cant transition to the other orientation?

<activity android:name=".views.AfterActionReview" android:label="@string/app_name" 
                 android:screenOrientation="landscape">
            <intent-filter> 
                <action android:name="android.intent.action.DEFAULT" /> 
                <category android:name="android.intent.category.VIEW" /> 
            </intent-filter>
</activity> 

If that is problematic for the overall use of your app, consider moving the db update process to a new activity that you can safely lock to a particular orientation and then switch back to the other one when finished with the db update.

I think you may still face a similar problem if the user quits your app while your long running update is happening.

The additional activity might also give you a place to warn the user not to interrupt the activity while updating.

Hope that helps.

mmeyer
Actually, addition activity sound like a good idea. I'm already displaying progress dialog, so user is informed about long operation in progress. I'll give it a try and let you know if it works.
Ramps
Ok, your idea with additional activity was really great. It works perfectly fine for me. Just small modification to mmeyer proposal: android:screenOrientation="landscape" does not prevent activity from being destroyed. To make sure your activity is not destroyed you need to handle configuration changes yourself, by adding this: android:configChanges="keyboard|keyboardHidden|orientation". Thanks very much for your solution! Regards!
Ramps
...and of course onConfigurationChanged() method needs to be overriden in Activity
Ramps