我实在不明白你要做什么。
在不同字符集的数据库之间导入导出数据使用exp/imp工具就可以了,oracle工具可以做到的事情,为什么要写程序?
dmp文件是经过压缩的二进制文件,我还真不知道它的格式定义。

解决方案 »

  1.   

    大哥,不同字符集的數據庫之間可以通過exp/imp切換嗎,exp出來的dmp文件會記錄字符集,當想imp到不同的字符集數據庫中時會報錯,而且不允許執行.好像dmp不可以改變格式吧
      

  2.   

    楼上说的对,我以前看到zhs16gbk和zhsgb231280字符集可以互相转换,就想当然了:An export file that is produced with a multibyte character set (for example, Chinese or Japanese) must be imported on a system that has the same character set or where the ratio of the width of the widest character in the import character set to the width of the smallest character in the export character set is 1. If the ratio is not 1, Import cannot translate the character data to the Import character set. Caution: When the character set width differs between the export client and the export server, truncation of data can occur if conversion causes expansion of data. If truncation occurs, Export displays a warning message.