1 Reply Latest reply: Jul 1, 2013 5:45 PM by ying RSS

    Timesten create a lock for select statement through sqldev

    ying

      When use ttisql connect to TimesTen Release 7.0.6.15.0 at autocommit=1, there is no lock for select statement.

      but when I use sql developer (driver is ttjdbc5.jar, regardless of version) to connect, even with autocommit=1, there will be locks for select statement.

      Is it a bug? How can I achieve the same no locks for select statement through sql developer?Thanks.

        • 1. Re: Timesten create a lock for select statement through sqldev
          ying

          -your update tells me that you are connected to a remote timesten data store using the client driver

           

          -the ttXactAdmin output indicates that SqlNavigator has a shared lock on the database itself: this will not interfere with anybody else' read operations, and I believe that until such time as you actually attempt some kind of DML against the data store that th IX lock on the database lock will not interfere with any other DML either.

           

          -a shared database lock will always be acquired for any transaction in TimesTen. You can test this for yourself from ttisql: set autocommit off, perform a simple update and do not commit the transaction. Then open a separate session and execute ttxactadmin - you will the IX database lock as well as the various locks on tables and indexes.

           

          -I believe this pretty much proves my original thinking: that sqlDeveloper attaches to TimesTen in transaction mode. However, the IX lock on the database will not interfere with anybody else's work and should not be a problem.