不同版本的EXP/IMP问题有什么解决方法?
发表:2023-08-29 12:01:20 阅读:108

电子资讯】不同版本的EXP/IMP问题有什么解决方法?

 

不同版本的EXP/IMP问题有什么解决方法?一般来说,从低版本导入到高版本问题不大,麻烦的是将高版本的数据导入到低版本中,在Oracle9i之前,不同版本Oracle之间的EXP/IMP可以通过下面的方法来解决:

1、在高版本数据库上运行底版本的catexp.sql;

2、使用低版本的EXP来导出高版本的数据;

3、使用低版本的IMP将数据库导入到底版本数据库中;

4、在高版本数据库上重新运行高版本的catexp.sql脚本。

但在9i中,上面的方法并不能解决问题。如果直接使用底版本EXP/IMP会出现如下错误:

EXP-00008: ORACLE error %lu encountered

ORA-00904: invalid column name

这已经是一个公布的BUG,需要等到Oracle10.0才能解决,BUG号为2261,你可以到METALINK上去查看有关此BUG的详细信息。

BUG归BUG,我们的工作还是要做,在没有Oracle的支持之前,我们就自己解决。在Oracle9i中执行下面的SQL重建exu81rls视图即可。

0 OR REPLACE view exu81rls

(objown,objnam,policy,polown,polsch,polfun,stmts,chkopt,enabled,spolicy)

AS select u.name, o.name, r.pname, r.pfschma, r.ppname, r.pfname,

decode(bitand(r.stmt_type,1), 0,, SELECT,)

|| decode(bitand(r.stmt_type,2), 0,, INSERT,)

|| decode(bitand(r.stmt_type,4), 0,, 0,)

|| decode(bitand(r.stmt_type,8), 0,, 0,),

r.check_opt, r.enable_flag,

DECODE(BITAND(r.stmt_type, 16), 0, 0, 1)

from user$ u, obj$ o, rls$ r

0 u.user# = o.owner#

and r.obj# = o.obj#

and (uid = 0 or

uid = o.owner# or

exists ( select * from session_roles 0 role=SELECT_CATALOG_ROLE)

)

/

grant select on sys.exu81rls to public;

/

 

更多推荐

Oracle导出程序Exp的使用

 
 

 

推荐品牌: