[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

Error Msg 11728 sequence object



Analysis Services
CLR Integration
High Availability
Open Source
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019

Error Msg 11728 sequence object.

Applies to: SQL Server 2022.

Date created: May 6, 2024.

Problem Description.

Using SQL Server sequences while ingesting data on a table you may get the following error:

Msg 11728, Level 16, State 1, Line 3.
The sequence object 'CountBy1' has reached its minimum or maximum value. Restart the sequence object to allow new values to be generated.





The error message Msg 11728 in SQL Server indicates that a sequence object has reached its minimum or maximum value. This error occurs when youíre using a sequence thatís hit the limit specified in its definition, and it canít generate new values unless itís reset or altered.



The solution may be one of the following:


bulletIncrease the Maximum Value: You can alter the sequence to increase its maximum value, allowing the sequence to generate more numbers before hitting the limit again.
bulletSet the Sequence to Cycle: If appropriate for your use case, you can set the sequence to cycle, which means it will start over from the minimum value after reaching the maximum.



Setting the sequence to cycle may trigger duplicate key errors when the sequence value is used on an identity column that serves as primary key.




.Send mail to webmaster@sqlcoffee.com with questions or comments about this web site.