DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: commit statement

  1. #1
    Join Date
    Oct 2002
    Posts
    284

    commit statement

    hello all..

    Just a basic question ....

    I have user USER_A connected to ORacle Database from 2 different workstations.

    When USER_A from Workstation WK1 deleted some records from table_1, and not issued Commit, can user_a from WK2 see the new results or should he reconnect to see the results from WK2 ?..

    When exactly does USER_A at WK2 see the results done by USER_A at WK1 ?...

    Thanks
    Ron

  2. #2
    Join Date
    May 2002
    Posts
    2,645

  3. #3
    Join Date
    Jan 2003
    Location
    Delhi
    Posts
    63
    It is session specific. there is no relation with User .
    Last edited by mdash; 01-17-2003 at 06:56 PM.

  4. #4
    Join Date
    May 2002
    Posts
    2,645
    Originally posted by mdash
    It is session specific. there is no relation with User .
    Oh, really?

    session 1 as scott:
    SQL> select count(*) from emp;

    COUNT(*)
    ----------
    13

    session 2 as scott:
    SQL> select count(*) from emp;

    COUNT(*)
    ----------
    13


    session 1:
    SQL> delete from emp;

    13 rows deleted.

    SQL> select count(*) from emp;

    COUNT(*)
    ----------
    0

    session 2:
    SQL> select count(*) from emp;

    COUNT(*)
    ----------
    13

    session 1: do the commit
    SQL> commit;

    Commit complete.

    session 2: is the data still there?
    SQL> select count(*) from emp;

    COUNT(*)
    ----------
    0

    NO

  5. #5
    Join Date
    May 2002
    Posts
    2,645

    Re: commit statement

    Originally posted by vr76413
    I have user USER_A connected to ORacle Database from 2 different workstations.

    Save yourself the walking. It doesn't matter that the same user is on different workstations. What does matter is the same user has two different sessions, which can be initiated from the same workstation.

  6. #6
    Join Date
    Jan 2003
    Location
    Delhi
    Posts
    63
    stecal,

    I told samething whatever U mentioned .I have not described it.
    My purpose was to make clear that only after commiting in 1st session 2nd session can see it . It doesn't matter whehter U are using same user or different user in both the session.

  7. #7
    Join Date
    May 2002
    Posts
    2,645
    I see. The example was with the same user, but that doesn't matter either. I misunderstood what you meant by user.

  8. #8
    Join Date
    Sep 2001
    Posts
    200
    No change is visible to a second user until it has been commited. Remember your rollback segmentgs?
    Life is what is happening today while you were planning tomorrow.

  9. #9
    Join Date
    Feb 2001
    Location
    UAE
    Posts
    304
    I see. The example was with the same user, but that doesn't matter either. I misunderstood what you meant by user.

    Stecal, think before you jump to a conclusion. Good for your future.
    Agasimani
    OCP(10g/9i/8i/8)

Posting Permissions

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


Click Here to Expand Forum to Full Width