Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: cursors and transactions
On Thu, 21 May 1998 14:05:00 -0400, Igor Sereda <sereda_at_spb.runnet.ru> wrote:
>Hello,
>
>Please someone could tell me this - Do opening a cursor start a
>transaction?
A transaction in Oracle begins when the first executable SQL statement is encountered after a commit, rollback or db connection.
>What if cursor is select for update?
>
>The problem is that i need to run periodically a pl/sql procedure which
>opens a cursor for update and searches through a certain table.
>It MAY or MAY NOT actually update the table row (where current of ...).
>I cannot integrate the condition into cursor's select statement.
>When database is inactive (no operations from applications),
>these procedures do nothing, but if select for update will produce a
>transaction, it will be archived and there will be spare archived
>redo logs. So the answer seems to be crucial.
>
>Thanks to anyone, any comments are welcome,
>Igor
>
>PS.
>BTW, Will a single COMMIT or ROLLBACK statement without any
>preceding DML or something generate redo log entries?
>
No transaction, nothing to do.
>--
>Igor Sereda,
>ITC, Russia
-- These opinions are my own and not necessarily those of Information Quest or Pebble In The Sky http://www.informationquest.com http://ourworld.compuserve.com/homepages/joel_garry jgarry@nospameiq.com "See your DBA?" I AM the @#%*& DBA! Remove nospam to reply. Sorry.Received on Thu May 21 1998 - 00:00:00 CDT