由于此例子中仅仅是DROP了TABLESPACE表空间,而数据库本身完全是可用的,则此时可以利用FLASHBACK QUERY来获得DATA_OBJECT_ID与表名之间的映射关系。SQL> select count(*) from sys.obj;COUNT(*)———-75436SQL> select count(*) from sys.obj as of scn 1895940;select count(*) from sys.obj as of scn 1895940*第 1 行出现错误:ORA-01555: 快照过旧: 回退段号 0 (名称为 “SYSTEM”) 过小一开始想利用FLASHBACK QUERY来找出OBJ上之前的记录,但是发现由于使用SYSTEM ROLLBACK SEGMENT所以会出现ORA-01555错误此时可以考虑使用AWR视图DBA_HIST_SQL_PLAN,只要在最近7天中访问过该表一般可以从执行计划中获得OBJECT#和OBJECT_NAME的映射关系:SQL> desc DBA_HIST_SQL_PLAN名称 是否为空? 类型—————————————– ——– ———————–DBID NOT NULL NUMBERSQL_ID NOT NULL VARCHAR2(13)PLAN_HASH_VALUE NOT NULL NUMBERID NOT NULL NUMBEROPERATION VARCHAR2(30)OPTIONS VARCHAR2(30)OBJECT_NODE VARCHAR2(128)OBJECT# NUMBEROBJECT_OWNER VARCHAR2(30)OBJECT_NAME VARCHAR2(31)OBJECT_ALIAS VARCHAR2(65)OBJECT_TYPE VARCHAR2(20)OPTIMIZER VARCHAR2(20)PARENT_ID NUMBERDEPTH NUMBERPOSITION NUMBERSEARCH_COLUMNS NUMBERCOST NUMBERCARDINALITY NUMBERBYTES NUMBEROTHER_TAG VARCHAR2(35)PARTITION_START VARCHAR2(64)PARTITION_STOP VARCHAR2(64)PARTITION_ID NUMBEROTHER VARCHAR2(4000)DISTRIBUTION VARCHAR2(20)CPU_COST NUMBERIO_COST NUMBERTEMP_SPACE NUMBERACCESS_PREDICATES VARCHAR2(4000)FILTER_PREDICATES VARCHAR2(4000)PROJECTION VARCHAR2(4000)TIME NUMBERQBLOCK_NAME VARCHAR2(31)REMARKS VARCHAR2(4000)TIMESTAMP DATEOTHER_XML CLOB例如:select object_owner,object_name,object# from DBA_HIST_SQL_PLAN where sql_id=’avwjc02vb10j4′OBJECT_OWNER OBJECT_NAME OBJECT#——————– —————————————- ———-PARNASSUSDATA TORDERDETAIL_HIS 78688