1、問題
Oracle導出的dmp文件,再導入到新建的數據庫用戶下面會發現缺少好幾張表,檢查之後是因爲導出dmp文件的時候沒有做空表處理,導致那些沒有數據的表並沒有成功導出
2、解決辦法
查詢一個數據庫用戶下有多少張表:select count(*) from user_tables ;
查詢一個數據庫用戶下的空表:select table_name from user_tables where NUM_ROWS=0;
(1)初次創建用戶和表空間的時候執行:alter system set deferred_segment_creation=false;
(2)在導出之前執行:Select 'alter table '||table_name||' allocate extent;' from user_tables where num_rows=0;
將查詢出來的結果複製到SQL窗口執行下