XX银行 informix恢复案例

XX银行 informix恢复案例

informix恢复:
1、导出数据库
    将10.1.61.202 cbsk上的库导出
          命令:onmode -ky  使数据库关闭
          命令:oninit 启动数据库
         执行:dbexport cbsk (在当前目录下看到dbexport.out和cbsk.exp表示成功)
2、将cbsk.exp目录打包ftp到202cbs用户下
3、在cbs用户下执行如下操作:
    mv cbsk.exp cbs.exp  (cbs.exp是cbs用户使用的数据库名)
    mv cbsk.sql  cbs.sql (cbsk.sql在cbsk.exp目录下)
    将cbs.sql里面的cbsk替换成cbs
4、用informix用户登录,执行dbaccess 删除/重命名以前的库
5、将202 cbs用户下修改好的cbs.exp ftp到informix用户下的backup目录下(其他目录也可)
6、在informix用户下,存放cbs.exp的当前路径下执行:
      dbimport cbs   (在cbs.exp的上一层目录下执行)
7、导库成功
8、到202 cbs用户下修改.profile里的dbname为cbs



方法一:
在导出的dbexport备份中修改zfht.sql文件 添加unload行
grant dba to "zfht";
grant dba to "informix";
{ TABLE "zfht".bepsgberecvlist row size = 1483 number of columns = 85 index size = 75 }
{unload file name=bepsgberecvlist.unl number of rows= 629702}
create table "zfht".bepsgberecvlist
  (
    tx_br_no char(5),
    tx_date decimal(8,0),
    txssno decimal(8,0) not null ,
    oldtxssno decimal(8,0),
    oprtypeno decimal(5,0) not null ,
    oldoprtypeno decimal(5,0),
    cmtno char(6),
    oldcmtno char(6),
    pkgno decimal(8,0),
    oldpkgno decimal(8,0),
    hzpkgno decimal(8,0),
    backlimit decimal(2,0),
    consigndate decimal(8,0) not null ,
    oldconsigndate decimal(8,0),
    pkgconsigndate decimal(8,0) not null ,
    oldpkgconsigndate decimal(8,0),
    moneysymb char(3) not null ,
    amount decimal(15,2) not null ,
    oldamount decimal(15,2),
    odficenter char(4) not null ,
    isdficode char(12) not null ,
    oldisdficode char(12) not null ,
    odficode char(12) not null ,
    oldodficode char(12),
    cnapsodfi char(12) not null ,
    payeropenaccbkcode char(12),
    payeracc char(32),
    payername char(60),
    payeraddr char(60),
    oldpayeropenaccbk char(12),
    oldpayeracc char(32),
    oldpayername char(60),
    oldpayeraddr char(60),
    rdficenter char(4) not null ,
    osdficode char(12) not null ,
    rdficode char(12) not null ,
    oldrdficode char(12),
    recpientopnaccbkcd char(12),
    recipientacc char(32),
    recipientname char(60),
    recipientaddr char(60),
    oldrecipientname char(60),
    oldrecipientaddr char(60),
    oldrecipientacc char(32),
    oldrecpientopnacc char(12),
    hangacno char(24),
    bhamt decimal(15,2),
    thamt decimal(15,2),
    oprttype char(12),
    oprbckstat char(2),
    wdclbz char(1),
    appenddtno decimal(8,0),
    timcrsubno decimal(8,0),
    timdrsubno decimal(8,0),
    warrantdate decimal(8,0),
    warrantno char(20),
    compensationamnt decimal(18,4),
    repudiationamnt decimal(15,2),
    procstate char(2) not null ,
    rectime char(14),
    sendtime char(14),
    zcjdlx char(1),
    zcrq decimal(8,0),
    zccc char(2),
    settime char(14),
    errcode char(8),
    errdesc char(60),
    prilevel char(1),
    putuser char(10) not null ,
    checkuser char(10) not null ,
    updateuser char(10),
    grantuser char(10),
    payofxchngseal char(40),
    billofxchngseal char(10),
    oprtsource char(2),
    checkstate char(2),
    flowno decimal(8,0) not null ,
    strinfo char(60),
    bkremitstrinfo char(60),
    bkremitcase char(2),
    dfxynum char(60),
    content char(100),
    printno integer,
    notetype char(2),
    billtype char(1)
  );
revoke all on "zfht".bepsgberecvlist from "public" as "zfht";


方法二:
dbaccess 进入到导入的数据库,之后执行
load from '/informix/zfht.exp/bepsgberecvlist.unl'           insert into bepsgberecvlist;
load from '/informix/zfht.exp/bepsgberecvlist_his.unl'       insert into bepsgberecvlist_his;
load from '/informix/zfht.exp/bepsgberecvlist_hisold.unl'    insert into bepsgberecvlist_hisold;
load from '/informix/zfht.exp/bepsgbesendjrn.unl'            insert into bepsgbesendjrn;
load from '/informix/zfht.exp/bepsgbesendlist.unl'           insert into bepsgbesendlist;
load from '/informix/zfht.exp/bepsgbesendlist_his.unl'       insert into bepsgbesendlist_his;
load from '/informix/zfht.exp/bepsgbesendlist_hisold.unl'    insert into bepsgbesendlist_hisold;


informixload 大表的时候出错

错误信息:long transaction aborted. 12204: RSAM error:Long transaction detected.


错误原因:日志空间不够,事务不能被滚回,自动结束。

解决方案:

下Load指令前关掉日志功能,load结束后再开启


ontape-s -N db_name {注意这条指令运行时informix数据库须处于脱机状态,不能有链接链到数据库中,否则这条指令不会成功}

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26366371/viewspace-2062307/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/26366371/viewspace-2062307/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值