Db2 Error Code Sqlcode=-551
Contents |
is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register
Db2 Sql Error Sqlcode 204 Sqlstate 42704
link above to proceed. To start viewing messages, select the forum that db2 sql error sqlcode 803 you want to visit from the selection below. Results 1 to 6 of 6 Thread: ERROR SQLCODE "-551", SQLSTATE db2 sql error sqlcode 104 sqlstate 42601 "42501" when doing inserts. Tweet Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 04-28-09,16:14 http://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/codes/src/tpc/n551.html #1 db2pro View Profile View Forum Posts Banned Join Date Mar 2009 Posts 36 Unanswered: ERROR SQLCODE "-551", SQLSTATE "42501" when doing inserts. Hi All, When I am running the following insert command. I am getting the following error. COMMAND: INSERT INTO WCCADM12.CDEVENTDEFTP ( LANG_TP_CD , EVENTDEF_TP_CD , EVENT_CAT_CD , EVENT_NAME , ENABLE_NOTIFY , EXPIRY_DT , DESCRIPTION , LAST_UPDATE_USER , LAST_UPDATE_DT ) VALUES http://www.dbforums.com/showthread.php?1641803-ERROR-SQLCODE-quot-551-quot-SQLSTATE-quot-42501-quot-when-doing-inserts ( 100, 15, 6, 'PartyComplianceNextVerify', 'Y', null, 'Party Compliance Next Verify Date', null, CURRENT_TIMESTAMP ) ERROR:: DB21034E The command was processed as an SQL statement because it was not a valid Command Line Processor command. During SQL processing it returned: SQL0727N An error occurred during implicit system action type "7". Information returned for the error includes SQLCODE "-551", SQLSTATE "42501" and message tokens "WCCADM12|ALTER TABLE|WCCADM12.CDEVENTDEFTP". LINE NUMBER=0. SQLSTATE=56098 When I tried for solutions on google. Many replied that the solution is to 1. drop the triggers related to this table 2. then run the insert commands 3. create the triggers again. The above steps are absolutely working. But as this is in DEV. I am ok to do this and get rid of the issues. But I am worried about doing this in PROD. I just want to know that does anyone has encountered the same issue and could be fixed without dropping and recreating the Triggers. Actually my triggers on this table are for only Updates and Deletes but not on the INSERTS. I am not able to understand why the inserrts are failing. Any
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting http://stackoverflow.com/questions/1588687/db2-connection-problem-with-java ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join http://dba.stackexchange.com/questions/84230/how-do-i-grant-permissions-to-replace-a-function 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: 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 db2 sql 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 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 db2 sql error 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 the table name. The second error is because you don't have the privileges to perform that select: SQLCODE -551, Error: DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION ON OBJECT I'm not sure why the db2admin user wouldn't be able to select from this table... Resources: List of DB2 SQLCODEs share|improve this answer answered Oct 19 '09 at 13:44 Powerlord 60.1k1093146 Thanks I got it solved with your help. –RishiPatel Nov 1 '09 at 6:34 -204 would also indicate that the specified schema in a fully qualified table name is incorrect or doesn't exist. –ammianus Jan 2 '13 at 21:24 If you have a commandline, the following helps db2 ? SQLnnnn whe
log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Database Administrators Questions Tags Users Badges Unanswered Ask Question _ Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best answers are voted up and rise to the top How Do I Grant Permissions to Replace a Function? up vote 2 down vote favorite I am getting the following error message (when trying to enable NOSQL in DB2 10.5, although I don't think that's really the issue): Error code: -551 DB2 SQL Error: SQLCODE=-551, SQLSTATE=42501, SQLERRMC=DB2ADMIN;REPLACE FUNCTION; SYSTOOLS.JSON_VAL2, DRIVER=4.17.29 An error occurred during database object creation, rolling back The DB2ADMIN user already has the following permissions: grant DBADM, SECADM, ACCESSCTRL, DATAACCESS ON DATABASE TO USER db2admin I cannot find the GRANT command that I need to use to enable DB2ADMIN to replace the function. Sorry, I'm not a DBA, so I just need the exact command I'd need to enter. db2 permissions functions share|improve this question edited Dec 3 '14 at 21:16 Max Vernon 26.9k1160117 asked Dec 3 '14 at 20:46 Westy 2315 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted Apparently, whatever you are doing tries to CREATE OR REPLACE the function SYSTOOLS.JSON_VAL2. To replace any object the ID performing the operation must be the owner of that object, that is, the same ID that issued the very fi