SQL*Plus: Release 10.2.0.5.0 - Production on Tue Oct 28 01:24:56 2014
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create pfile='/tmp/a.txt' from spfile;
File created.
增加
event='10061 trace name context forever,level 10'
SQL> startup pfile='/tmp/a.txt';
SQL> show parameter event
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
event string 10061 trace name context forev
er,level 10
SQL> conn scott/tiger
Connected.
SQL> select table_name from user_tables;
TABLE_NAME
------------------------------
DEPT
EMP
BONUS
SALGRADE
SQL> CREATE TABLE A2 AS SELECT * FROM A1;
CREATE TABLE A2 AS SELECT * FROM A1
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01013: user requested cancel of current operation
session 2
SQL> select count(*) from dba_extents where segment_type='TEMPORARY';
COUNT(*)
----------
29
SQL> select segment_name from dba_extents where segment_type='TEMPORARY';
SEGMENT_NAME
--------------------------------------------------------------------------------
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
29 rows selected.
SQL> select header_file,header_block from dba_segments where segment_name='4.6299';
HEADER_FILE HEADER_BLOCK
----------- ------------
4 6299
临时段的名称是由文件头和块头组成的
SQL> conn / as sysdba
Connected.
session 1:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup pfile='/tmp/a.txt';
ORACLE instance started.
Total System Global Area 276824064 bytes
Fixed Size 2095640 bytes
Variable Size 100664808 bytes
Database Buffers 167772160 bytes
Redo Buffers 6291456 bytes
Database mounted.
Database opened.
session 2:
SQL> select count(*) from dba_extents where segment_type='TEMPORARY';
COUNT(*)
----------
29
session 1
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 276824064 bytes
Fixed Size 2095640 bytes
Variable Size 100664808 bytes
Database Buffers 167772160 bytes
Redo Buffers 6291456 bytes
Database mounted.
Database opened.
session 2:
SQL> select count(*) from dba_extents where segment_type='TEMPORARY';
COUNT(*)
----------
29
Copyright (c) 1982, 2010, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> create pfile='/tmp/a.txt' from spfile;
File created.
增加
event='10061 trace name context forever,level 10'
SQL> startup pfile='/tmp/a.txt';
SQL> show parameter event
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
event string 10061 trace name context forev
er,level 10
SQL> conn scott/tiger
Connected.
SQL> select table_name from user_tables;
TABLE_NAME
------------------------------
DEPT
EMP
BONUS
SALGRADE
SQL> CREATE TABLE A2 AS SELECT * FROM A1;
CREATE TABLE A2 AS SELECT * FROM A1
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01013: user requested cancel of current operation
session 2
SQL> select count(*) from dba_extents where segment_type='TEMPORARY';
COUNT(*)
----------
29
SQL> select segment_name from dba_extents where segment_type='TEMPORARY';
SEGMENT_NAME
--------------------------------------------------------------------------------
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
4.6299
29 rows selected.
SQL> select header_file,header_block from dba_segments where segment_name='4.6299';
HEADER_FILE HEADER_BLOCK
----------- ------------
4 6299
临时段的名称是由文件头和块头组成的
SQL> conn / as sysdba
Connected.
session 1:
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup pfile='/tmp/a.txt';
ORACLE instance started.
Total System Global Area 276824064 bytes
Fixed Size 2095640 bytes
Variable Size 100664808 bytes
Database Buffers 167772160 bytes
Redo Buffers 6291456 bytes
Database mounted.
Database opened.
session 2:
SQL> select count(*) from dba_extents where segment_type='TEMPORARY';
COUNT(*)
----------
29
session 1
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 276824064 bytes
Fixed Size 2095640 bytes
Variable Size 100664808 bytes
Database Buffers 167772160 bytes
Redo Buffers 6291456 bytes
Database mounted.
Database opened.
session 2:
SQL> select count(*) from dba_extents where segment_type='TEMPORARY';
COUNT(*)
----------
29