正式迁移须要作的事情: session
--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 配合应用测试 略