Oracle Convert a 32-bit Database to 64-bit Database(32位 转到 6

php中文网
发布: 2016-06-07 17:11:56
原创
963人浏览过

Oracle Convert a 32-bit Database to 64-bit Database(32位 转到 64位)说明

Oracle数据分32位和64位,对应不同的平台,关于查看DB 是32还是64位,我之前的Blog 有说明,参考:

查看Oracle 是32位还是64位的方法  

我们这里说的32位和64位就是wordsize。 在某些情况下,比如数据迁移时,需要从32位的Oracle 迁移到64位的oracle上,这时候就需要修改wordsize,使他们保持一致。

这里我们假设迁移平台的ENDIAN 格式相同,不同的操作系统对应的ENDIAN也是不一样的。 这里不做过多的说明,这部分内容属于跨操作系统迁移部分,会单独进行说明。

MOS 上有几篇关于修改wordsize的文章:

Changing between 32-bit and 64-bit WordSizes [ID 62290.1]

How To Change Oracle 11g Wordsize from32-bit to 64-bit. [ID 548978.1]

How to Convert a 32-bit Database to 64-bitDatabase on Linux? [ID 341880.1]

这里我们看一下[341880.1]。

Use thefollowing procedure to change wordsize of an Oracle9i Release 2 (9.2) orOracle10g (10.1 & 10.2) or 11g single instance database from Linux x86 toLinux x86-64 in same release: 

--以下的操作过程支持linux下的Oracle 9iR2,10g和11g  单实例32到64的转换操作。注意这里数据库的版本要一致,仅wordsize 不一样。

1.     Perform cold backups of theexisting Oracle9i or Oracle10g (10.1.x & 10.2.x) or 11g database on theLinux x86 system to protect against any failures during the wordsize change. 

--冷备份整个DB,以防修改wordsize失败。

2.     NOTE:This steps is required ifthe target system has different directory structure for database files.Otherwise this step can be skipped. 

--这一步操作仅当Target system 的目录结构和Source 不一样,如果一样,这一步可以跳过。

To help withcreating the control file after the wordsize change, enter the following SQLcommand: 

SQL> ALTERDATABASE BACKUP CONTROLFILE TO TRACE; 

--将控制文件dump 到trace file,已方便我们后面的修改。

Oracle 控制文件

This command saves the control file information to a trace file in the UDUMP directory (Typeshow parameter USER_DUMP_DEST in SQLPLUS as sys/system user). The control fileinformation is similar to the following: 

CREATECONTROLFILE REUSE DATABASE "SAMPLE" NORESETLOGS 
NOARCHIVELOG 
MAXLOGFILES 32 
MAXLOGMEMBERS 2 
MAXDATAFILES 32 
MAXINSTANCES 1 
MAXLOGHISTORY 112 
LOGFILE 
GROUP1 '/ia32lnx_path/oracle/dbs/t_log1.f' SIZE 25M, 
GROUP2 '/ia32lnx_path/oracle/dbs/t_log2.f' SIZE 25M 
DATAFILE '/ia32lnx_path/oracle/dbs/t_DB1.F' 
CHARACTER SET WE8DEC; 

3.     In a new Oracle home, installthe 64-Bit release of Oracle9i Release 2 (9.2.x) , Oracle10.1.x, Oracle 10.2.x,Oracle 11.1.x, 11.2.x  software for Linux x86-64. It is recommended to usethe same version on as on the 32-Bit box. 

--在新的系统上安装64位的Oracle 软件,建议使用的版本和之前的32位oracle 保持一致。

4.     Perform a clean databaseshutdown for Oracle-32 Bit database 

--clean shutdown 32位的Oracle。

当clean shutdown 时,checkpoint会进行,并且此时datafile的stop scn和控制文件里的start scn会相同。 等到open数据库时,Oracle检查datafile header中的start scn和存于control file中的datafile的scn是否相同, 如果相同,接着检查start scn和stop scn是否相同,如果仍然相同,数据库就会正常开启,否则就需要recovery。

等到数据库开启后,储存在control file中的stop scn就会恢复为NULL值,此时表示datafile是open在正常模式下了。

更多信息参考:

Oracle 实例恢复时 前滚(roll forward) 后滚(rollback) 问题

5.     Copy the database files fromLinux-x86 to the Linux x86-64 system. 

--复制所有的datafiles 从32位系统到64位系统上。

6.     Copy your existing Oracleinitialization parameter file (initsid.ora) to the new Oracle home. 

--复制初始化参数(pfile)到64位系统上对应的目录,默认是$ORACLE_HOME/dbs

7.     Edit the parameter file topoint to the controlfiles if the location has change from the source machine. 

--编辑pfile 文件,修改控制文件的保存位置。

8.     Change any Oracle home pathreferences to use the new Oracle home path on the Linux x86-64 system. Likeuser_dump_dest , background_dump_dest , core_dump_dest etc 

--修改pfile里的其他参数,,比如user_dump_dest,background_dump_dest,core_dump_dest 等。

linux

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号