System Procedures Whose Code Changed in SQL Server 2025

I still see scripts that call sp_who2, sp_help, and sp_columns because they are quick, old, and already on every instance. Procedures like that are dependencies worth checking during an upgrade. When their code changes, nobody gets a compile error. The script just gets a different result set, a different filter, or a different error path.

A woman DBA compares two nearly identical cards on a navy corkboard.  The newer card has highlighted lines, and a red string links one of them to a warning pin.

In the first post on SQL Server 2025, I counted new system objects in SQL Server 2025. This post continues the same comparison, but looks at objects that already existed in SQL Server 2022 and changed by SQL Server 2025. It uses the same classification method as the 2019 to 2022 changed-procedures post. As a result, the two sets are comparable.

The inventory found 212 changed object_hash rows between SQL Server 2022 Cumulative Update (CU) 25 and SQL Server 2025 CU9. The changed module text belonged to 144 stored procedures, 60 views, 6 inline table-valued functions and 2 scalar functions. SQL Server 2025 also had 91 new module hashes, but those new modules are not the subject here.

I compared the 2022 and 2025 definitions first after collapsing whitespace and case. Twenty-three of the 212 changes disappeared at that stage. One more was a comment-only change inside the body. After those filters, 188 modules still had substantive definition changes that needed classification.

My notes include SQL Server 2025 RTM. RTM means release to manufacturing, the first public build. Microsoft released it between SQL Server 2022 CU25 and SQL Server 2025 CU9. Of the 212 changed module hashes in CU9, 164 were already changed at RTM and then stayed the same through CU9. Twenty-five still matched SQL Server 2022 at RTM and changed after RTM. Another 23 changed at RTM and then changed again by CU9.

What changed, at a high level

These categories overlap. A procedure can add a parameter and also add a feature gate. The “keyword match” rows count changed modules whose new text contains terms such as SERVERPROPERTY, HAS_PERMS or TRY, so they are a rough guide. The code blocks in this post are excerpts from the system definitions, not scripts to run.

Category Changed modules
Changed module hashes 212
Substantive definition changes 188
Changed stored procedures 144
Substantive stored procedure changes 134
Procedures with added parameters 15
Views and functions with result-column changes 25
Keyword match: version or edition checks 36
New feature hooks 62
Keyword match: security or permission checks 22
Keyword match: error handling 127
Whitespace or case only 23
Comment-only elsewhere 1

The changed procedures include many replication, change data capture (CDC), full-text, log shipping, and memory-optimized table procedures. Some changes also touch JSON, vector, Fabric, Azure SQL Database, and internal terms such as Trident and FIDO. I found FIDO spelled out in Microsoft identity documentation, but not in any SQL Server source that uses the name, so I leave FIDO and Trident unexpanded.[1]

One useful comparison with the 2022 post: the raw count is almost the same. SQL Server 2022 had 217 changed module hashes after SQL Server 2019. SQL Server 2025 CU9 has 212 after SQL Server 2022. The procedures DBAs are more likely to call directly changed in 2025. sp_help, sp_helpindex, sp_updatestats, sp_who2, sp_columns, sp_tableoption, and sp_change_users_login all had identical hashes in my 2019 and 2022 inventories, then changed in SQL Server 2025 CU9.

sys.sp_who2 changed, but I did not find a caller-visible result change

I expected sp_who2 to be a good warning example. Scripts still parse its text-like result set. The definition changed, but the change I found is internal cleanup around SID variables.

I did not see a new parameter, a changed SELECT list, or a changed filter in the definition diff. Microsoft does not appear to publish a separate Learn reference page for sp_who2. The only required source search hit I found says sp_who and sp_who2 are older commands. The same article suggests sys.dm_exec_sessions because it returns more data in a result set that is easier to query and filter.[2] For upgrade testing, I plan to check scripts that parse sp_who2, but this specific code change does not look like the risky one.

sys.sp_help and sys.sp_helpindex added EngineEdition 12 branches

sp_help changed two SQL Azure checks from EngineEdition != 5 to EngineEdition not in (5,12).

sp_helpindex uses the same new EngineEdition value when it decides whether to look up a data-space name for the index.

The Learn pages for sp_help and sp_helpindex both include SQL database in Microsoft Fabric in their Applies to lists.[3][4] Neither page explains the EngineEdition value. Neither page calls out a SQL Server 2025 result-set change for the excerpts above. On a normal SQL Server instance, SERVERPROPERTY('EngineEdition') is not 5 or 12, so I do not expect this branch to change local DBA scripts. In Fabric or a related engine surface, the filegroup-related result can differ.

sys.sp_updatestats widened a permission exception

sp_updatestats checks who can run the procedure. SQL Server 2025 adds EngineEdition 12 to the exception that already existed for Azure SQL Database.

The Learn page says that, for SQL Server, the caller must be the database owner or a member of the sysadmin fixed server role. For Azure SQL Database, the caller must be a member of the db_owner fixed database role.[5] I did not find a permission note for EngineEdition 12 on that page. The caller-visible part is conditional. A script that can run as db_owner on EngineEdition 12 might still fail under the SQL Server rule.

sys.sp_columns now hides JSON and vector columns from this path

SQL Server 2025 adds a filter to both main sp_columns result queries.

The Learn page for sp_columns documents the result set, including DATA_TYPE, TYPE_NAME, SQL_DATA_TYPE, ORDINAL_POSITION, and SS_DATA_TYPE. It does not mention the new filter in the checked page text.[6] Microsoft separately documents two types named in the filter comment. They are the SQL Server 2025 json data type and the SQL Server 2025 vector data type.[7]

The new filter can affect scripts that use sp_columns for schema discovery. If a table has JSON or vector columns, this procedure path can omit those columns instead of returning a row with a new type code. The change is not a column-order change or a data-type-width change. It is a row-filtering change, so a parser may interpret the missing row as a missing column in the table.

sys.sp_change_users_login changed one error path

sp_change_users_login is deprecated, but it still appears in restore-and-fix scripts. SQL Server 2025 changes two error paths so error 15063 receives the existing user name. The 2025 message text with the user name is in the Microsoft docs source, but the live Learn errors page I checked still showed the older text.

The Learn page still documents the procedure as deprecated and tells readers to use ALTER USER instead. It also documents the Report result set as UserName and UserSID.[8] I did not find a note about the changed error-message argument. A script that checks only the return code may not be affected. A script that scrapes the error text can see different text for the same failing case.

sys.sp_cdc_enable_table got tracing and an EngineEdition 12 error path

The CDC enable procedure had already changed in SQL Server 2022, when @enable_extended_ddl_handling appeared. SQL Server 2025 keeps that parameter and adds trace-event calls around the internal worker.

It also changes the unsupported-edition error path for EngineEdition 12. The Learn page documents sp_cdc_enable_table, including the unsupported @enable_extended_ddl_handling parameter.[9] I did not find the trace-event calls or the EngineEdition 12 branch on that page. I plan to test CDC setup scripts after an upgrade because this procedure both changes state and changed code. I did not execute it for this post.

What I plan to test first

I do not plan to put all 188 substantive changes into an upgrade plan. I plan to start with the procedures whose output or errors often get parsed: sp_columns, sp_change_users_login, sp_help, sp_helpindex, sp_updatestats, and sp_who2.

I would test sp_columns first, because it can omit JSON and vector columns from a schema-discovery result set. The EngineEdition 12 changes matter if the same code path runs against Fabric or another surface that reports that value. The sp_who2 change shows why a changed hash still needs a caller-impact review. Some changed hashes do not turn into caller-visible behaviour.

Next in the series: System objects removed in SQL Server 2025.

Have you seen one of these procedure changes affect an upgrade or a monitoring script? Tell me on Bluesky or LinkedIn, and I’ll update the notes.

References

  1. MicrosoftDocs/sql-docs, MicrosoftDocs/azure-docs and MicrosoftDocs/fabric-docs - GitHub. The Markdown source of Microsoft Learn for SQL Server, Azure and Fabric, searched with whole-word, fixed-string git grep on 2026-09-26. The search results are my own. ↩
  2. Understand and Resolve Blocking Problems - Microsoft Learn. Mentions sp_who2 as an older blocking-troubleshooting command and recommends sys.dm_exec_sessions for a more queryable result set. ↩
  3. sys.sp_help (Transact-SQL) - Microsoft Learn. Documents the procedure syntax, result sets and Applies to list checked against the EngineEdition 12 branch. ↩
  4. sys.sp_helpindex (Transact-SQL) - Microsoft Learn. Documents the procedure syntax, result set and Applies to list checked against the EngineEdition 12 branch. ↩
  5. sys.sp_updatestats (Transact-SQL) - Microsoft Learn. Documents the procedure syntax and permission section checked against the EngineEdition 12 permission branch. ↩
  6. sys.sp_columns (Transact-SQL) - Microsoft Learn. Documents the sp_columns result set checked against the SQL Server 2025 JSON and vector filter. ↩
  7. Work with JSON Data in SQL Server and Vector Data Type - Microsoft Learn. Documents the SQL Server 2025 json and vector data types named by the sp_columns filter comment. ↩
  8. sys.sp_change_users_login (Transact-SQL) - Microsoft Learn. Documents the deprecated procedure, its result set and the recommendation to use ALTER USER. ↩
  9. sys.sp_cdc_enable_table (Transact-SQL) - Microsoft Learn. Documents the CDC enable procedure and the @enable_extended_ddl_handling parameter checked against the SQL Server 2025 tracing changes. ↩