[Company Logo Image] 

Home Up Contents Coffee Break Credits Glossary Links Search

 
Error Msg 11728 sequence object

 

 

Home
Analysis Services
Azure
CLR Integration
High Availability
Open Source
Security
SQL Server 2008
SQL Server 2012
SQL Server 2014
SQL Server 2016
SQL Server 2017
SQL Server 2019
Tips
Troubleshooting
Tuning

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.

 

 

 

Cause.


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.

 

Workaround/Solution.


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.