SQLCODE -204使用jdbc-driver到UDB DB2 v8.2 [英] SQLCODE -204 using a jdbc-driver to UDB DB2 v8.2

查看:111
本文介绍了SQLCODE -204使用jdbc-driver到UDB DB2 v8.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



您好 -


我刚安装了DB2服务器的快速版(在Win-XP
机器上) ),

然后我设置了一个客户端JDBC驱动程序来访问它。查询是一个简单的

''选择*来自EMPLOYEE''对他们的SAMPLE数据库。


(此查询有效在''控制中心'内很好......这个表中有数据
,等等。


使用JDBC的''连接''工作良好。只是SQL查询

给出错误。

(我正在使用看似最新的''type-4''(瘦)驱动程序,

''修补补丁11''。)


所以,既然我是DB2服务器的新手,我没有CLUE找到

a list

的SQLCODE。 (例如查找值-204)。或者,也许我应该是

学习

如何检查服务器的日志文件?!?


请指教。


TIA ...


Dave


Hi -

I just installed the express-edition of DB2 server (on a Win-XP
machine),
and then I setup a client JDBC driver to access it. The query is a
simple
''select * from EMPLOYEE'' against their SAMPLE database.

(This query works fine from within ''Control Center''...there is data in
this table, etc.)

The ''connect'' using JDBC works fine. It is just the SQL-query that
gives the error.
(I''m using what appears to be the latest ''type-4'' (thin) driver, with
''fix patch 11''.)

So, since I''m a novice at the DB2 server, I have no CLUE where to find
a list
of SQLCODEs. (e.g. to look up value -204). Or, maybe I should be
learning
how to examine the server''s log files?!?

Please advise.

TIA...

Dave

推荐答案

David H. Cook写道:
David H. Cook wrote:

你好 -
我刚安装了DB2服务器的快速版(在Win-XP
机器),然后我设置了一个客户端JDBC驱动程序来访问它。查询是一个简单的
''选择*来自EMPLOYEE''对他们的SAMPLE数据库。

(这个查询在''控制中心''内工作正常......这个表中有数据等等。)

使用JDBC的''connect'工作正常。它只是提出错误的SQL查询。
(我正在使用看似最新的''type-4''(瘦)驱动程序,用
' '修补补丁11''。

所以,既然我是DB2服务器的新手,我没有CLUE在哪里可以找到一份SQLCODE列表。 (例如查找值-204)。或者,也许我应该学习
如何检查服务器的日志文件?!?

Hi -

I just installed the express-edition of DB2 server (on a Win-XP
machine),
and then I setup a client JDBC driver to access it. The query is a
simple
''select * from EMPLOYEE'' against their SAMPLE database.

(This query works fine from within ''Control Center''...there is data in
this table, etc.)

The ''connect'' using JDBC works fine. It is just the SQL-query that
gives the error.
(I''m using what appears to be the latest ''type-4'' (thin) driver, with
''fix patch 11''.)

So, since I''m a novice at the DB2 server, I have no CLUE where to find
a list
of SQLCODEs. (e.g. to look up value -204). Or, maybe I should be
learning
how to examine the server''s log files?!?




取SQLCODE值( - 204),删除符号并添加SQL。这将是

给你的消息号。然后这样做:



Take the SQLCODE value (-204), remove the sign and prepend a SQL. This will
give you the message number. Then do this:


db2"? < msgnum>"

db2 "? <msgnum>"


db2"? SQL204"


给出:


SQL0204N"< name>"是一个未定义的名称。

最有可能的问题是你没有为EMPLOYEE表提供正确的模式

名称/限定符。请注意,DB2中的_all_对象是

放在一个模式中,如果你没有明确地包含模式名称

(这是我避免出现问题的一般建议),各种规则适用

来查找对象。


-

Knut Stolze

DB2信息集成开发

IBM德国
db2 "? SQL204"

gives:

SQL0204N "<name>" is an undefined name.
Most probably the issue is that you have not provided the proper schema
name/qualifier for the EMPLOYEE table. Note that _all_ objects in DB2 are
placed in a schema and if you don''t include the schema name explicitly
(which is my general recommendation to avoid problems), various rules apply
to find an object.

--
Knut Stolze
DB2 Information Integration Development
IBM Germany


这篇关于SQLCODE -204使用jdbc-driver到UDB DB2 v8.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆