Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

[XTTS] Oracle transport tablespace xtts increment mode

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

-- transmit tablespaces online, incrementally-- create related directories create directory sourcedir as'+ DATA/mydb/datafile';create directory destdir as'/ oracle/app/oracle/oradata/mytest';-- create dblinkcreate public database link ttslink connect to system identified by oracle using 'mydb';select * from dual@ttslink Export TMPDIR=/home/oracle/xttmkdir-p / stage_sourcechown oracle:oinstall / stage_sourcescp-r/home/oracle/xtt mystandby:/home/oracle-- related tablespaces TEST,MYDB,TMOVE,TBSADD TSB01tablespaces=-tablespace to be migrated platformid=-source OS platform IDdfcopydir=-source database backup file storage directory backupformat=-source database backup file storage directory stageondest=-target database backup file storage directory storageondest=-target database official file storage directory backupondest= -parallel=-backup of additional files stored in the target database Transformed parallelism rollparallel=-additional parallelism getfileparallel=-use dbms_file_transfer parallelism-source end block tracking alter database enable block change tracking using file'+ data' -- run on the source side and export the data export TMPDIR=/home/oracle/xtt$ORACLE_HOME/perl/bin/perl xttdriver.pl-p--nfs/stage_source 192.168.8.0 exportfs 24 (rw,no_root_squash,no_all_squash,sync) exportfs-rservice rpcbind startservice nfs startmount-t nfs-o rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600 192.168.8.24:/stage_source / stage_dest-- attached to the nfs No need to copy-- scp oracle@source:/stage_source/* / stage_destcd / home/oracle/xtt/scp rmanconvert.cmd mystandby:/home/oracle/xtt--chown-R oracle:oinstall / stage_dest/*export TMPDIR=/home/oracle/xtt$ORACLE_HOME/perl/bin/perl xttdriver.pl-CML-create incremental backup export TMPDIR=/home/oracle/xtt$ORACLE_HOME/perl/bin/perl xttdriver.pl-i--nfs without copy-- scp `backup. Txt` oracle@dest:/stage_destcd / home/oracle/xtt/scp xttplan.txt mystandby:/home/oracle/xttscp tsbkupmap.txt mystandby:/home/oracle/xtt-- destination export ORACLE_SID=mytestexport TMPDIR=/home/oracle/xtt$ORACLE_HOME/perl/bin/perl xttdriver.pl-rmure-source update scn$ORACLE_HOME/perl/bin/perl xttdriver.pl-smurf-target side to create relevant users Note that the password is about to expire (open) select 'create user' | | d.username | | 'identified by values''| | u.password | | 'default tablespace USERS temporary tablespace' | | d.TEMPORARY_TABLESPACE | |' 'from dba_users dmaine user$ u where d.username=u.name and account_status='OPEN' and username not in (' SYS','SYSTEM'); select 'grant' | | granted_role | |'to'| | grantee |'; 'from dba_role_privs where grantee in (select username from dba_users where account_status='OPEN' and username not in (' SYS','SYSTEM')) unionselect 'grant' | | PRIVILEGE | |'to'| | grantee | |' 'from DBA_SYS_PRIVS where grantee in (select username from dba_users where account_status='OPEN' and username not in (' SYS','SYSTEM'));-- set tablespace read-only TEST,MYDB,TMOVE,TBSADD,TSB01 alter tablespace TEST read only; alter tablespace MYDB read only; alter tablespace TMOVE read only; alter tablespace TBSADD read only; alter tablespace TSB01 read only on the source side -- Last increment-- create an incremental backup at the source side. Note that the nfs directory permission chown-R oracle:oinstall / stage_sourceexport TMPDIR=/home/oracle/xtt$ORACLE_HOME/perl/bin/perl xttdriver.pl-i--nfs does not need to be copied. Incrbackups.txt backup information-- scp `cat incrbackups.txt` oracle@dest:/stage_destcd / home/oracle/xtt/scp xttplan.txt tsbkupmap.txt mystandby:/home/oracle/xtt-- destination su-rootchown-R oracle:oinstall / stage_dest/su-oracleexport ORACLE_SID=mytestexport TMPDIR=/home/oracle/xtt$ORACLE_HOME/perl/bin/perl xttdriver.pl-Rafe-generate import script $ORACLE_HOME/perl/bin/perl xttdriver.pl-Emure-Edit import script For example, impdp directory=DATA_PUMP_DIR logfile=tts_imp.log\ network_link=ttslink transport_full_check=no\ transport_tablespaces=ABC\ transport_datafiles='/oracle/app/oracle/oradata/mytest/ABC_12.dbf'-- sets tablespace read and write alter tablespace TEST read write Alter tablespace MYDB read write; alter tablespace TMOVE read write; alter tablespace TBSADD read write; alter tablespace TSB01 read write;-modify the default tablespace of the target user (the statement is queried on the source side) select 'alter user' | | d.username | | 'default tablespace' | | d.default_tablespace | | 'temporary tablespace' | | d.TEMPORARY_TABLESPACE | |; 'from dba_users d where d.username=u.name and account_status='OPEN' and username not in user $u where d.username=u.name and account_status='OPEN' and username not in (' SYS','SYSTEM');-- cancel the block tracking alter database disable block change tracking -- Delete dblinkdrop database link ttslink;-- reference http://www.xifenfei.com/2017/11/xtts.htmlhttps://blog.csdn.net/heguanghuicn/article/details/7946019811G-Reduce Transportable Tablespace Downtime using Cross Platform Incremental Backup (Doc ID 1389592.1) https://yq.aliyun.com/articles/129601

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report