千家信息网

OGG中各种数据泵的初始化脚本是什么

发表于:2025-02-01 作者:千家信息网编辑
千家信息网最后更新 2025年02月01日,OGG中各种数据泵的初始化脚本是什么,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。一、先导元数据## 导出元数据 (用户模式)use
千家信息网最后更新 2025年02月01日OGG中各种数据泵的初始化脚本是什么

OGG中各种数据泵的初始化脚本是什么,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。

一、先导元数据

## 导出元数据 (用户模式)
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

##导入元数据 (用户模式)
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
)

########################################################

# 目标库disable相关对象
# 目标数据库重构并open后,需要diable trigger/job/cascade reference;


对应的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

########################################################

二、再导数据

#############################
-- 会列出普通表与分区表

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;

--列出(普通表+分区别总数)、分区总数
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 中包含普通表与分区表

#############################

2.1、用户模式到数据

##导出
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

##导入
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、表模式导数据

##导出
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


##导入
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、 某用户下排除特定表导其他表的数据

## 导出
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')"


## 导入
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

关于OGG中各种数据泵的初始化脚本是什么问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注行业资讯频道了解更多相关知识。

数据 模式 用户 脚本 普通 问题 总数 更多 目标 分区表 帮助 解答 易行 简单易行 先导 内容 对象 小伙 小伙伴 数据库 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 本地怎么连接网络数据库 广州天拓网络技术有限公司资料 天行服务器地址 腾讯服务器的宽带是多少m的 不信任的服务器证书是什么意思 形容软件开发困难过程的词 苹果软件开发公司有哪些 网络技术服务主要干嘛 如何查看服务器raid 网络安全好还是老周好 db2数据库表锁和行锁 服务器费用指的是什么 2019中职网络安全 山西网络安全24小时值班制度 数据库连接池创建连接 无线传感网络技术ppt 搜索幼儿园网络安全手抄报 常州巡检管理软件开发公司 ucsc数据库山羊的参照基因 闵行区技术软件开发费用 北京紫蜂互联网科技 网络安全毕业建议去外企吗 快递打单服务器不可达是什么意思 江阴地区zrpgs服务器维修 湖北软件开发有哪些公司 上海 网络安全宣传周 网络安全与管理石磊版答案 判断是否与阿里云服务器连接 软件开发违约金怎么算 金蝶专业版是什么数据库
0