Oracle Sequence Modification Problems

Source: Internet
Author: User
Tags sql error


Oracle Database migration may occur during the project, so the sequence may be reset, resulting in the current value of the sequence.
When it is less than the maximum value of the field in the table that uses the sequence, an error occurs, [javascript] [DH-OFFICE] 2012-10-30 19:48:32 WARN [http-8080-5] JDBCExceptionReporter.
LogExceptions (100) | SQL Error: 1, SQLState: 23000 [DH-OFFICE] 19:48:32 ERROR [http-8080-5] JDBCExceptionReporter.
Loghoptions (101) | ORA-00001: violates a unique constraint (DHOFFICE. PK_APP_USER) www.2cto.com modify the sequence Value: query the maximum value select max (userid) from userinfo to add 100 alter sequence s_app_user increment by 100 based on the original maximum value; done!
 

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.