日期:2014-05-16  浏览次数:20676 次

DB2常见错误及解决办法
1、创建数据库的时候,报42704错误。如:
Sql代码 复制代码
  1. =>create?database?test ??
  2. =>SQL0204N??"SYSTEM_1386_US"?is?an?undefined?name.??SQLSTATE=42704??
=>create database test
=>SQL0204N  "SYSTEM_1386_US" is an undefined name.  SQLSTATE=42704
解决办法:
Sql代码 复制代码
  1. =>create?database?test?using?codeset?gbk?territory?cn??
=>create database test using codeset gbk territory cn



2、在连接数据的时候,报57017错误。如:
Sql代码 复制代码
  1. =>connect?to?test?user?test?using?test ??
  2. =>SQL0332N??Character?conversion?from?the?source?code?page?"1386"?to?the?target?code?page?"819"?is?not?supported.?SQLSTATE=57017??
=>connect to test user test using test
=>SQL0332N  Character conversion from the source code page "1386" to the target code page "819" is not supported. SQLSTATE=57017
解决办法:
Sql代码 复制代码
  1. =>db2set?db2codepage=1386??
=>db2set db2codepage=1386



3、在对数据库进行操作的时候,报55039错误。如: