Db2 Sql Error Sqlcode=-551
Contents |
DB2
Db2 Sql Error Sqlcode 551 Sqlstate 42501
SQL Error: SQLCODE=-551, SQLSTATE=42501 db2; SQLCODE=-551; SQLSTATE=42501; permissions
Db2 Sql Error Codes
Technote (troubleshooting) Problem After a successful database-transfer to DB2 the Portal Server db2 sql error sqlcode 204 will not start correctly and the Portal startup shows the following error in the SystemOut.log... com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, http://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/codes/src/tpc/n551.html SQLSTATE=42501, SQLERRMC=DB2USER;EXECUTE;SYSIBM.SQLTABLES, DRIVER=4.18.60 Symptom The Portal Server is not accessible via a browser after startup. Review of the SystemOut.log shows the following... com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=DB2USER;EXECUTE;SYSIBM.SQLTABLES, DRIVER=4.18.60 Cause The DB2 environment does not have the permissions http://www-01.ibm.com/support/docview.wss?uid=swg21688020 required for Portal operation Environment Portal 8.5 DB2 AIX Diagnosing the problem Review the SystemOut.log and it shows the following during Portal startup... com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=DB2USER;EXECUTE;SYSIBM.SQLTABLES, DRIVER=4.18.60 Research of the DB2 error codes SQLCODE=-551, SQLSTATE=42501 point to a permission's issue...see link for details... http://www.sqlerror.de/db2_sql_error_-551_sqlstate_42501.html Interpreting the SQLERRMC message is very helpful. In this case it is... SQLERRMC=DB2USER;EXECUTE;SYSIBM.SQLTABLES This simply means that the user 'DB2USER' is attempting to perform an EXECUTE statement against the database object 'SYSIBM.SQLTABLES' and cannot due to lack of permissions. Resolving the problem Have the DBA correct the issue and provide the permissions needed. The following Portal links can help provide guidance on the proper permissions that Portal expects... http://www-01.ibm.com/support/knowledgecenter/SSHRKX_8.5.0/mp/eua-workflows/kc-db-setupdb-
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies http://stackoverflow.com/questions/1588687/db2-connection-problem-with-java of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: db2 sql Sign up Db2 connection problem with java up vote 7 down vote favorite 3 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 Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2ADMIN.LOGIN, DRIVER=3.57.82 db2 sql error 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. Query that i am running Select * from login; gives me error DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=DB2ADMIN.LOGIN, DRIVER=3.57.82 Select * from system.login; gives me error:- (//system is schema name) 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 java jdbc db2 db2-luw share|improve this question edited Jul 21 at 19:47 mustaccio 10.7k41933 asked Oct 19 '09 at 13:33 RishiPatel 801211 add a comment| 4 Answers 4 active oldest votes up vote 8 down vote accepted 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 Object not defined to DB2 DB2 apparently requires you to specify the schema name or it looks in the schema with the same name as your login user. You must use SET SCHEMA or fully qualify th