oracle expdp / impdp formal migration process

Formal migration needs to be done:

  • 1 Lock migrated business users
  • Business Session 2 killed
  • 3 are respectively closed at both ends job
  • 4 and transmits the derived source
  • 5 and introduced into the target side is ready
  • 6 Create a public objects
  • 7 unlocking business users
  • 8 target end open job
  • 9 with application testing
--1 锁定迁移的业务用户
alter user JINGYU account lock;
alter user LUDAN account lock;

--2 杀掉业务会话
select * from v$session where username in ('JINGYU','LUDAN');
select 'alter system kill session ''' || sid || ',' || SERIAL# || ''';' from v$session where username in ('JINGYU','LUDAN');
ps -ef|grep LOCAL=NO|grep -v grep|xargs kill -9

--3 关闭job分别在两端
show parameter job_queue_process
SYS >alter system set job_queue_processes=0;

--4 源端导出并传送
nohup expdp system/oracle schemas=JINGYU,LUDAN directory=xdump dumpfile=db1_zs_SCHEMA_%U.dmp logfile=expdp_db1_zs_SCHEMA.log PARALLEL=4 cluster=n &

- 5 创建public对象
根据查询的public对象,直接创建即可。

- 6 解锁业务用户
在迁移升级失败,遭遇不可抗力,最终导致环境确实需要回退时才可以。
alter user JINGYU account unlock;
alter user LUDAN account unlock;

- 7 目标端开启job
SYS >alter system set job_queue_processes=1000;

- 8 配合应用测试
略

Guess you like

Origin www.cnblogs.com/zywu-king/p/11582370.html
Recommended