一、 用Quest Central for db2导入文件时,当文件较大时(超过1g),机器看起来像死机一样! 二、 当导入的表有 Id BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, INCREMENT BY 1, CACHE 20, MINVALUE 1, MAXVALUE 9223372036854775807, NO CYCLE, NO ORDER) 这种字段时,是不能用全表导入导出这种方式的,必须将字段id去掉,才能导入。 出现以下情况后 SQL0289N 不能在表空间 "USERSPACE1" 中分配新页。 SQLSTATE=57011 再次导入会报错如下 SQL0668N 由于表 "BASEINFO.R010213_V_POUT_QUERY_ZW_A" 上的原因码为 "3",所以不允许操作。 SQLSTATE=57016 解决方法: 通过分别发出带有 RESTART 或 TERMINATER 选项的 LOAD来重新启动或终止先前失败的对此表的 LOAD 操作。 三、 建议数据库备份在要求时间的情况下,尽可能的用backup db进行全库备份与恢复。在用逻辑备份的情况下用db2move db load比db2move db import要快。 四、 对于大表,可用两数据库直连方式,进行导入恢复。 db2 connect to db100 user baseinfo using baseinfo 数据库连接信息 数据库服务器 = DB2/NT 9.1.0 SQL 授权标识 = BASEINFO 本地数据库别名 = DB100 db2 "declare c1 cursor database std198 user baseinfo using baseinfo for SELECT REQNO, BDG_YEAR, ORI_DP_ID, ORI_BAL_DP_ID, ORI_UNIT_ID, ORI_OUT_TYPE_CODE, ORI_QUATOTYPE, ORI_BDGT_ID_TYPE, ORI_BDGT_ID, BDGT_NAME, PRJ_CODE, PLANMONTH, YSZH, STATUS_Z, STATUS_F, FILL_FORM, REQDATE, RECHECKER, RECHECKER1TIME, RECHECKER2, RECHECKER2TIME, ZFZH, MAKER_BY, CREATEVCHTIME, RECHECKER_VCH, VCHOKTIME, VCHPRINTTIME, VCHER, VCHOVERTIME, IF_COLL_PAY, ACCOUNTBANK, COLL_PAY_ACCOUNTBANK, PAY_ACCOUNTBANK, ACCOUNTBANK2, COLL_PAY_ACCOUNTBANK2, USE_DESC, PAY_ACCOUNTBANK2, ACCESS_SLT, ACCESS_NO, IF_SALARY, NOTES, SOURCE, ITEM_CODE, NOR_OUTLAY, VCH_STATUS, OUT_VCH_NO, ZW_FCOID_ZF, ZW_PERIOD_ZF, ZW_FCOID_GK, ZW_PERIOD_GK, FLAG_SEC, VCH_BDGT_ID_TYPE, VCH_BDGT_ID, CO_BDGT_ID, ZX_BDGT_ID, ORI_USE_UNIT_ID, ACCOUNT, FSERIALNUM_GK, PAY_AMT, COLL_ACCOUNTNAME, COLL_BANKNAME, COLL_ACCOUNT, ACCOUNTNAME, BANKNAME, ACCOUNT_DB2, UNIT_ID, USE_UNIT_ID, DP_ID, BAL_DP_ID, OUT_TYPE_CODE, BDGT_ID, WB_BDGT_ID, QUATOTYPE, WB_QUATOTYPE, BDGT_ID_TYPE, WB_BDGT_ID_TYPE, BDGT_TYPE_NAME, CO_BDGT_NAME, PRJ_DES, QUATONAME, OUT_TYPE_NAME, UNIT_NAME, WB_BAL_DP_ID, WB_DP_ID, WB_OUT_TYPE_CODE, WB_UNIT_ID FROM BASEINFO.R010213_V_POUT_QUERY_FJZ_A" DB20000I SQL 命令成功完成。 db2 "load from c1 of cursor messages d:R010213_V_POUT_QUERY_FJZ_A.msg insert into BASEINFO.R010213_V_POUT_QUERY_FJZ_A( REQNO, BDG_YEAR, ORI_DP_ID, ORI_BAL_DP_ID, ORI_UNIT_ID, ORI_OUT_TYPE_CODE, ORI_QUATOTYPE, ORI_BDGT_ID_TYPE, ORI_BDGT_ID, BDGT_NAME, PRJ_CODE, PLANMONTH, YSZH, STATUS_Z, STATUS_F, FILL_FORM, REQDATE, RECHECKER, RECHECKER1TIME, RECHECKER2, RECHECKER2TIME, ZFZH, MAKER_BY, CREATEVCHTIME, RECHECKER_VCH, VCHOKTIME, VCHPRINTTIME, VCHER, VCHOVERTIME, IF_COLL_PAY, ACCOUNTBANK, COLL_PAY_ACCOUNTBANK, PAY_ACCOUNTBANK, ACCOUNTBANK2, COLL_PAY_ACCOUNTBANK2, USE_DESC, PAY_ACCOUNTBANK2, ACCESS_SLT, ACCESS_NO, IF_SALARY, NOTES, SOURCE, ITEM_CODE, NOR_OUTLAY, VCH_STATUS, OUT_VCH_NO, ZW_FCOID_ZF, ZW_PERIOD_ZF, ZW_FCOID_GK, ZW_PERIOD_GK, FLAG_SEC, VCH_BDGT_ID_TYPE, VCH_BDGT_ID, CO_BDGT_ID, ZX_BDGT_ID, ORI_USE_UNIT_ID, ACCOUNT, FSERIALNUM_GK, PAY_AMT, COLL_ACCOUNTNAME, COLL_BANKNAME, COLL_ACCOUNT, ACCOUNTNAME, BANKNAME, ACCOUNT_DB2, UNIT_ID, USE_UNIT_ID, DP_ID, BAL_DP_ID, OUT_TYPE_CODE, BDGT_ID, WB_BDGT_ID, QUATOTYPE, WB_QUATOTYPE, BDGT_ID_TYPE, WB_BDGT_ID_TYPE, BDGT_TYPE_NAME, CO_BDGT_NAME, PRJ_DES, QUATONAME, OUT_TYPE_NAME, UNIT_NAME, WB_BAL_DP_ID,WB_DP_ID, WB_OUT_TYPE_CODE, WB_UNIT_ID )" 读取行数 = 7044 跳过行数 = 0 装入行数 = 7044 拒绝行数 = 0 删除行数 = 0 落实行数 = 7044[@more@]
--转自
该贴由koei123转至本版2015-2-6 4:47:18