Troubleshooting Guide: Error 11715 – No Properties Specified for ALTER SEQUENCE
Why This Error Happens
This error occurs when an ALTER SEQUENCE statement is executed without specifying any properties to modify, such as INCREMENT BY, RESTART WITH, MINVALUE, MAXVALUE, or CACHE. SQL Server 2025 requires at least one valid option in the ALTER SEQUENCE syntax, since the statement has no default action to perform on its own. This typically results from incomplete T-SQL scripts, dynamically generated SQL with missing parameters, or copy-paste errors where the property clause was accidentally omitted.
Step-by-Step Resolution Guide
Step 1: Review the Failing T-SQL Statement
- Open the query or stored procedure that triggered Error 11715 in SQL Server Management Studio (SSMS) or Azure Data Studio.
- Locate the exact
ALTER SEQUENCEcommand, which will look incomplete, such as:
ALTER SEQUENCE dbo.MySequence;
- Check surrounding logic (especially in dynamic SQL built with
sp_executesqlor string concatenation) for missing variable substitution.
Step 2: Add a Valid Property Clause
- Modify the statement to include at least one supported option. Common examples include:
ALTER SEQUENCE dbo.MySequence
RESTART WITH 100;
or
ALTER SEQUENCE dbo.MySequence
INCREMENT BY 5
MAXVALUE 10000;
- Ensure the property values match your intended business logic (e.g., resetting the sequence vs. changing its increment).
Step 3: Validate Dynamic SQL Generation Logic
- If the
ALTER SEQUENCEcommand is built dynamically in application code (C#, PowerShell, or a stored procedure), inspect the logic that concatenates the property string. - Confirm that conditional branches (e.g.,
IF @NewValue IS NOT NULL) correctly append a property clause before execution, rather than defaulting to an empty string. - Add a validation check or
THROWstatement in the procedure to catch empty property lists before they reach the server:
IF LEN(@PropertyClause) = 0
THROW 50000, 'No sequence property specified.', 1;
Step 4: Re-run the Corrected Script
- Execute the updated
ALTER SEQUENCEstatement in SSMS against the target database. - Confirm the command completes with “Command(s) completed successfully” and no Error 11715 is raised.
Alternative or Verification Steps
- Verify the fix by querying
sys.sequencesto confirm the updatedincrement,start_value, orcurrent_valuereflects your intended change:
SELECT name, current_value, increment, minimum_value, maximum_value
FROM sys.sequences
WHERE name = 'MySequence';
- If the error persists in an automated job or application, enable SQL Server Profiler or Extended Events to capture the exact malformed statement being sent to the server for further debugging.