Results 1 to 9 of 9
  1. #1
    Join Date
    Jan 2004
    Location
    bangalore
    Posts
    14

    Unanswered: DML statements getting commited...

    Hi,

    Having a serious problem with auto commit. when I open a SQL session and execute some dml statemets and exits from SQL sessions, the statements are getting committed. Is there any way by which i can force sql to rollback instead of getting committed.


    Murali
    Murali Mohan Rao. M

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    set AUTOCOMMIT OFF

  3. #3
    Join Date
    Jan 2004
    Location
    bangalore
    Posts
    14
    Originally posted by anacedent
    set AUTOCOMMIT OFF

    But set AUTOCOMMIT off is to indicate whether to commit automatically after each DML Statement. Is that right? My problem here is, after I run some DML statements and just exit from the SQL session, that is commiting all the statements that were executed earlier.


    Murali
    Murali Mohan Rao. M

  4. #4
    Join Date
    Feb 2004
    Posts
    108
    When you "exit" sql-plus session, you gracefully exit from the application. You leave the session with respect. So Oracle considers that you agree and accept all changes. It's the way it works.

    Try making some changes from sql plus and then kill the session. See the difference.

  5. #5
    Join Date
    Jan 2004
    Location
    bangalore
    Posts
    14
    Thanx for the info. I wanted to know, whether there is any kind of parameter by which I can force Oracle to commit only if the client executes COMMIT statement otherwise it should ROLLBACK.

    Murali
    Murali Mohan Rao. M

  6. #6
    Join Date
    Feb 2004
    Posts
    108
    Wish we had "logout.sql" file !!

  7. #7
    Join Date
    Jan 2004
    Posts
    37
    in the init_sid.ora file
    write SET AUTOCOMMIT OFF...

  8. #8
    Join Date
    Jan 2004
    Location
    bangalore
    Posts
    14
    I don't think this parameter is set at the INIT<sid>.ora file. Anyhow, AUTOCOMMIT is either to auto commit soon after the DML statement or wait for either a explicit commit from the client. Isn't that right??
    Murali Mohan Rao. M

  9. #9
    Join Date
    Jan 2004
    Posts
    37
    if autocommit is on then any dml operation will be committed right after execution you don't need to explicitly say 'commit'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •