01.09.2016 Views

Beginning Oracle Database 11g Administration From Novice to Professional

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

60<br />

CHAPTER 3 ORACLE ARCHITECTURE<br />

4. The user’s program sends an SQL statement <strong>to</strong> the dedicated server for processing.<br />

5. The dedicated server prepares the SQL statement for execution. First it verifies<br />

that the SQL statement is syntactically correct. Then it verifies that the tables<br />

mentioned in the SQL statement actually exist and that the user has permission <strong>to</strong><br />

access those tables. Then it creates a query execution plan for the SQL statement.<br />

The query execution plan is saved in the plan cache in the shared SQL area so that<br />

it can be reused later by the same user or another user.<br />

6. The dedicated server checks whether the required blocks of data are in the buffer<br />

cache. If the needed blocks are not in the buffer cache, the dedicated server retrieves<br />

them from the data files.<br />

7. If the SQL statement does not involve any modifications <strong>to</strong> the data, the required<br />

data rows are transmitted <strong>to</strong> the user. If the SQL statement involves modification<br />

<strong>to</strong> the data, the dedicated server first copies the relevant blocks of data <strong>to</strong> a rollback<br />

segment. It also creates undo and redo entries in the log buffer. The log writer<br />

wakes up periodically and copies any accumulated undo and redo entries <strong>to</strong> the<br />

redo log files.<br />

8. If the SQL statement involved modification <strong>to</strong> the data, the user’s program sends<br />

a command <strong>to</strong> the dedicated server process. The dedicated server process<br />

puts the instruction in the log buffer and waits for confirmation from the<br />

log writer that it has recorded the instruction in the redo log files—this<br />

guarantees the durability of the modifications.<br />

9. The database writer wakes up periodically and copies any modified data blocks<br />

that it finds in the data cache <strong>to</strong> the data files. The checkpoint process wakes up<br />

periodically and initiates a systematic synchronization procedure on all data files<br />

that includes updating the system change number in the heading of each data file.<br />

10. If the undo and redo entries fill up the current redo log file, the log writer closes<br />

the file and opens the next one. The archiver subsequently makes a copy of the<br />

closed file in case a data file ever gets damaged and needs <strong>to</strong> be repaired.<br />

11. The user’s program disconnects from the database. This terminates the dedicated<br />

server process.<br />

Summary<br />

The information in this chapter is a summary of the contents of <strong>Oracle</strong> <strong>11g</strong> Concepts. Here<br />

is a short summary of the concepts we <strong>to</strong>uched on:

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!