點擊上方“IT那活兒”公眾號,關(guān)注后了解更多內(nèi)容,不管IT什么活兒,干就完了!!!
select a.owner,a.table_name,a.SEGMENT_NAME,a.COLUMN_NAME,sum(b.bytes)/1024/1024/1024 SIZE_GB from dba_lobs a,dba_segments b
where a.segment_name=b.segment_name
and a.owner=b.owner
and a.owner not in (SYS,SYSTEM,MDSYS,XDB,APEX_040200)
group by a.owner,a.table_name,a.SEGMENT_NAME,a.COLUMN_NAME order by 5;
select owner, tablespace_name,segment_type, segment_name,PARTITION_NAME, sum(bytes) / 1024 / 1024 size_m
from dba_segments
where segment_type = LOBSEGMENT and owner not in (SYS,SYSTEM,XDB,APEX_040200,MDSYS) AND tablespace_name not in (SYSAUX,SYSTEM)
group by owner, tablespace_name,segment_type, segment_name,PARTITION_NAME
order by 6 desc ;
cat > exp_gg_big_XXOWNER_XXTAB_XXSEQ.mod_par
USERID=*****/*******
##FLASHBACK_SCN=15696871445525
(如需要導(dǎo)出相應(yīng)時刻的表數(shù)據(jù)請加上)
DIRECTORY=邏輯目錄
CONTENT=DATA_ONLY
DUMPFILE=exp_gg_bcvbig_XXOWNER_XXTAB_XXSEQ.dmp
LOGFILE=exp_gg_bcvbig_XXOWNER_XXTAB_XXSEQ.log
TABLES=AAAAAA.BBBBBB
QUERY=AAAAAA.BBBBBB:"WHERE rowid IN (SELECT sou_rowid FROM system.seq_test_XXTAB where sb_seq=XXSEQ)"
切割表腳本:
cat > create_exp_gg_bcvbig1.sh
. /home/oracle/.profile
#Used by ogg.AUTO EXP WITH SCN
Usage()
{
echo "------------------------------------------------------------"
echo " Usage"
echo " ksh create_exp_gg_bcvbig.sh -o OWNER -t OR_PRTCNTT_202205 &"
echo " Sample:"
echo " ksh create_exp_gg_bcvbig.sh -o DBORDERADM -t OR_PRTCNTT_202205"
echo "------------------------------------------------------------"
}
# Main
if [ $# -ne 4 ]
then
Usage
exit 1
fi
while getopts :o:t: OPTION
do
case $OPTION in
o) V_OWNER=$OPTARG;;
t) V_TABLE_NAME=$OPTARG;;
?) Usage
exit 1;;
esac
done
SQL_FILE=create_seq_test_$V_TABLE_NAME".sql"
cat /dev/null>$SQL_FILE
echo "set time on timing on">>$SQL_FILE
echo "ALTER SESSION FORCE PARALLEL QUERY PARALLEL 8;">>$SQL_FILE
echo "ALTER SESSION FORCE PARALLEL DDL PARALLEL 8;">>$SQL_FILE
echo "ALTER SESSION FORCE PARALLEL DML PARALLEL 8;">>$SQL_FILE
echo "alter session enable parallel ddl;">>$SQL_FILE
echo "alter session enable parallel dml;">>$SQL_FILE
echo "create table system.seq_test_"$V_TABLE_NAME" tablespace 表空間 as select mod(rownum,5#將表切割為多少個#) sb_seq,rowid sou_rowid from "$V_OWNER"."$V_TABLE_NAME" ##as of scn 15696871445525##;">>$SQL_FILE
echo "alter session disable parallel ddl;">>$SQL_FILE
echo "alter table system.seq_test_"$V_TABLE_NAME" noparallel;">>$SQL_FILE
echo "exit">>$SQL_FILE
echo "cat exp_gg_big_XXOWNER_XXTAB_XXSEQ.mod_par|sed s/XXDIR/SOU_EXPA/g|sed s/XXSEQ/00/g|sed s/XXOWNER/"$V_OWNER"/g|sed s/XXTAB/"$V_TABLE_NAME"/g > exp_gg_bcvbig_"$V_TABLE_NAME"_00.par"|sh
echo "cat exp_gg_big_XXOWNER_XXTAB_XXSEQ.mod_par|sed s/XXDIR/SOU_EXPA/g|sed s/XXSEQ/01/g|sed s/XXOWNER/"$V_OWNER"/g|sed s/XXTAB/"$V_TABLE_NAME"/g > exp_gg_bcvbig_"$V_TABLE_NAME"_01.par"|sh
echo "cat exp_gg_big_XXOWNER_XXTAB_XXSEQ.mod_par|sed s/XXDIR/SOU_EXPA/g|sed s/XXSEQ/02/g|sed s/XXOWNER/"$V_OWNER"/g|sed s/XXTAB/"$V_TABLE_NAME"/g > exp_gg_bcvbig_"$V_TABLE_NAME"_02.par"|sh
echo "cat exp_gg_big_XXOWNER_XXTAB_XXSEQ.mod_par|sed s/XXDIR/SOU_EXPA/g|sed s/XXSEQ/03/g|sed s/XXOWNER/"$V_OWNER"/g|sed s/XXTAB/"$V_TABLE_NAME"/g > exp_gg_bcvbig_"$V_TABLE_NAME"_03.par"|sh
echo "cat exp_gg_big_XXOWNER_XXTAB_XXSEQ.mod_par|sed s/XXDIR/SOU_EXPA/g|sed s/XXSEQ/04/g|sed s/XXOWNER/"$V_OWNER"/g|sed s/XXTAB/"$V_TABLE_NAME"/g > exp_gg_bcvbig_"$V_TABLE_NAME"_04.par"|sh
ksh create_exp_gg_bcvbig1.sh -o AAAAAA -t BBBBBB
--o為屬主,t為表名。
exp_gg_big_AAAAAA_BBBBBB_00.par
USERID=*****/*******
##FLASHBACK_SCN=15696871445525
(如需要導(dǎo)出相應(yīng)時刻的表數(shù)據(jù)請加上)
DIRECTORY=邏輯目錄
CONTENT=DATA_ONLY
DUMPFILE=exp_gg_big_AAAAAA_BBBBBB_00.dmp
LOGFILE=exp_gg_big_AAAAAA_BBBBBB_00.log
TABLES=AAAAAA.BBBBBB
QUERY=AAAAAA.BBBBBB:"WHERE rowid IN (SELECT sou_rowid FROM ogg.seq_test_BBBBBB where sb_seq=00)"
在執(zhí)行腳本前要確保中間表已經(jīng)創(chuàng)建成功。
nohup expdp parfile=exp_gg_big_AAAAAA_BBBBBB_00.par &(一共5個)
注意:生成的5個腳本需要依次執(zhí)行不能同時執(zhí)行。
文章版權(quán)歸作者所有,未經(jīng)允許請勿轉(zhuǎn)載,若此文章存在違規(guī)行為,您可以聯(lián)系管理員刪除。
轉(zhuǎn)載請注明本文地址:http://specialneedsforspecialkids.com/yun/129370.html
摘要:數(shù)據(jù)庫多模是指同一個數(shù)據(jù)庫支持多個存儲引擎,可以同時滿足應(yīng)用程序?qū)τ诮Y(jié)構(gòu)化半結(jié)構(gòu)化非結(jié)構(gòu)化數(shù)據(jù)的統(tǒng)一管理需求。多模式數(shù)據(jù)管理能力,使得數(shù)據(jù)庫能夠進行跨部門跨業(yè)務(wù)的數(shù)據(jù)統(tǒng)一存儲與管理,實現(xiàn)多業(yè)務(wù)數(shù)據(jù)融合,支撐多樣化的應(yīng)用服務(wù)。 如今,隨著業(yè)務(wù)互聯(lián)網(wǎng)化和智能化的發(fā)展以及架構(gòu) 微服務(wù)和云化的發(fā)展,應(yīng)用系統(tǒng)對數(shù)據(jù)的存儲管理提出了新的標(biāo)準(zhǔn)和要求,數(shù)據(jù)的多樣性成為了數(shù)據(jù)庫平臺面臨的一大挑戰(zhàn),數(shù)據(jù)庫...
摘要:圖元數(shù)據(jù)與數(shù)據(jù)文件結(jié)構(gòu)映射在建立集合的過程當(dāng)中,大對象存儲必須依附于普通集合存在,一個集合中的大對象僅歸屬于該集合,不能被另外一個集合管理。 前言 企業(yè)內(nèi)容管理(Enterprise Content Management,ECM)系統(tǒng)是一種管理非結(jié)構(gòu)化內(nèi)容的系統(tǒng),傳統(tǒng)代表為EMC Documentum或IBM Filenet等ECM解決方案。隨著大數(shù)據(jù)技術(shù)的越發(fā)普及,越來越多的客戶開始...
閱讀 1346·2023-01-11 13:20
閱讀 1684·2023-01-11 13:20
閱讀 1132·2023-01-11 13:20
閱讀 1860·2023-01-11 13:20
閱讀 4100·2023-01-11 13:20
閱讀 2704·2023-01-11 13:20
閱讀 1385·2023-01-11 13:20
閱讀 3597·2023-01-11 13:20