Home > Ask the Oracle Database / Applications Experts > Oracle database design and architecture Questions & Answers > What is the SCN?
Ask The Oracle Expert: Questions & Answers
EMAIL THIS

What is the SCN?

Brian Peasland EXPERT RESPONSE FROM: Brian Peasland

Pose a Question
Other Oracle Categories
Meet all Oracle Experts
Become an Expert for this site


Oracle tips, scripts, and expert advice
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google


>
QUESTION POSED ON: 05 March 2007
I am not able to understand the concept of SCN (system change number). When is it alloted in redo? Is it alloted to each DML or DDL we fire or to a commited transaction? And what happens in case we roll back the transaction?

>
The System Change Number is assigned many times through the course of a session. Each DML (including SELECT) statement will get a SCN. And each DDL will get a SCN. The statement receives a SCN when it starts. The assignment does not wait for commit or rollback. The system uses the SCN to know the order the statements were given to the database. A lower SCN occurs at some point in time before a higher SCN. Imagine UserA performs an UPDATE on table EMP. This UPDATE statement is given SCN 15734. Some point in time later, UserB performs a SELECT on table EMP (and UserA has not committed the changes. The SELECT is given SCN 16014. Oracle knows that UserA has not yet committed the change yet this does not stop UserB from querying the table, even though UserA has a lock on the table. Oracle creates a read-consistent image of the data for UserB. Oracle knows that UserB's SQL statement occurred after UserA's UPDATE and uses the SCN's to ensure that UserB sees the correct image of the data. Once UserA commits the transaction, the commit marker (or rollback) is given a SCN of its own. This way, Oracle will know when the commit (or rollback) was given in relation to other SQL statements.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us    Add to Google



RELATED CONTENT
Oracle database design and architecture
Why am I receiving Oracle memory allocation errors?
How to join two tables with unique keys in Oracle
How does the Oracle LGWR write to online redo log files?
Can I check an Oracle instance without logging into the Oracle server?
How to use V$SEGMENT_STATISTICS to find the most accessed Oracle table
Can I install an Oracle client on Windows 7?
How to use the Oracle Database Upgrade Assistant (DBUA)
Can I specify Oracle column order in my database table?
Can I have a single Oracle 11g RAC instance across multiple databases?
How to use the Oracle export utility to duplicate database structure

Oracle database design and architecture
Why am I receiving Oracle memory allocation errors?
How to join two tables with unique keys in Oracle
How does the Oracle LGWR write to online redo log files?
Can I check an Oracle instance without logging into the Oracle server?
How to determine your SQL database through needs analysis
Diving deeper into the SQL database features
Breaking down the contenders in the SQL database market
The MySQL open source database in the enterprise
What managers should consider when starting a database scaling project
How to use V$SEGMENT_STATISTICS to find the most accessed Oracle table

Oracle tutorials, tips and FAQs
Part 3: The final ERP transition: Crossing the finish line successfully
Oracle tutorial library: SearchOracle.com's learning guides
What managers should consider when starting a database scaling project
Part 2: Maintaining your place in the race -- ERP project management
Oracle virtualization introduction guide
Revving your engines: Tuning up your ERP project plan
Oracle Openworld 2009: Here's what to expect
Oracle OpenWorld 2009 Special Report
SearchOracle.com podcasts
Do I need to buy an Oracle license for a development database?
Oracle tutorials, tips and FAQs Research

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
E. F. Codd  (SearchOracle.com)
extent  (SearchOracle.com)
flexfield  (SearchOracle.com)
foreign key  (SearchOracle.com)
multidimensional database  (SearchOracle.com)
object-oriented database management system  (SearchOracle.com)
quad tree  (SearchOracle.com)
relational online analytical processing  (SearchOracle.com)
row  (SearchOracle.com)
splay tree  (SearchOracle.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Oracle White Papers: Fusion Middleware
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts