Home  >  Article  >  Database  >  impdp导入用户sechema ORA-39082

impdp导入用户sechema ORA-39082

WBOY
WBOYOriginal
2016-06-07 17:35:122470browse

impdp导数据,出现ORA-39082 ORA-39083错误号,对象无法编译导入结束后可以通过编译对象来尝试:alter view view_name compile;如

impdp导数据,出现ORA-39082 ORA-39083错误号,对象无法编译
导入结束后可以通过编译对象来尝试:
 alter view view_name compile;
如果报错:
使用show errors定位问题所在源,是权限的问题还是dblink的问题;
如果是权限问题,说明之前创建用户时没有给足够的用户权限(主要是对一些表的读权限)
    主要查询以下两个视图:dba_sys_privs,dba_role_privs
如果是dblink问题,建议使用 dbms_metadata.get_ddl查看dblink定义ddl,,并尝试重建db_link

接着继续编译对象。


查看对象定义ddl:
select dbms_metadata.get_ddl('OBJECT_TYPE','OBJECT_NAME','USERNAME') from dual;


编译无效对象:
view:    alter view view_name compile;
function:    alter function function_name compile;


sys用户查看无效对象:
select owner,object_name,object_type,status
from dba_objects
where status !='VALID'
and owner not in ('SYS','SYSTEM')
/


show error 的用法:
编译view出现问题:
 alter view view_name compile;
Warning:view view_name with compilation errors.


SQL>show errors view view_name
Errors for view view_name:


LINE/COL    ERROR
-----------    -------------------------
0/0              ORA---

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn