DB2 returns SQLCODE-818 Error

Source: Internet
Author: User

It was a strange thing when I was engaged in a DB2-Based Embedded C language project. I would like to share it with you.

At that time, in order to maintain the integrity of the test data and the data consistency of the developers, but also to reduce the pressure on DBServer, we started to create a DB instance nightmare for every two people.

Each time the handler A compiles the program and starts to run it, the handler B of the same DB instance also starts to compile and run it. At this time, the handler A will report "SQL0818N A timestamp conflict occurred.. As A result, A starts to re-compile, run, OK, and start testing. At this time, B will report the error reported by.

At that time, I was not familiar with the embedded development of DB2 because I was just familiar with its principles. I thought it was a problem with DB2 or a problem with the client. So I uninstalled Quest Central, reinstall DB2. The problem has not been solved.
Later, I found out why by searching for information and summarizing it. Is the process of creating a package.

Because only segment entries are used to identify the context in the application, the modified source files and packages are closely linked together and must always point to the same context. This is achieved by embedding a consistency mark token in the modified source file, also known as "timestamp)", and storing the same value in the package information in DB2 UDB. Each request from the application carries this consistency flag. The passed value must be compared with the value in the catalog table. If the two values are different and the timestamp and consistency mark of the loaded module are different, a "timestamp" error SQLCODE-818 will occur ).
The reason is that, as described above, I hope it will be useful to you.

(

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.