在Windows上的db之间传输数据到linux
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在Windows上的db之间传输数据到linux相关的知识,希望对你有一定的参考价值。
我有这个错误,当我尝试将数据从windows上的db2 db传输到linux上的db时,由ibm data studio:
CALL SYSPROC.ADMIN_CMD( 'LOAD FROM Pathfile.dat OF IXF REPLACE INTO
Schema.Table(ID, SID, REFERENCE, UCI, STATE, DEBTORNAME, DEBTORADDR,DEBTORZIP, DEBTORCITY, DEBTORPROVINCE, DEBTORCOUNTRY, DEBTORIBAN,
DEBTORBIC,CREDITORNAME, CREDITORADDR, CREDITORZIP, CREDITORCITY, CREDITORPROVINCE,CREDITORCOUNTRY, CREDITORIBAN, CREDITORBIC, ORGANIZATIONID,
SEQUENCETYPE, ROLE,LASTDATEOFCOLL, LASTTYPEOFCOLL, CURRENTSCHEME, SIGNATURECITY, SIGNATUREDATE, REFDEBTNAME, REFCREDNAME, COMMENTS, SOURCE,
LASTMODIFIEDBY, LASTMODIFIED, LASTSTATE, MAXAMOUNT, REQUESTCOUNT, MAXREQUESTS, VALIDFROM, VALIDTO, MANDATETYPE, HASAMENDMENT, PREVIOUSMANDATEID,
ORIREFERENCE, ORIUCI, ORICREDITORNAME, ORIDEBTORIBAN, ORIDEBTORBIC, EXTERNALID, EXTERNALREFERENCE, CUSTSPEC1, CUSTSPEC2, CUSTSPEC3, CREATIONTIME)'
)
我有这个错误:
An unexpected token "COMMENTS" was found following ",". Expected tokens may include: "<identifier>".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.19.5
答案
COMMENTS
显然是一个保留字(尽管当我查找DB2保留字列表时,它只包含COMMENT
,而不是复数形式)。所以你需要把它放在引号中以逃避它。
CALL SYSPROC.ADMIN_CMD( 'LOAD FROM Pathfile.dat OF IXF REPLACE INTO
Schema.Table(ID, SID, REFERENCE, UCI, STATE, DEBTORNAME, DEBTORADDR,DEBTORZIP, DEBTORCITY, DEBTORPROVINCE, DEBTORCOUNTRY, DEBTORIBAN,
DEBTORBIC,CREDITORNAME, CREDITORADDR, CREDITORZIP, CREDITORCITY, CREDITORPROVINCE,CREDITORCOUNTRY, CREDITORIBAN, CREDITORBIC, ORGANIZATIONID,
SEQUENCETYPE, ROLE,LASTDATEOFCOLL, LASTTYPEOFCOLL, CURRENTSCHEME, SIGNATURECITY, SIGNATUREDATE, REFDEBTNAME, REFCREDNAME, ''COMMENTS'', SOURCE,
LASTMODIFIEDBY, LASTMODIFIED, LASTSTATE, MAXAMOUNT, REQUESTCOUNT, MAXREQUESTS, VALIDFROM, VALIDTO, MANDATETYPE, HASAMENDMENT, PREVIOUSMANDATEID,
ORIREFERENCE, ORIUCI, ORICREDITORNAME, ORIDEBTORIBAN, ORIDEBTORBIC, EXTERNALID, EXTERNALREFERENCE, CUSTSPEC1, CUSTSPEC2, CUSTSPEC3, CREATIONTIME)'
)
以上是关于在Windows上的db之间传输数据到linux的主要内容,如果未能解决你的问题,请参考以下文章
我可以将 AS400 上的 DB2 数据库转储到 Windows 或 Linux 吗?
Python实现Windows和Linux之间互相传输文件(文件夹)的方法