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.

284<br />

CHAPTER 13 RECOVERY<br />

Next, let’s determine what the employee’s salary used <strong>to</strong> be, one hour ago. This is<br />

done with the use of the clause:<br />

<br />

<br />

<br />

<br />

<br />

<br />

Next, let’s formulate an update command <strong>to</strong> change the employee’s salary back <strong>to</strong><br />

the original value. Notice the use of the clause once again:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Flashback Versions<br />

If a row of data is changed multiple times, the clause can be used <strong>to</strong><br />

search for prior versions of the row in the undo segments. and<br />

are pseudocolumns that tell us when each version was created and which<br />

transaction created it. The absence of these values indicates the time prior <strong>to</strong> the window<br />

specified in the query. In the following example, you can see the original value of the<br />

employee’s salary ($17,000), the transaction that changed the value <strong>to</strong> $18,000, and the<br />

transaction that reversed the change:

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

Saved successfully!

Ooh no, something went wrong!