10月 222019
 
  1. db2look导出的文件的字符集受两个配置的影响
    1. LANG
      1. 影响文件的表头
      2. 建议设置LANG=C,使得文件的头部和编码无关,不至于影响某些编辑器(如vim)对文件编码的检测
    2. DB2CODEPAGE
      1. 影响文件的内容
      2. 通过db2set进行设置,该设置是全局的,参考: https://phpor.net/blog/post/12804
  2. db2look 默认不导出创建数据库的语句,也不导出表存在就删除的drop语句,可以通过选项开启:
    1. -createdb: 生成创建数据库的语句
    2. -dp: Generate DROP statement before CREATE statement
    3. -printdbcfg: Generate UPDATE DB CFG commands for the database configuration parameters
      1. 如果目标数据库和源数据库配置期望一样的话,这样会比较方便
 Posted by at 上午 10:53

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

(required)

(required)

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据