01.09.2016 Views

Beginning Oracle Database 11g Administration From Novice to Professional

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 11 FIXING PROBLEMS 245<br />

<br />

<br />

In the preceding example, two users are modifying the same data. Deadlock also<br />

occurs in the next example, even though the users are modifying different data. At step<br />

3, user A will be blocked because <strong>Oracle</strong> needs <strong>to</strong> verify the absence of child records<br />

before deleting a parent record. In the absence of an index on the column of the<br />

table, <strong>Oracle</strong> attempts <strong>to</strong> lock the entire table and is prevented from doing so<br />

because user A has a lock on one of the records in the table. User B is blocked in turn at<br />

step 4, and a deadlock results:<br />

<br />

<br />

<br />

<br />

Defects in database design such as un- indexed foreign keys can increase the frequency<br />

of deadlocks, but deadlocks can happen any time more than one user is using the database.<br />

All database programs must anticipate the possibility and take the appropriate action<br />

when a deadlock happens—that is, issue the command and retry the transaction.<br />

ORA-00600: Internal Error Code<br />

<strong>Oracle</strong> reports an ORA- 00600 error in the alert log whenever it encounters an unexpected<br />

condition—the frequent cause is an <strong>Oracle</strong> bug—and s<strong>to</strong>ps processing the SQL statement<br />

it was processing at the time. Here is the verbiage from <strong>Oracle</strong> <strong>Database</strong> <strong>11g</strong> Error<br />

Messages:<br />

<br />

<br />

<br />

<br />

<br />

Caution ORA-00600 errors should always be investigated, and the DBA should confirm that the error<br />

was not triggered by a corrupted data block.

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

Saved successfully!

Ooh no, something went wrong!