---没有马上查询到SYS_FBA开头的表,直到20150516 20:50:19,SYS_FBA才被创建出来,与上次的insert操作的时间相隔<5分钟
SCOTT@tstdb1-SQL> select owner,table_name,partitioned from dba_tables where table_name like '%36945';
no rows selected
。。。。等待片刻
SCOTT@tstdb1-SQL> select owner,table_name,partitioned from dba_tables where table_name like '%36945';
OWNER TABLE_NAME PAR
------------------------------ ------------------------------ ---
SCOTT SYS_FBA_HIST_36945 YES
SYS SYS_MFBA_NHIST_36945 NO
SCOTT SYS_FBA_TCRV_36945 NO
SCOTT SYS_FBA_DDL_COLMAP_36945 NO
SCOTT@tstdb1-SQL> col object_name format a30
SCOTT@tstdb1-SQL> col owner format a10
SCOTT@tstdb1-SQL> set linesize 150
SCOTT@tstdb1-SQL> select owner,object_name,subobject_name,created from dba_objects where object_name in ('SYS_FBA_HIST_36945','SYS_MFBA_NHIST_36945','SYS_FBA_TCRV_36945','SYS_FBA_DDL_COLMAP_36945');
OWNER OBJECT_NAME SUBOBJECT_NAME CREATED
---------- ------------------------------ ------------------------------ -----------------
SYS SYS_MFBA_NHIST_36945 20150516 20:50:19
SCOTT SYS_FBA_HIST_36945 HIGH_PART 20150516 20:50:19
SCOTT SYS_FBA_DDL_COLMAP_36945 20150516 20:50:19
SCOTT SYS_FBA_HIST_36945 20150516 20:50:19
SCOTT SYS_FBA_TCRV_36945 20150516 20:50:19
---仅SYS_FBA_DDL_COLMAP_36945、SYS_FBA_TCRV_36945有记录
SCOTT@tstdb1-SQL> select count(*) from sys.SYS_MFBA_NHIST_36945;
COUNT(*)
--------
0
SCOTT@tstdb1-SQL> select count(*) from SYS_FBA_HIST_36945;
COUNT(*)
--------
0
SCOTT@tstdb1-SQL> select count(*) from SYS_FBA_DDL_COLMAP_36945;
COUNT(*)
--------
2
SCOTT@tstdb1-SQL> select count(*) from SYS_FBA_TCRV_36945;
COUNT(*)
--------
3
---SYS_FBA_DDL_COLMAP_36945表
SCOTT@tstdb1-SQL> col column_name format a20
SCOTT@tstdb1-SQL> col type format a20
SCOTT@tstdb1-SQL> col HISTORICAL_COLUMN_NAME format a20
SCOTT@tstdb1-SQL> set linesize 120
SCOTT@tstdb1-SQL> set numwidth 16
SCOTT@tstdb1-SQL> select * from SYS_FBA_DDL_COLMAP_36945;
STARTSCN ENDSCN XID O COLUMN_NAME TYPE HISTORICAL_COLUMN_NA
---------------- ---------------- ---------------- - -------------------- -------------------- --------------------
12723378739636 ID NUMBER ID
12723378739636 C2 VARCHAR2(3) C2
SCOTT@tstdb1-SQL> col object_name format a30
SCOTT@tstdb1-SQL> col owner format a10
SCOTT@tstdb1-SQL> set linesize 150
SCOTT@tstdb1-SQL> select owner,object_name,subobject_name,timestamp_to_scn(created) from dba_objects where object_name in ('T0516_5');
OWNER OBJECT_NAME SUBOBJECT_NAME TIMESTAMP_TO_SCN(CREATED)
---------- ------------------------------ ------------------------------ --------------------------
SCOTT T0516_5 12723378739636
SYS_FBA_DDL_COLMAP_36945保存了源表和archive table列名的映射关系,startscn等于源表创建时刻的scn
***修改源表的列名,测试一下SYS_FBA_DDL_COLMAP_36945保存的列名映射关系是否会跟着变,
SCOTT@tstdb1-SQL> alter table T0516_5 rename column c2 to c3;
Table altered.
SCOTT@tstdb1-SQL> select * from SYS_FBA_DDL_COLMAP_36945;