flashback_transaction_query是一个视图,定义如下
create or replace view sys.flashback_transaction_query as
select xid, start_scn, start_timestamp,
decode(commit_scn, 0, commit_scn, 281474976710655, NULL, commit_scn)
commit_scn, commit_timestamp,
logon_user, undo_change#, operation, table_name, table_owner,
row_id, undo_sql
from sys.x$ktuqqry
sys.x$ktuqqry是一个动态性能表
--=======================================
SQL> shutdown immediate
数据库已经关闭。
已经卸载数据库。
ORACLE 例程已经关闭。
SQL> startup nomount
ORACLE 例程已经启动。
Total System Global Area 167772160 bytes
Fixed Size 1247900 bytes
Variable Size 79693156 bytes
Database Buffers 83886080 bytes
Redo Buffers 2945024 bytes
SQL> select count(*) from x$ktuqqry;
COUNT(*)
----------
0
SQL> alter database mount;
数据库已更改。
SQL> select count(*) from x$ktuqqry;
COUNT(*)
----------
0
SQL> alter database open;
数据库已更改。
SQL> select count(*) from x$ktuqqry;
COUNT(*)
----------
294182
--db open之后x$ktuqqry有了数据,说明x$ktuqqry的数据肯定和datafile文件有关,这就不能断定x$ktuqqry肯定和undo的datafile有关了。
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS1
SQL> create undo tablespace undotbs2 datafile 'E:ORACLEPRODUCT10.2.0ORADATA
TESTundotbs02.dbf' size 1m;
表空间已创建。
SQL> alter system set undo_tablespace=undotbs2;
系统已更改。
SQL> show parameter undo
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
undo_management string AUTO
undo_retention integer 900
undo_tablespace string UNDOTBS2
SQL> select count(*) from x$ktuqqry;
COUNT(*)
----------
294236
SQL> drop tablespace undotbs1 including contents and datafiles;
表空间已删除。
SQL> select count(*) from x$ktuqqry;
COUNT(*)
----------
15
SQL> select count(*) from flashback_transaction_query;
COUNT(*)
----------
15
SQL>
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/19602/viewspace-1018473/ ,如需转载,请注明出处,否则将追究法律责任。