Re: Cursor locking

From: Roy Brokvam <roy.brokvam_at_conax.com>
Date: Tue, 6 Apr 1999 09:17:13 +0200
Message-ID: <fyiO2.28$NR3.229_at_news1.online.no>


Peter Mckenzie wrote in message <7ddprj$n2j$1_at_nnrp1.dejanews.com>...
>
>
>Somewhere in Feuerstein's ORACLE PL/SQL book he says close your cursor to
>release locks. Elsewhere he says Commit or Rollback. This is what started
me
>thinking. A programmer might open a cursor for update but make no updates
as
>a result of some logic within his 'for' loop. He might think that because
no
>updates where made no commit is required and just close the cursor. I
would
>have hoped that provided no updates were made the cursor close would do the
>trick - but according to you the commit is always required.
>
>-----------== Posted via Deja News, The Discussion Network ==----------
>http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own

I don't know what he meant, but row locks are part of the transaction model, to which cursors must comply. As long as cursors are allowed to be closed before rollback/commit, they cannot be allowed to release the row locks. On the other side, if Oracle required you to commit or rollback before closing a for update cursor, there would be no row locks to release when closing the cursor.

Regards,

Roy Brokvam
roy.brokvam_at_conax.com Received on Tue Apr 06 1999 - 09:17:13 CEST

Original text of this message