What Is openrowset auto_create_statistics Connected To?
A configuration option bothers me when its name sounds descriptive, but the documentation I found does not explain the thing it names. openrowset auto_create_statistics was one of those rows.

This post is part of the Undocumented Changes in SQL Server 2022 and 2025 series. The contents page lists every part in order.
In the SQL Server 2022 configuration-options post, I had one line of evidence. SQL Server 2022 added an advanced server configuration option named openrowset auto_create_statistics, and the 2025 instance had value_in_use = 1. I did not find the option name in Microsoft Learn or in the SQL Server, Azure, or Fabric documentation source repositories.
This post follows that one row. I found a documented Azure Synapse and Azure SQL Managed Instance feature area for statistics on OPENROWSET paths. I also found matching stored procedure names in the boxed SQL Server inventory. I still could not prove what the server configuration option controls on boxed SQL Server.
The public feature this resembles
Microsoft documents statistics on OPENROWSET paths for Azure Synapse serverless SQL pool. The Synapse statistics page says serverless SQL pool analyzes incoming user queries for missing statistics. If statistics are missing, the optimizer creates statistics on individual columns in the query predicate or join condition. It also says a SELECT statement triggers automatic creation of statistics.[1]
The same page says serverless SQL pool creates statistics per column for a dataset storage path. It also says statistics cannot be created for large object columns.[2]
The manual side uses two documented procedures. sys.sp_create_openrowset_statistics creates single-column statistics for external data sources via OPENROWSET in Azure SQL Managed Instance, and for OPENROWSET paths in Azure Synapse serverless SQL pool. The page says statistics metadata is not available for OPENROWSET columns.[3] sys.sp_drop_openrowset_statistics drops those statistics and has the same product scope.[4]
Those pages do not list boxed SQL Server under “Applies to”. The general OPENROWSET BULK page does list SQL Server, Azure SQL Database, Azure SQL Managed Instance, Fabric endpoints, Fabric Warehouse, and SQL database in Fabric. It says OPENROWSET reads data from one or many files and returns the content as a rowset.[5]
What the inventory shows
The boxed SQL Server inventory has the same names, but the public documentation only describes the feature for Azure SQL Managed Instance and Synapse serverless SQL pool.
The 2019 inventory did not have openrowset auto_create_statistics. The 2022, 2025 RTM (the initial release), and 2025 CU9 (cumulative update 9) inventories all had it with min 0, max 1, advanced. On the 2025 test instance, value = 1, value_in_use = 1, is_dynamic = 1, and is_advanced = 1.
The 2019 inventory did not have these eight procedures. The 2022 and 2025 inventories did:
| Procedure | 2022 and 2025 object type | Public docs found |
|---|---|---|
sys.sp_cleanup_all_openrowset_statistics |
EXTENDED_STORED_PROCEDURE |
No |
sys.sp_create_openrowset_statistics |
EXTENDED_STORED_PROCEDURE |
Yes, Azure SQL Managed Instance and Synapse serverless SQL pool |
sys.sp_drop_openrowset_statistics |
EXTENDED_STORED_PROCEDURE |
Yes, Azure SQL Managed Instance and Synapse serverless SQL pool |
sys.sp_generate_openrowset_statistics_props |
EXTENDED_STORED_PROCEDURE |
No |
sys.sp_get_openrowset_statistics_additional_props |
EXTENDED_STORED_PROCEDURE |
No |
sys.sp_get_openrowset_statistics_cardinality |
EXTENDED_STORED_PROCEDURE |
No |
sys.sp_get_total_openrowset_statistics_count |
EXTENDED_STORED_PROCEDURE |
No |
sys.sp_show_openrowset_statistics |
EXTENDED_STORED_PROCEDURE |
No |
That group is why I treat the configuration option as part of a feature surface, not as an isolated configuration row. Boxed SQL Server has the option and the create/drop procedure names that Microsoft documents for Azure products. It also has six more openrowset-statistics procedures that I could not find in the public docs.
Error message 15820 changed in the same direction. In the 2019 inventory, it referred to sp_drop_file_statistics and sp_create_file_statistics. In the 2022 and 2025 inventories, it refers to sp_drop_openrowset_statistics and sp_create_openrowset_statistics. The 2022 text starts:
|
1 |
Openrowset statistics for column '%.*ls' cannot be dropped because they do not exist. Please, correct sp_drop_openrowset_statistics OPENROWSET query argument... |
That is a useful clue, but it is still not a contract. An error message can show that code has a name for a failure path. It does not tell me when boxed SQL Server uses that path.
What the definitions did not show
I searched all SQL module definitions captured from the 2022 and 2025 instances for openrowset_statistics, openrowset statistics, openrowset auto_create_statistics, sp_create_openrowset_statistics, and sp_drop_openrowset_statistics. I found no SQL definitions that mention those terms.
That absence matters for sp_show_openrowset_statistics. I chose not to run it because I could not read the definition first and confirm that it is a read-only SELECT. The procedure is an extended stored procedure, and OBJECT_DEFINITION returned NULL. I did not execute it.
The only nearby SQL definitions I found were generic catalog definitions. For example, sys.stats exposes auto_created from the status bit 0x2000, and sys.databases exposes is_auto_create_stats_on from a database status bit. Those definitions are about ordinary database statistics. They do not mention OPENROWSET statistics or the server option name.
The local test
I tested on the 2025 instance without changing server configuration. The scratch database is undoc_spinoff_openrowset. I wrote the CSV (comma-separated values) file under C:\temp\undoc_spinoff_openrowset and confirmed that the SQL Server service could read it by using a format file.
Here is the test shape. I am showing the relevant parts, not the generated XML and non-XML format files. The first statement creates a scratch database, so run this only on a test instance:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
IF DB_ID(N'undoc_spinoff_openrowset') IS NULL BEGIN CREATE DATABASE undoc_spinoff_openrowset; END; GO USE undoc_spinoff_openrowset; GO SELECT [name] , [value] , [value_in_use] , [is_dynamic] , [is_advanced] FROM sys.configurations WHERE [name] = N'openrowset auto_create_statistics'; SELECT COUNT_BIG(*) AS west_rows, SUM(TRY_CONVERT(int, amount)) AS west_amount FROM OPENROWSET( BULK 'C:\temp\undoc_spinoff_openrowset\orders-no-header.csv', FORMATFILE = 'C:\temp\undoc_spinoff_openrowset\orders-bcp-lf.fmt' ) AS r WHERE r.region = 'west'; SELECT COUNT_BIG(*) AS user_created_stats FROM sys.stats WHERE user_created = 1; SELECT COUNT_BIG(*) AS auto_created_user_object_stats FROM sys.stats AS s JOIN sys.objects AS o ON o.object_id = s.object_id WHERE s.auto_created = 1 AND o.is_ms_shipped = 0; |
The format-file version returned five rows and a sum of 170. After the query, sys.stats showed zero user-created statistics and zero auto-created statistics on user objects in the scratch database. That is not the right metadata surface for OPENROWSET statistics, because Microsoft says statistics metadata is not available for OPENROWSET columns. I still checked it because it is the ordinary statistics catalogue, and a negative result there prevents one wrong explanation.
The OPENROWSET(BULK ... FORMAT = 'CSV') test with a WHERE predicate did not reach the point where it could create a statistic on this boxed instance. With an explicit WITH column list, SQL Server returned:
|
1 |
WITH clause is not supported for locations with 'C:\temp\undoc_spinoff_openrowset\orders.csv' connector when specified FORMAT is 'CSV'. |
Without the WITH clause or a format file, SQL Server returned:
|
1 |
Either a format file or one of the three options SINGLE_BLOB, SINGLE_CLOB, or SINGLE_NCLOB must be specified. |
Combining FORMAT = 'CSV' with a format file returned an OLE DB provider metadata error before the query ran. The working local-file test used a format file and omitted FORMAT = 'CSV', so it does not prove anything about the undocumented server option.
What I think it is connected to
The safest wording is connected to, not controls.
openrowset auto_create_statistics appears connected to the same OPENROWSET statistics feature area that Microsoft documents for Azure Synapse serverless SQL pool and Azure SQL Managed Instance. The evidence has five parts: shared names, the new boxed SQL Server option, the create/drop procedure names, the internal helper procedure names, and the changed error message.
I could not determine what the option controls on boxed SQL Server. I also could not prove that boxed SQL Server auto-creates OPENROWSET statistics for local OPENROWSET(BULK) CSV queries. The local syntax path I could run did not create ordinary sys.stats entries, and the documented Synapse pages explicitly say OPENROWSET statistics metadata is not available.
I do not change this option based on its name. For an upgrade review, I record four facts: it is advanced, enabled on the 2025 test instance, undocumented as a SQL Server configuration option, and apparently tied to the OPENROWSET statistics surface documented for Azure products.
If openrowset auto_create_statistics affected one of your boxed SQL Server workloads, tell me on Bluesky or LinkedIn. Send the Microsoft documentation too, if I missed it. I’ll update the notes.
References
- Create and update statistics using Azure Synapse SQL resources - Microsoft Learn. Source for automatic statistics creation in Azure Synapse serverless SQL pool, including the statement that
SELECTtriggers automatic creation. ↩ - Create and update statistics using Azure Synapse SQL resources - Microsoft Learn. Source for the statement that serverless SQL pool statistics are created per column for a storage path, and not for large object (LOB) columns. ↩
- sp_create_openrowset_statistics (Transact-SQL) - Microsoft Learn. Documents the create procedure for Azure SQL Managed Instance and Azure Synapse serverless SQL pool, and says metadata is not available for
OPENROWSETcolumns. ↩ - sp_drop_openrowset_statistics (Transact-SQL) - Microsoft Learn. Documents the drop procedure for Azure SQL Managed Instance and Azure Synapse serverless SQL pool. ↩
- OPENROWSET BULK (Transact-SQL) - Microsoft Learn. Documents
OPENROWSET(BULK)product scope and describesOPENROWSETas returning file content as a rowset. ↩