Describe AlertLogFile螻TraceFile here

Alert Log File螻 Trace File


1. Alert Log File

- Server Process Instance螳 譴 企欧 覈轟 蠍磯

- 豢

- 語ろ伎 default螳 覈 朱誤一 螳

- DB蟲譟磯 DB 蟲 覲蟆

- DB , Startup, Shutdown, Archive Log, Recovery

- Create TableSpace, Create Rollback Segment, Alter System Switch LogFile

(襦蠏 れ豺 Thread 1 advanced to log sequence 螳 朱 )

- 蠍一 蟆

- 蟆所殊 讌磯 蟆 譬. (讌一 朱 螻 願 .)

- 朱誤 殊 BACKGROUND_DUMP_DEST 覈



2. Background Process Trace File

- Background Process螳 襷 企欧 覲 蠍磯

- 螻レ

- 朱誤 殊 BACKGROUND_DUMP_DEST 覈

- 豢朱: 襦語る+覦炎係殊企 襦語ID.trc



3. User Trace File

- 豌 伎

- SQL 蟆

- 語覲, 語ろ伎る 豢螳

- 語覲 豢 (catproc.sql襦 (DB煙 ), prvtutil.plb襦 )

- 轟 語 豢 Enable/Disable蟆 襦

CONNECT SYS/CHANGE_ON_INSTALL AS SYSDBA

SELECT SID, SERIAL#, USERNAME FROM V$SESSION;

EXECUTE DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION(SID, SERIAL#, FALSE);

朱誤 殊 覈 USER_DUMP_DEST 蟆暑

- 語 豢

ALTER SESSION SET SQL_TRACE = TRUE;

- USER TRACE FILE リ概螳 朱誤: MAX_DUMP_FILE_SIZE

- 語ろ伎 覯 豢

- 朱誤 殊 SQL_TRACE = TRUE

- 語ろ伎 覯企襦 豢 觜 螻

- SQL_TRACE = FALSE螳 蠍磯蓋螳

-

SQL> CONNECT SYS/CHANGE_ON_INSTALL AS SYSDBA

郁屋給.

SQL> SELECT SID, SERIAL#, USERNAME FROM V$SESSION;



SID SERIAL# USERNAME

-------- --------


1 1

2 1

3 1

4 1

5 1

6 1

7 169

8 169

9 169

10 169

11 122 SYS

12 193 SCOTT



12 螳 給.



SQL> EXECUTE DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION(12, 193, TRUE);



PL/SQL 豌襴螳 朱 襭給.






朱誤 殊 USER_DUMP_DEST 覈 蟆暑襦 螳覲企 豢 殊 焔 蟆 覲 .

USERNAME: SCOTT, SID: 12, SERIAL#: 193 語朱 企.



SQL> SHOW USER

USER "SCOTT"

SQL> REM USERNAME: SCOTT, SID: 12, SERIAL#: 193

SQL> SELECT * FROM EMP;



EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO

-------- ------ ----- ------ ---- ------ --------


7369 SMITH CLERK 7902 80/12/17 800 20

7499 ALLEN SALESMAN 7698 81/02/20 1600 300 30

7521 WARD SALESMAN 7698 81/02/22 1250 500 30

7566 JONES MANAGER 7839 81/04/02 2975 20

7654 MARTIN SALESMAN 7698 81/09/28 1250 1400 30

7698 BLAKE MANAGER 7839 81/05/01 2850 30

7782 CLARK MANAGER 7839 81/06/09 2450 10

7788 SCOTT ANALYST 7566 87/04/19 3000 20

7839 KING PRESIDENT 81/11/17 5000 10

7844 TURNER SALESMAN 7698 81/09/08 1500 0 30

7876 ADAMS CLERK 7788 87/05/23 1100 20

7900 JAMES CLERK 7698 81/12/03 950 30

7902 FORD ANALYST 7566 81/12/03 3000 20

7934 MILLER CLERK 7782 82/01/23 1300 10



14 螳 給.



SQL> SELECT * FROM DEPT;



DEPTNO DNAME LOC

-------- ------------


10 ACCOUNTING NEW YORK

20 RESEARCH DALLAS

30 SALES CHICAGO

40 OPERATIONS BOSTON



SQL> REM 豢殊 焔 蟆 覲 .




TKPROF 語 豢殊 覲願鍵譬蟆 襷 危エ覲企襦 . 貊襦 螳 れ螻 螳

.



C:\r>tkprof E:\Oracle\admin\ora816\udump\ORA00900.TRC

output = c:\trace.txt



TKPROF: Release 9.2.0.1.0 - Production on Sep 3 22:26:26 2003



Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.



C:\>type trace.txt



Misses in library cache during parse: 1

Optimizer goal: CHOOSE

Parsing user id: SYS (recursive depth: 1)

********************************************************************************



SELECT *

FROM

EMP





call count cpu elapsed disk query current rows

----- -- ---- ------ ------ ------ --------


Parse 2 0.00 0.00 1 0 1 0

Execute 2 0.00 0.00 0 0 0 0

Fetch 4 0.00 0.00 1 4 8 28

----- -- ---- ------ ------ ------ --------


total 8 0.00 0.00 2 4 9 28



Misses in library cache during parse: 1

Optimizer goal: CHOOSE

Parsing user id: 32



Rows Row Source Operation

-------


14 TABLE ACCESS FULL EMP



********************************************************************************



SELECT *

FROM

DEPT





call count cpu elapsed disk query current rows

----- -- ---- ------ ------ ------ --------


Parse 1 0.00 0.00 1 0 1 0

Execute 1 0.00 0.00 0 0 0 0

Fetch 2 0.00 0.00 1 2 4 4

----- -- ---- ------ ------ ------ --------


total 4 0.00 0.00 2 2 5 4



Misses in library cache during parse: 1

Optimizer goal: CHOOSE

Parsing user id: 32




伎 れ 轟 語覯 轟 豢 DISABLE貅覲伎.



SQL> SHOW USER

USER "SYS"

EXECUTE DBMS_SYSTEM.SET_SQL_TRACE_IN_SESSION(12, 193, FALSE);




SQL> SELECT * FROM DEPT

2 WHERE DEPTNO = 10;



DEPTNO DNAME LOC

-------- ------------


10 ACCOUNTING NEW YORK



SQL>




TRACE殊 危エ覲企 蠍磯 蟆 覲 .