标签:例子 port mit 架构 loop redhat force png dba
本文目的:
oracle是大型数据库旺旺年限和版本及环境都比较陈旧,性能影响了业务正常,近日公司需求从Windows2003 32bit的Oracle服务器上将数据迁移到Windows2012/Linux Redhat 64bit Oracle,就涉及一个转码
Oracle 架构:
Oracle Server = 实例 + 数据库 (Instance和Database是相互独立的)
运行原理:
举个例子来看看Oracle RDBMS是怎么运作的
具体也不赘述了;详细可参考http://blog.csdn.net/Jmilk/article/details/51583799
首先配置好迁移目标Linux服务器参数
确认:
selinux、iptables、sysctl、limits.conf 等
SPOOL c:test.sql //c:test.sql 这是文件保存的位置,从SPOOL开始所有的操作记录到SPOOL OFF结束 select * from tablename; SPOOL OFF
1.建立测试表(Windows)
create table pp(num int); begin for j in 1 .. 100 loop insert into pp values ( j ); end loop; commit; end; /
2.创建rman用户(Windows)
sql sysdba create tablespace rman datafile ‘e:\app\rman.dat‘ size 100m autoextend on next 10m; create user rman identified by rman default tablespace rman; grant recovery_catalog_owner to rman; grant connect,resource to rman;
rman connect catalog rman/rman create catalog; rman catalog rman/rman@orcl target sys/密码@网络连接服务名; register database;
3.进入只读
run { select PLATFORM_NAME from v$database; select PLATFORM_NAME,ENDIAN_FORMAT from v$transportable_platform order by 1,2; shutdown immediate startup mount alter database open read only; set serveroutput on declare v_check boolean; begin v_check:=dbms_tdb.check_db(‘Linux x86 64-bit‘,dbms_tdb.skip_none); end; / declare v_ext boolean; begin v_ext:=dbms_tdb.check_external; end; / }
4.进入RMAN备份转码(Windows)
rman target / convert database new database ‘orcl‘ transport script ‘e:\bak\trans.sql‘ to platform ‘Linux x86 64-bit‘ db_file_name_convert ‘e:\app\Administrator\oradata\orcl‘ ‘e:\bak‘;
5.将备份导出到
e:\bak 下的所有数据以及INIT_00SDUAAM_1_0.ORA文件上传至Linux服务器中分别的位置/home/oracle/app/oradata/orcl和INIT_00SDUAAM_1_0.ORA对应的目录下
修改INIT_00SDUAAM_1_0.ORA文件中的路径和内存大小
6.导入数据(Linux)
sqlplus / as sysdba STARTUP NOMOUNT PFILE=‘INIT_00SDUAAM_1_0.ORA‘ create spfile from pfile=‘INIT_00SDUAAM_1_0.ORA‘; startup force nomount CREATE CONTROLFILE REUSE SET DATABASE "ORCL" RESETLOGS NOARCHIVELOG MAXLOGFILES 16 MAXLOGMEMBERS 3 MAXDATAFILES 100 MAXINSTANCES 8 MAXLOGHISTORY 292 LOGFILE GROUP 1 ‘/home/oracle/app/oradata/orcl/redolog01.log‘ SIZE 50M, GROUP 2 ‘/home/oracle/app/oradata/orcl/redolog02.log‘ SIZE 50M, GROUP 3 ‘/home/oracle/app/oradata/orcl/redolog03.log‘ SIZE 50M DATAFILE ‘/home/oracle/app/oradata/orcl/SYSTEM01.DBF‘, ‘/home/oracle/app/oradata/orcl/UNDOTBS01.DBF‘, ‘/home/oracle/app/oradata/orcl/SYSAUX01.DBF‘, ‘/home/oracle/app/oradata/orcl/USERS01.DBF‘, ‘/home/oracle/app/oradata/orcl/EXAMPLE01.DBF‘ CHARACTER SET ZHS16GBK; ALTER DATABASE OPEN RESETLOGS; ALTER TABLESPACE TEMP ADD TEMPFILE ‘/home/oracle/app/oradata/orcl/temp01.dbf‘ SIZE 20971520 AUTOEXTEND ON; SHUTDOWN IMMEDIATE STARTUP UPGRADE @?/rdbms/admin/utlirp.sql
7.验证(Linux)
sqlplus / as sysdba startup conn mologa/mologa select * from tab; select * from pp;
window2012 oracle 迁移 centos6 oracle
标签:例子 port mit 架构 loop redhat force png dba
原文地址:http://www.cnblogs.com/mologa-jie/p/7503081.html