TABLESPACE_NAME FILE_ID
------------------------------ ----------
OGG2 6
SQL> select tablespace_name,status from dba_tablespaces;
TABLESPACE_NAME STATUS
------------------------------ ---------
SYSTEM ONLINE
UNDOTBS1 ONLINE
SYSAUX ONLINE
TEMP ONLINE
USERS ONLINE
TBS_OGG ONLINE
OGG2 READ ONLY
7 rows selected.
DATA FILE 6不同是因为对应的表空间是READ ONLY的状态,所以数据文件的SCN不会发生变化。
$ORACLE_HOME/rdbms/admin/gettrace.sql脚本的内容如下:
[oracle1@RedHat5 admin]$ cat gettrace.sql
SELECT d.value || '/' || lower(rtrim(i.instance, chr(0))) || '_ora_' ||
p.spid || '.trc' trace_file_name
from (select p.spid
from sys.v$mystat m, sys.v$session s, sys.v$process p
where m.statistic# = 1
and s.sid = m.sid
and p.addr = s.paddr) p,
(select t.instance
from sys.v$thread t, sys.v$parameter v
where v.name = 'thread'
and (v.value = 0 or t.thread# = to_number(v.value))) i,
(select value from sys.v$parameter where name = 'user_dump_dest') d;