>>Ali Demir wrote: >>Does the cancelled query release all the locks it might have been holding
>"Shreyas Kaushik" wrote: > closing the activation all the tree of ResultSet and other resources should get released. Have you confirmed that the closing of the activation performs a rollback? The SQL standard I have says "An SQL-transactin is terminated by a <commit statement> or a <rollback statement>". Are latches being released? It was my understanding from Mike's description of log/store that even queries obtain latches, but not locks, on database pages. If so, then I would think that these latches need to be released and that you need to perform any testing necessary to ensure that they are getting released. If latches are not released it will affect other transactions. What about user-defined functions? If a query can contain references to user-defined functions and those functions can be written so as to modify the database as a side-effect then a query (as opposed to an insert/update/delete) could also obtain latches and locks that need to be released.
