1.建立数据库
[db两inst1@localhost ~]$ db两set db二codepage=1两08 #铺排编码
[db二inst1@localhost ~]$ db二 create database wms automatic storage yes using codeset UTF-8territory cn pagesize 3两768 #创立wms数据库
//指定db二数据库安拆目次
db两 create db xxdb on /app/dbdata using CODEPAGE "GBK" country "Zh_CN"
二.导没表的ixf文件(如:exportReportData.sh)
toDir=/home/cpsinst/bup/
tab="UNTECK_ATTACHMENT_HIS UNTECK_BUSI_LOG UNTECK_DICT_ENTRY UNTECK_DICT_TYPE UNTECK_LOGIN_LOG UNTECK_MENU UNTECK_OPERATION UNTECK_ORGANIZATION UNTECK_PRIMARYKEY UNTECK_RESOURCE UNTECK_ROLE UNTECK_ROLE_RESOURCE UNTECK_USER UNTECK_USER_ROLE"
db两 connect to cpsdb
db两 set schema='ODSUSER'
for tabTemp in $tab
do
echo $tabTemp
db二 "export to ${toDir}/${tabTemp}.IXF of IXF select * from ${tabTemp}"
done
3. 导进表的ixf文件
db两 connect to myetldb;
db两 set schema=odsuser;
db两 IMPORT FROM ETL_BUSI_TYPE.IXF OF IXF MODIFIED BY FORCECREATE COMMITCOUNT 10000 replace_create INTO ETL_BUSI_TYPE
db两 IMPORT FROM ETL_BUSI_TYPE_TOSEND.IXF OF IXF MODIFIED BY FORCECREATE COMMITCOUNT 10000 replace_create INTO ETL_BUSI_TYPE_TOSEND
db二 IMPORT FROM ETL_CONTACT_PEPOLE.IXF OF IXF MODIFIED BY FORCECREATE COMMITCOUNT 10000 replace_create INTO ETL_CONTACT_PEPOLE
发表评论 取消回复