Use data pump +dblink to migrate databases for low-local space conditions

Source: Internet
Author: User

Col Name forA40select Name,locks,pinsfrom v$db _object_cachewhere Locks> 0 and pins > 0 and type=' PROCEDURE ';10.21.1.20 and 10.24.51. 112 database DBLIBK has been built, the main IMPDP on it, altogether need to export the drop user Ilearn_tra Cascade;drop user ila_sap Cascade;drop use R ilearn_job Cascade;drop user ilearn cascade;drop user Ilearn_beiyan Cascade;drop user apex_public_use R cascade;srvctl Stop Database-d ilndbsrvctl Start Database-d ilndbselect sid,job from dba_jobs_running; Machine PORT TERMINAL Program Select Username,sid,serial#From gv$session where username = ' Ilearn_tra ';Select Username,sid,serial#From v$session where username = ' Ilearn_tra ';USERNAME SID SERIAL#------------------------------ ---------- ----------Ilearn_tra2545 5ALTER SYSTEM KILL SESSION '2545,5'; SELECT sid,serial#From v$session WHERE username= ' Ilearn_tra ';these few users under the data, when the official migration,10.21.1.20 on these user data to be deleted, the whole process is time-consuming 10:15:38This is the log of the last Test SYS@ilndb1 > select name from V$database@Dblink_datapump; NAME---------ilndb dblink Guide Library process:1, create Dblink in the client database and the directory where you want to save the data file: Create public link Dblink_datapump connect to system identified by Clic1234 us ing '10.24.51.12:1521/ilndb '; select name from V$database@dblink_datapump; Create or replace directory Expdp_dir as '/oracle/EXPDP '; Grant read, write on directory expdp_dir to public;2, creating a related tablespace in the client database and user create tablespace ilearn_data datafile '+DATADG ' SIZE 32767M autoextend off; //compared to the production end, the full table space capacity create user Ilearn_tra identified by"Qwer4321" defaulttablespace Ilearn_data; grant Resource,connect to Ilearn_tra;3, import nohup IMPDP system using IMPDP in client database/clic1234 network_link=dblink_datapump logfile=impdp_ilearn1.log directory=expdp_dir Schemas=ILEARN_TRA EXCLUDE= Statistics Cluster=n Job_name=sys_import_ilearn_tra parallel=20 &Select sum (bytes/1024/1024) from Dba_segments where owner=' Ilearn_tra '; IMPDP system/clic1234 network_link=dblink_datapump logfile=impdp_ilearn3.log directory=expdp_dir Schemas=ILEARN EXCLUDE= Statistics Cluster=n Job_name=sys_import_ilearn parallel=20Select sum (bytes/1024/1024) from Dba_segments where owner=' Ilearn '; IMPDP system/clic1234 network_link=dblink_datapump logfile=impdp_ilearn2.log directory=expdp_dir Schemas=ILA_SAP EXCLUDE= Statistics Cluster=n JOB_NAME=SYS_IMPORT_ILA_SAP parallel=14--WANCHENGIMPDP System/clic1234 network_link=dblink_datapump logfile=impdp_ilearn4.log directory=expdp_dir Schemas=ilearn_beiyan EXCLUDE= Statistics Cluster=n Job_name=sys_import_ilearn_beiyan parallel=14--Wancheng IMPDP System/clic1234 network_link=dblink_datapump logfile=impdp_ilearn4.log directory=expdp_dir schemas=ilearn_job EXCLUDE= Statistics Cluster=n Job_name=sys_import_ilearn_job parallel=14--WANCHENGIMPDP System/clic1234 network_link=dblink_datapump logfile=impdp_ilearn5.log Directory=expdp_dir Schemas=APEX_PUBLIC_USER Exclude=statistics cluster=n Job_name=sys_import_ilearn_apex parallel=14Wancheng4, delete dblink:drop public database link Dblink_datapump in the client databases; Good luck and all the best nohup IMPDP system/clic1234 network_link=dblink_datapump logfile=impdp_ilearn_1210.log Directory=expdp_dir schemas=ILEARN_TRA,ILA_ Sap,ilearn_job,ilearn,ilearn_beiyan,apex_public_user exclude=statistics cluster=n job_name=SYS_IMPORT_1210 Parallel=14 &ilearn_tra,ila_sap,ilearn_job,ilearn,ilearn_beiyan,apex_public_usercreate User View_lms_workbooks identified by Clic1234defaulttablespace ilearn_data account unlock; Create_and_view_lms_workbooks

Use data pump +dblink to migrate databases for low-local space conditions

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.