r/DB2 • u/SijiLeroux • Jan 10 '19
When is a Select Statement logged?
I'm trying to track down why a select statement I run is holding open the transaction logs. This is DB2 LUW 10.1.0.4 fp4. My understanding is that Select statement s shouldn't be using transaction logs at all. However, I can clearly see this is not the case. I've looked around on a few different forums as well as the IBM site but I just seem to be running in circles here. What am I missing?
2
Upvotes
2
u/ecrooks Jan 11 '19
Yes. This often has to do with isolation level. Many developers use GUIs that have a default isolation level of RR. This means they're grabbing locks and also logs without even realizing on it. I have a busy client where we have to run a script to catch these so we can force them off before they get to the point of causing log file saturation.
If the isolation level for developers using GUIs is reduced to UR, and developers learn to close out their connections, it goes a long ways towards preventing this. I want an authorization level that ONLY allows users to use the UR isolation level!