我在使用 DB2 时遇到问题.我刚刚将 db2 安装为 db2admin 并使用密码.当我尝试连接到数据库时,它完全成功,并且在运行任何简单的选择查询时,它给了我以下错误:-
I am having problem with DB2. I just installed the db2 as a db2admin and with a password. When i try to connect to database it is success full and while running any simple select query it give me following error:-
DB2 SQL 错误:SQLCODE=-204、SQLSTATE=42704、SQLERRMC=DB2ADMIN.LOGIN、DRIVER=3.57.82
DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2ADMIN.LOGIN, DRIVER=3.57.82
我有一个名为 onp 的数据库和一个名为login"的表,其中有一个名为login"的表,其中包含两个字段用户名和密码.
I have a database named onp and a table in it called 'login' in which there is one table called 'login' with two fields username and password.
查询我正在运行
DB2 SQL 错误:SQLCODE=-204,SQLSTATE=42704,SQLERRMC=DB2ADMIN.LOGIN,DRIVER=3.57.82
DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2ADMIN.LOGIN, DRIVER=3.57.82
DB2 SQL 错误:SQLCODE=-551, SQLSTATE=42501, SQLERRMC=DB2ADMIN;SELECT;SYSTEM.LOGIN, DRIVER=3.57.82
DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=DB2ADMIN;SELECT;SYSTEM.LOGIN, DRIVER=3.57.82
我已经尝试了网上所有的资源并且完全用尽了.请帮帮我
I have tried all the resources on the net and exhausted completely. Please help me
我对DB2了解不多,但是查找错误代码...
I don't know a lot about DB2, but looking up the error codes...
第一个错误是因为你没有指定架构,所以找不到登录表.
The first error is because you didn't specify a schema, so it couldn't find the login table.
SQLCODE -204 对象未定义到 DB2
SQLCODE -204 Object not defined to DB2
DB2 显然要求您指定模式名称,否则它会在模式中查找与您的登录用户同名的名称.
DB2 apparently requires you to specify the schema name or it looks in the schema with the same name as your login user.
您必须使用 SET SCHEMA
或完全限定表名.
You must use SET SCHEMA
or fully qualify the table name.
第二个错误是因为您没有执行该选择的权限:
The second error is because you don't have the privileges to perform that select:
SQLCODE -551,错误:没有执行操作的特权对象
SQLCODE -551, Error: DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION ON OBJECT
我不确定为什么 db2admin 用户无法从该表中进行选择...
I'm not sure why the db2admin user wouldn't be able to select from this table...
资源:
DB2 SQLCODE 列表
这篇关于java的db2连接问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!