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 16 INSTANCE TUNING 379<br />

6. Connect <strong>to</strong> the database as the user. Query the table and<br />

find the session ID of the blocked session. Because you know that it is waiting for<br />

an event <strong>to</strong> complete, you can use the command <br />

<br />

.<br />

7. Query the view and obtain the serial number of the blocked process. Use<br />

the command .<br />

8. Begin tracing the blocked session by using the <br />

session; issue the command <br />

. Refer <strong>to</strong> <strong>Oracle</strong> <strong>Database</strong> <strong>11g</strong> PL/SQL Packages and Types<br />

Reference for a description of the procedure.<br />

9. Generate a Statspack snapshot by using the procedure. Using a<br />

special version of the procedure, capture performance information for the blocked<br />

session in addition <strong>to</strong> systemwide information; issue the command <br />

.<br />

10. Now resume the first session and issue the command. This will release<br />

the blocked session, and <strong>Oracle</strong> will display the error <br />

.<br />

11. Identify the trace file for the second session by using the command <br />

<br />

. Review the trace file and locate the lines similar <strong>to</strong> the following line:<br />

<br />

<br />

12. Confirm that the object number listed in the trace file corresponds <strong>to</strong> the <br />

table. Use the command <br />

.<br />

13. Perform the experiment once more and confirm that additional wait messages<br />

appear in the trace file.<br />

14. Navigate <strong>to</strong> the folder where the trace file is located and invoke the utility<br />

from the command line. You have <strong>to</strong> specify the name of the trace file and choose<br />

a name for the output file. Review the output file created by .<br />

15. Generate another Statspack snapshot by using the procedure with<br />

the same parameter used in step 9. Use the command <br />

.<br />

16. Connect <strong>to</strong> the database as the or user and generate a Statspack<br />

report from the snapshots obtained in step 9 and step 15. Run the <br />

script by using the command .

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

Saved successfully!

Ooh no, something went wrong!