Posts

Showing posts with the label Oracle Migration

ORACLE objects migration

对象: 表空间,数据库 作用: 将表空间,数据库通过复制的方法尽快传输的另一台机器,可以跨平台移动 同一台机器 system表空间迁移: 1. 关闭数据库 SQL> shutdown immediate 数据库已经关闭。 已经卸载数据库。 ORACLE 例程已经关闭。 2. 复制system表空间对应数据文件去新路径 3. 以mount启动数据库 SQL> startup mount ORACLE 例程已经启动。 Total System Global Area  135338868 bytes Fixed Size                   453492 bytes Variable Size             109051904 bytes Database Buffers           25165824 bytes Redo Buffers                 667648 bytes 数据库装载完毕。 4. 修改system表空间对应数据文件去新路径 SQL> alter database rename file  '/u01/app/oracle/oradata/orcl/system01.dbf' to '/u01/app/oracle/oradata/orcl/system/system01.dbf'; 数据库已更改。 5. 启动数据库 SQL> alter database open; 数据库已更改。 不同机器 非system表空间迁移: 准备工作: 1. 创建用于传输的表空间: create tablespace move datafile '/u01/app/oracle/oradata/orcl/move.dbf' size 10M; 2. 在表空间上创建表,以便检...

ORACLE Migration by using Dataguard

Target: migrate the dataase from server1 to server2 and sync the two database by using archive log. 12.11.0.104 RHEL11G source 12.11.0.105 RHEL11G2 target 12.11.0.104 1. Create table test1 2. Insert two record  1 abc 2 bcd 3. alter system archive log current; 4. shutdown database take snapshot; --> snapshot 5 5. Clone new server 12.11.0.105; 6. create table test2 7. Insert two record  3 abc 4 bcd 8. drop table test1 9 create standby control file; 10. alter system archive log current; 11. shutdown database and listener; --> snapshot 6 12.11.0.105  1. startup system --> snapshot 1 2. Change IP address and hostname --> snapshot 2 3. generate standby control file  scp /u01/standby.ctl oracle@12.11.0.105:/u01/app/oracle/oradata/orcl11g/control01.ctl cp /u01/app/oracle/oradata/orcl11g/control01.ctl /u01/app/oracle/flash_recovery_area/orcl11g/control02.ctl scp /u01/app/oracle/flash_recovery_area/ORCL...