05.11.2015 Views

Apress.Expert.Oracle.Database.Architecture.9i.and.10g.Programming.Techniques.and.Solutions.Sep.2005

Create successful ePaper yourself

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

CHAPTER 3 ■ FILES 81<br />

3 l_dummy number;<br />

4 begin<br />

5 l_dummy := dbms_utility.get_parameter_value<br />

6 ( 'background_dump_dest', l_dummy, l_string );<br />

7 dbms_output.put_line( 'background: ' || l_string );<br />

8 l_dummy := dbms_utility.get_parameter_value<br />

9 ( 'user_dump_dest', l_dummy, l_string );<br />

10 dbms_output.put_line( 'user: ' || l_string );<br />

11 end;<br />

12 /<br />

background: /home/ora10g/admin/ora10g/bdump<br />

user: /home/ora10g/admin/ora10g/udump<br />

PL/SQL procedure successfully completed.<br />

Naming Convention<br />

The trace file naming convention changes from time to time in <strong>Oracle</strong>, but if you have an<br />

example of a trace file name from your system, it is easy to see the template in use. For example,<br />

on my various servers, a trace file name looks as shown in Table 3-1.<br />

Table 3-1. Sample Trace File Names<br />

Trace File Name Platform <strong>Database</strong> Version<br />

ora10g_ora_24574.trc Linux 10g Release 1<br />

ora9ir2_ora_24628.trc Linux 9i Release 2<br />

ora_10583.trc Linux 9i Release 1<br />

ora9ir2w_ora_688.trc Windows 9i Release 2<br />

ora10g_ora_1256.trc Windows 10g Release 1<br />

On my servers, the trace file name can be broken down as follows:<br />

• The first part of the file name is the ORACLE_SID (with the exception of <strong>Oracle</strong>9i<br />

Release 1, where <strong>Oracle</strong> decided to leave that off).<br />

• The next bit of the file name is just ora.<br />

• The number in the trace file name is the process ID of your dedicated server, available<br />

to you from the V$PROCESS view.<br />

Therefore, in practice (assuming dedicated server mode), you need access to four views:<br />

• V$PARAMETER: To locate the trace file for USER_DUMP_DEST<br />

• V$PROCESS: To find the process ID<br />

• V$SESSION: To correctly identify your session’s information in the other views<br />

• V$INSTANCE: To get the ORACLE_SID

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

Saved successfully!

Ooh no, something went wrong!