Db2 troubleshooting Based on Errors

Source: Internet
Author: User
Tags sql error


Db2 often reports errors when using db2 based on the error troubleshooting experience. However, the error message is too unfriendly and there is no descriptive information that developers can understand. Only SQLCODE, SQLSTATE, SQLERRMC, and DRIVER codes and SQLCODE SQL error codes are returned. Generally, this code can be used to check the status of SQLERRMC after the SQL statement is executed, however, if the sqlcode fails to troubleshoot the problem, you can use this code to check whether the DRIVER driver is connected to the DRIVER version number, which is fixed, for example, the error code is: SQLCODE =-301, you can run the db2 command to view the detailed error message: Go to the db2 command line interface and run the command: Java code db2? Sql00301 can see detailed Chinese error message, very easy to use www.2cto.com Note: As the db2 command parameters accept message identifiers are not case sensitive. In addition, a single letter suffix is optional and can be ignored. Therefore, the following command produces the same result :? SQL0000N? Sql0000? SQL0000w to call message help for UNIX-based system command lines, enter the following command: db2 "? XXXnnnnn ", where XXX indicates a valid message prefix, and nnnnn indicates a valid message number. If the message body is too long to be fully displayed on the screen, you can use the following command (on Unix-based operating systems and other systems that support "more"): db2 "? XXXnnnnn "| more author Qi Li Oil

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.