Db2 Error 818
Contents |
by DB2 precompiler ) between the load module and the DBRM doesn't match.On the other hand , we get -805 when any DBRM or Package is not found in Plan which supposed to be there. Now lets see how we resolve both the abend. In db2 sql error sqlcode=-818 case of -818, if we have the correct DBRM (DBRM with same consistency token as there in timestamp mismatch in db2 the load module or in other word the output DBRM from the same precompiler step from where we got our load module) then we can just
Sql Error 805
bind our plan with DBRM and intern run the job with this new plan and corresponding load module.In case you don't have the correct DBRM with you, just precompile the job again create new load module( via compile, link-edit) and bind to crate https://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/codes/src/tpc/n818.html new plan so you can be sure that at run time the consistency token matches. For -805, you just see which dbrm or Package is not there in plan and include it accordingly in plan by binding it in plan. Now the real problem is even though sometimes the particular DBRM or the Package does exist in plan we get -805. Then obvious question is why???? why am i still getting -805 in this case. The answer is main reason for getting -805 is not http://db2guide.blogspot.com/2011/02/sql-code-818-vs-805-timestamp-mismatch.html just DBRM or Package not found in plan but it is -805 DBRM OR PACKAGE NAME location-name.collection-id.progname. consistency -token NOT FOUND IN PLAN plan-name REASON reason Simply stated, it means that an application program attempted to use a package 'location-name.collection-id.progname.consistency-token' that was not found. The DBRM name ‘dbrm-name' matched one or more entries in the package list and the search of those entries did not find the package (that is, it is present but the consistency token does not match). In this case the LOADLIB and the DBRM from which the package was created are not the same. So you can get timestamp mismatch (consistency token mismatch ) in case of -805 also as in case of -818 The difference is if you bind a DBRM to Package and then bind that Package to Plan and consistency token doesn't match then you get -805 where as If you bind DBRM directly to Plan ( without Packaging) and then consistency token doesn't match you get -818. Posted by Nitin Gandhi Email ThisBlogThis!Share to TwitterShare to FacebookShare to Pinterest 4 comments: Anonymous said... super stuffs !! Good work by Nitin Gandhi-raja June 20, 2011 at 4:46 AM Anonymous said... Thanks May 3, 2012 at 12:17 AM Anonymous said... Hi Nitin,Very nice posts..Regarding -805 and -818 ...As binding DBRM directly to PLAN is stopped DB2 ver 9/10 (as you mentioned in one of you post), we will not get -818 ever in DB2 ver9/10? August 19, 2012 at 7:54 PM Pranav Kulshreshtha said... I must say that you
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the http://stackoverflow.com/questions/5553961/db2-error-on-open-cursor-sqlcode-818 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 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 sql error them; it only takes a minute: Sign up DB2 ERROR on OPEN Cursor, Sqlcode : -818 up vote 1 down vote favorite I am running a VC++ 6.0 program which is accessing DB2 database. I have SQG file which containt the SQL command. I am getting DB2 ERROR on OPEN Cursor, Sqlcode : -818 error when executing the program. db2 sql error db2 share|improve this question asked Apr 5 '11 at 14:58 user693168 1112 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote Sounds like you need to do a recompile or a rebind. According to the documentation for SQL818: "Bind the application again, using the bind file for the program that matches the object module. Or, execute the program that corresponds to the package stored in the database." share|improve this answer answered Apr 5 '11 at 16:36 Michael Sharek 4,22922029 add a comment| Your Answer draft saved draft discarded Sign up or log in Sign up using Google Sign up using Facebook Sign up using Email and Password Post as a guest Name Email Post as a guest Name Email discard By posting your answer, you agree to the privacy policy and terms of service. Not the answer you're looking for? Browse other questions tagged db2 or ask your own question. asked 5 years ago viewed 2564 times active 5 years ago Related 0db2 SQLCODE=-243, SQLSTATE=36001 ERROR1db2 ? lookup error