十年網(wǎng)站開(kāi)發(fā)經(jīng)驗(yàn) + 多家企業(yè)客戶 + 靠譜的建站團(tuán)隊(duì)
量身定制 + 運(yùn)營(yíng)維護(hù)+專業(yè)推廣+無(wú)憂售后,網(wǎng)站問(wèn)題一站解決
OGG中各種數(shù)據(jù)泵的初始化腳本是什么,針對(duì)這個(gè)問(wèn)題,這篇文章詳細(xì)介紹了相對(duì)應(yīng)的分析和解答,希望可以幫助更多想解決這個(gè)問(wèn)題的小伙伴找到更簡(jiǎn)單易行的方法。
創(chuàng)新互聯(lián)公司-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價(jià)比市北網(wǎng)站開(kāi)發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫(kù),直接使用。一站式市北網(wǎng)站制作公司更省心,省錢,快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋市北地區(qū)。費(fèi)用合理售后完善,十年實(shí)體公司更值得信賴。
一、先導(dǎo)元數(shù)據(jù)
## 導(dǎo)出元數(shù)據(jù) (用戶模式)
userid=system/system_cmcc_shsnc2018
directory=BAK_DIR
dumpfile=expdp_boss2_1_10_metadata_%U.dmp
exclude=statistics
logfile = expdp_boss2_1_10_metadata.log
parallel=4
schemas=(ucr_act21,
uop_act21,
ucr_act22,
uop_act22,
ucr_act41,
uop_act41,
ucr_act42,
uop_act42,
ucr_catalog,
uop_catalog)
content=metadata_only
##導(dǎo)入元數(shù)據(jù) (用戶模式)
userid ='system/system_cmcc_shsnc2018'
directory=BAK_DIR
dumpfile=expdp_boss2_2_metadata_%U.dmp
logfile = impdp_boss2_2_pk_index.log
parallel=4
schemas=('UIA_ACT21_STA',
'UIA_ACT22_STA',
'UIA_ACT41_STA',
'UIA_ACT42_STA',
'UIF_ACT21_BI',
'UIF_ACT21_STA',
'UIF_ACT22_BI',
'UIF_ACT22_STA',
'UIF_ACT41_BI',
'UIF_ACT41_STA',
'UIF_ACT42_BI',
'UIF_ACT42_STA',
'UIF_PARAM2',
'UIF_PARAM4')
content=metadata_only
INCLUDE=index,CONSTRAINT
remap_tablespace=(
TBS_ACT_DEF:TBS_ACT_HDACT08
USERS:TBS_ACT_HDACT08
TS_VB_ACCT_01:TBS_ACT_HDACT08
TS_VB_INTF_DAT:TBS_ACT_HDACT08
TS_VB_BASE_DAT:TBS_ACT_HDACT08
TS_VB_INFO:TBS_ACT_HIACT07
TS_VB_INTF_IND:TBS_ACT_HIACT07
)
########################################################
# 目標(biāo)庫(kù)disable相關(guān)對(duì)象
# 目標(biāo)數(shù)據(jù)庫(kù)重構(gòu)并open后,需要diable trigger/job/cascade reference;
對(duì)應(yīng)的disable腳本如下:
set echo off
set verify off
set feedback off
set pagesize 10000
set heading off
set linesize 200
set trim on
spool disable_ref.txt
select 'alter table '||owner||'.'||table_name||' disable constraint '||constraint_name||';'
from dba_constraints
where constraint_type in ('R') and owner = 'XPADRPT' and delete_rule='CASCADE' and status ='ENABLED';
spool off
spool disable_trigger.txt
select 'alter trigger '||owner||'.'||trigger_name||' disable;'
from dba_triggers where owner = 'XPADRPT' and STATUS='ENABLED';
spool off
spool disable_job.txt
select 'execute DBMS_IJOB.BROKEN('||job||',TRUE); commit;'
from dba_jobs
where schema_user = 'XPADRPT' and BROKEN='N';
spool off
########################################################
二、再導(dǎo)數(shù)據(jù)
#############################
-- 會(huì)列出普通表與分區(qū)表
select owner,segment_name,sum(bytes)/1024/1024/1024 from dba_segments where owner='UCR_ACT41' and segment_type in ('TABLE','TABLE PARTITION') group by owner,segment_name order by sum(bytes)/1024/1024/1024 desc;
--列出(普通表+分區(qū)別總數(shù))、分區(qū)總數(shù)
select owner,object_type,count(1) as"NUM" from dba_objects
where owner in ('TEST') and object_type in ('TABLE','TABLE PARTITION')
group by owner,object_type ;
-- dba_tables 中包含普通表與分區(qū)表
#############################
2.1、用戶模式到數(shù)據(jù)
##導(dǎo)出
userid=system/system_cmcc_shsnc2018
directory=BAK_DIR
dumpfile=expdp_UMT_ACT2_data_20180714_%U.dmp
exclude=statistics
logfile = expdp_UMT_ACT2_data_20180714.log
parallel=4
schemas=UMT_ACT2
content=data_only
compression=DATA_ONLY
##導(dǎo)入
userid=system/system_cmcc_shsnc2018
directory=BAK_DIR
dumpfile=expdp_UMT_ACT2_data_20180714_%U.dmp
exclude=statistics
logfile =impdp_UMT_ACT2_data_20180714.log
parallel=4
schemas=UMT_ACT2
2.2、表模式導(dǎo)數(shù)據(jù)
##導(dǎo)出
userid=system/system_cmcc_shsnc2018
directory=BAK_DIR
dumpfile=expdp_UCR_ACT42_1_2_20180715_%U.dmp
exclude=statistics
logfile = expdp_UCR_ACT42_1_2_20180715.log
parallel=4
tables=UCR_ACT42.TF_B_WRITEOFFLOG_D,UCR_ACT42.TI_OH_SMS_2015
content=data_only
compression=DATA_ONLY
##導(dǎo)入
userid=system/system_cmcc_shsnc2018
directory=BAK_DIR
dumpfile=expdp_UCR_ACT42_3_7_20180716_%U.dmp
logfile =impdp_UCR_ACT42_3_7_20180716.log
parallel=25
tables=UCR_ACT42.TF_B_SCORE_TRADELOG,
UCR_ACT42.TS_B_BILL_BEFORE,
UCR_ACT42.TF_BH_INTEGRALBILL_OLD,
UCR_ACT42.TP_INFOCHECK_RESULT_NEW,
UCR_ACT42.TF_B_PAYLOG
2.3、 某用戶下排除特定表導(dǎo)其他表的數(shù)據(jù)
## 導(dǎo)出
userid=system/system_cmcc_shsnc2018
directory=BAK_DIR
dumpfile=expdp_UCR_ACT21_181_20180718_%U.dmp
logfile = expdp_UCR_ACT21_181_20180718.log
parallel=5
SCHEMAS=ucr_act21
content=data_only
compression=DATA_ONLY
exclude=statistics,TABLE:"IN ('XX','XX')"
## 導(dǎo)入
userid=system/system_cmcc_shsnc2018
directory=BAK_DIR
dumpfile=expdp_UCR_ACT21_181_20180718_%U.dmp
logfile = impdp_UCR_ACT21_181_20180718.log
parallel=25
SCHEMAS=ucr_act21
關(guān)于OGG中各種數(shù)據(jù)泵的初始化腳本是什么問(wèn)題的解答就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,如果你還有很多疑惑沒(méi)有解開(kāi),可以關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道了解更多相關(guān)知識(shí)。