Re: how to find out current isolation level?
Posted in 1994
David Hovemeyer (daveho@earlham.edu) wrote: : Hello, : Is there a way to find out (through ESQL/C) what the current : isolation level is? By querying a system table, perhaps? : Thanks, : Dave I don't think there is a simple way. If you keep track of your isolation through encapsulation then the level is available to you. Depending on your database (non-logging, logging, ANSI) the SQL reference for SET ISOLATION will indicate the default setting. (eg. dirty read for non-logging). That then handles the inital value, or you could always set it yourself. You can figure this out by inspecting the warning fields in the sqlca when you open up the database, a simple switch if ... then ... else can handle the state. (that's what I do). You could use popen(), on tbstat -u (I think), there is a column on either -k or -u which indicates the current isolation level for your transaction. Again look at the Online adinistrators guide for that one (section on tbstat -u/-t). Keeping track of it yourself is probably the best way. Dig through those Informix manuals, there IS a lot of information there ... somewhere! Good luck George Long [Currently drinking some fine Whistler Black Tusk so excuse any errors!]