10:编译失效对象
SQL> @ /rdbms/admin/utlrp.sql
此时会有错误,这是因为olap没有安装,下面安装olap,然后重新编译
11:添加OLAP
SQL> @ /olap/admin/olap.sql SYSAUX TEMP;
SQL> @ /rdbms/admin/utlrp.sql --这次会非常快12. 验证无效对象和组件状态
SQL> l 1* select count(*) from dba_objects where status<>'VALID' SQL> col comp_name for a40 SQL> select comp_name,status from dba_registry; COMP_NAME STATUS ---------------------------------------- ---------------------- Oracle Database Catalog Views VALID Oracle Database Packages and Types VALID Oracle Workspace Manager VALID JServer JAVA Virtual Machine VALID Oracle XDK VALID Oracle Database Java Packages VALID Oracle Expression Filter VALID Oracle Data Mining VALID Oracle Text VALID Oracle XML Database VALID Oracle Rules Manager VALID COMP_NAME STATUS ---------------------------------------- ---------------------- Oracle interMedia VALID OLAP Analytic Workspace VALID Oracle OLAP API VALID OLAP Catalog VALID Spatial VALID Oracle Enterprise Manager VALID11:重新编译java对象
begin update obj$ set status=5 where obj#=(select obj# from obj$,javasnm$ where owner#=0 and type#=29 and short(+)=name and nvl(longdbcs,name)='oracle/aurora/rdbms/Compiler'); commit; declare cursor C1 is select 'DROP JAVA DATA "'||u.name||'"."'||o.name||'"' from obj$ o,user$ u where o.type#=56 and u.user#=o.owner#; ddl_statement varchar2(200); iterations number; previous_iterations number; loop_count number; my_err number; begin previous_iterations := 10000000; loop select count(*) into iterations from obj$ where type#=56; exit when iterations=0 or iterations >= previous_iterations; previous_iterations := iterations; loop_count := 0; open C1; loop begin fetch C1 into ddl_statement; exit when C1%NOTFOUND or loop_count > iterations; exception when others then my_err := sqlcode; if my_err = -1555 then exit; else raise; end if; end; initjvmaux.exec(ddl_statement); loop_count := loop_count + 1; end loop; close C1; end loop; end; commit; initjvmaux.drp('delete from java$policy$shared$table'); update obj$ set status=1 where obj#=(select obj# from obj$,javasnm$ where owner#=0 and type#=29 and short(+)=name and nvl(longdbcs,name)='oracle/aurora/rdbms/Compiler'); commit; end; /create or replace java system /It may be necessary to recompilethe Java objects with ncomp:i.e. % ncomp-user scott/tiger Hello.class
迁移过程中,最好不要有ddl操作,以免造成死锁