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

Thread: v$thread or v$database

  1. #1
    Join Date
    Oct 2000
    Posts
    23
    Hello,every one here.

    I have noticed that there is a column named CHECKPOINT_CHANGE# in either V$DATABASE or V$THREAD
    Also, they have the same value.

    I don't know the meaning of this column in each table .

    Is there any one can tell me.

    Thanks in advance

  2. #2
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    it states the SCN of last checkpoint

  3. #3
    Join Date
    Oct 2000
    Posts
    23
    But

    I thought that SCN have nothing relative to checkpoint, It is created only after commit.

  4. #4
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    checkpoint is a process, all processes are assigned a SCN

  5. #5
    Join Date
    Oct 2000
    Posts
    23
    would you please do me a favor to clarify it
    thanks

  6. #6
    Join Date
    May 2000
    Location
    Alex, Egypt
    Posts
    41
    SCN is system change number, at any time, there is only one SCN for the full database, it is not a number for each process.
    and it has nothing to do with Checkpoint.

    SCN is incremented by one, each time a transaction commits.
    This number represent a version of the data, whenever a transaction commits, there is a nwe version of the data and the SCN is incremented.

    SCN is used to gurantee the consistence of any select statement, as you know, if during a long running select, some records have been changed , and a transaction commits, the query should return the data, as the time where the query begin, and any changes commited after should not be reflected on the query.
    So whenever a query starts, it gets the current SCN of the database and whenever it fetches a record, it checks the SCN of the block, if it's greater then the query SCN, it gets this block from the rollback segment. this is why you should have large rollback segments, if you will have long running queries, with many concurrent transactions. and this means also that the data in the rollback segments are not cleaned up directly after a transaction commits, but they are kept for any long running transaction.
    Amir Magdy

  7. #7
    Join Date
    Oct 2000
    Posts
    23
    thank you ,amir_magdy

    You really helped me understand the concept of SCN and how it works.

    But would you please answer the first post in this thread.

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