重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1082|回复: 0
打印 上一主题 下一主题

[升级] windows 下oracle 11g 11.1.0.6 32位 迁移到 64位操作步骤

[复制链接]
跳转到指定楼层
楼主
发表于 2024-1-25 11:46:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
1.安装64位

2.执行upgrade
  sql >startup upgrade;

3.执行位数转换
  @utlirp.sql

4.处理jvm 中sro不兼容问题,这个必须处理,否则,后面的编译utlrp通不过.
  Handling for JVM during Migration
When migrating a database from 32 to 64bit (or vice versa) additional actions
are required for java.  In theory the format of java shared data objects (SRO)
is not compatible between 32 and 64 bit and so these objects need to be dropped
and regenerated.  In practice it may be the case prior to release 11 such
objects could interoperate but if so this would only be by chance and should
not be relied on.

The steps to do the regeneration are as follows.  These should be done
immediately after running utlirp.  They may take several minutes to complete.
They must be done connected as SYS.

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
      -- To make sure we eventually stop, pick a max number of iterations
      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 -- snapshot too old, re-execute fetch query
             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;
/

从哪
/

5.执行utlrp编译
  sql >shutdown immediate;
  sql >startup;

  sql >@utlrp.sql

6.处理olap无效对象的问题
  编译后,如果发现大量的olap对象无效,需要按下面方法处理:

  SQL> @?/olap/admin/catnoamd.sql
  SQL> @?/olap/admin/catnoaps.sql
  SQL> @?/olap/admin/catnoxoq.sql
  SQL> @?/olap/admin/olapidrp.plb
  SQL>@?/olap/admin/olap.sql SYSAUX TEMP;

  之后,再去执行utlrp.sql,发现已经没有无效对象了.

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-12-27 21:29 , Processed in 0.083789 second(s), 21 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表