1. 程式人生 > 實用技巧 >資料泵匯入ORA-39082報錯解決

資料泵匯入ORA-39082報錯解決

在使用資料泵進行模式級別匯入匯出時,匯出成功後進行資料匯入。出現報錯:

可以看到儲存過程物件F_NUM編譯報錯。

  • 那麼首先檢視無效物件。
SYS@proe>col object_name for a30;
SYS@proe>select owner,object_name,object_type,status
from dba_objects
where status !='VALID'
and owner not in ('SYS','SYSTEM')  2    3    4  ;

  • 對這個無效物件執行編譯。
SYS@proe>alter procedure new_scott.F_NUM compile;

Warning: Procedure altered with compilation errors.

編譯無效物件方法:
view: alter view view_name compile;
function: alter function function_name compile;
procedure: alter procedure procedure_name compile;

  • 發現編譯是不成功的,使用show error進行判斷
SYS@proe>show errors procedure new_scott.F_NUM;
Errors for PROCEDURE NEW_SCOTT.F_NUM:

LINE/COL ERROR
-------- ------------------------------------------------
0/0      PL/SQL: Compilation unit analysis terminated
2/11     PLS-00201: identifier 'EMPLOYEES.EMPLOYEE_ID' must be declared


來自為知筆記(Wiz)