TechNet
Export (0) Print
Expand All

Maximum Capacity Specifications for SQL Server

 

Updated: July 6, 2016

Applies To: SQL Server 2016

The following tables specify maximum sizes and numbers of various objects defined in SQL Server components. To navigate to the table for a SQL Server technology, click on its link:

SQL Server Database Engine Objects

SQL Server Utility Objects

SQL Server Data-tier Application Objects

SQL Server Replication Objects

Maximum sizes and numbers of various objects defined in SQL Server databases or referenced in Transact-SQL statements.

SQL Server Database Engine objectMaximum sizes/numbers SQL Server (64-bit)Additional Information
Batch size65,536 * Network Packet SizeNetwork Packet Size is the size of the tabular data stream (TDS) packets used to communicate between applications and the relational Database Engine. The default packet size is 4 KB, and is controlled by the network packet size configuration option.
Bytes per short string column8,000
Bytes per GROUP BY, ORDER BY8,060
Bytes per index key900 bytes for a clustered index. 1,700 for a nonclustered index.The maximum number of bytes in a clustered index key cannot exceed 900 in SQL Server. For a nonclustered index key, the maximum is 1700 bytes.

You can define a key using variable-length columns whose maximum sizes add up to more than the limit. However, the combined sizes of the data in those columns can never exceed the limit.

In a nonclustered index, you can include extra non-key columns, and they do not count against the size limit of the key. The non-key columns might help some queries perform better.
Bytes per index key for memory-optimized tables2500 bytes for a nonclustered index. No limit for a hash index, as long as all index keys fit in-row.On a memory-optimized table, a nonclustered index cannot have key columns whose maximum declared sizes exceed 2500 bytes. It is irrelevant whether the actual data in the key columns would be shorter than the maximum declared sizes.

For a hash index key there is no hard limit on size.

For indexes on memory-optimized tables, there is no concept of included columns, since all indexes inherently cover of all columns.

For a memory-optimized table, even though the row size is 8060 bytes, some variable-length columns can be physically stored outside those 8060 bytes. However, the maximum declared sizes of all key columns for all indexes on a table, plus any additional fixed-length columns in the table, must fit in the 8060 bytes.
Bytes per foreign key900
Bytes per primary key900
Bytes per row8,060SQL Server supports row-overflow storage which enables variable length columns to be pushed off-row. Only a 24-byte root is stored in the main record for variable length columns pushed out of row; because of this, the effective row limit is higher than in previous releases of SQL Server. For more information, see the "Row-Overflow Data Exceeding 8 KB" topic in SQL Server Books Online.
Bytes per row in memory-optimized tables8,060Starting SQL Server 2016 memory-optimized tables support off-row storage. Variable length columns are pushed off-row if the maximum sizes for all the columns in the table exceeds 8060 bytes; this is a compile-time decision. Only an 8-byte reference is stored in-row for columns stored off-row. For more information, see Table and Row Size in Memory-Optimized Tables.
Bytes in source text of a stored procedureLesser of batch size or 250 MB
Bytes per varchar(max), varbinary(max), xml, text, or image column2^31-1
Characters per ntext or nvarchar(max) column2^30-1
Clustered indexes per table1
Columns in GROUP BY, ORDER BYLimited only by number of bytes
Columns or expressions in a GROUP BY WITH CUBE or WITH ROLLUP statement10
Columns per index key32If the table contains one or more XML indexes, the clustering key of the user table is limited to 31 columns because the XML column is added to the clustering key of the primary XML index. In SQL Server, you can include nonkey columns in a nonclustered index to avoid the limitation of a maximum of 32 key columns. For more information, see Create Indexes with Included Columns.
Columns per foreign key16
Columns per primary key16
Columns per nonwide table1,024
Columns per wide table30,000
Columns per SELECT statement4,096
Columns per INSERT statement4096
Connections per clientMaximum value of configured connections
Database size524,272 terabytes
Databases per instance of SQL Server32,767
Filegroups per database32,767
Filegroups per database for memory-optimized data1
Files per database32,767
File size (data)16 terabytes
File size (log)2 terabytes
Data files for memory-optimized data per database4.096
Delta file per data file for memory-optimized data1
Foreign key table references per tableOutgoing = 253. Incoming = 10,000.For restrictions, see Create Foreign Key Relationships.
Identifier length (in characters)128
Instances per computer50 instances on a stand-alone server.

25 instances on a failover cluster when using a shared cluster disk as the stored option for you cluster installation SQL Server supports 50 instances on a failover cluster if you choose SMB file shares as the storage option for your cluster installation.
Indexes per memory-optimized table8
Length of a string containing SQL statements (batch size)65,536 * Network packet sizeNetwork Packet Size is the size of the tabular data stream (TDS) packets used to communicate between applications and the relational Database Engine. The default packet size is 4 KB, and is controlled by the network packet size configuration option.
Locks per connectionMaximum locks per server
Locks per instance of SQL ServerLimited only by memoryThis value is for static lock allocation. Dynamic locks are limited only by memory.
Nested stored procedure levels32If a stored procedure accesses more than 64 databases, or more than 2 databases in interleaving, you will receive an error.
Nested subqueries32
Nested trigger levels32
Nonclustered indexes per table999
Number of distinct expressions in the GROUP BY clause when any of the following are present: CUBE, ROLLUP, GROUPING SETS, WITH CUBE, WITH ROLLUP32
Number of grouping sets generated by operators in the GROUP BY clause4,096
Parameters per stored procedure2,100
Parameters per user-defined function2,100
REFERENCES per table253
Rows per tableLimited by available storage
Tables per databaseLimited by number of objects in a databaseDatabase objects include objects such as tables, views, stored procedures, user-defined functions, triggers, rules, defaults, and constraints. The sum of the number of all objects in a database cannot exceed 2,147,483,647.
Partitions per partitioned table or index15,000
Statistics on non-indexed columns30,000
Tables per SELECT statementLimited only by available resources
Triggers per tableLimited by number of objects in a databaseDatabase objects include objects such as tables, views, stored procedures, user-defined functions, triggers, rules, defaults, and constraints. The sum of the number of all objects in a database cannot exceed 2,147,483,647.
Columns per UPDATE statement (Wide Tables)4096
User connections32,767
XML indexes249

Maximum sizes and numbers of various objects that were tested in the SQL Server Utility.

SQL Server Utility objectMaximum sizes/numbers SQL Server (64-bit)
Computers (physical computers or virtual machines) per SQL Server Utility100
Instances of SQL Server per computer5
Total number of instances of SQL Server per SQL Server Utility200*
User databases per instance of SQL Server, including data-tier applications50
Total number of user databases per SQL Server Utility1,000
File groups per database1
Data files per file group1
Log files per database1
Volumes per computer3

*The maximum number of managed instances of SQL Server supported by SQL Server Utility may vary based on the hardware configuration of the server. For getting started information, see SQL Server Utility Features and Tasks. SQL Server Utility control point is not available in every edition of SQL Server 2016. For a list of features that are supported by the editions of SQL Server, see Features Supported by the Editions of SQL Server 2016.

Maximum sizes and numbers of various objects that were tested in the SQL Server data-tier applications (DAC).

SQL Server DAC objectMaximum sizes/numbers SQL Server (64-bit)
Databases per DAC1
Objects per DAC*Limited by the number of objects in a database, or available memory.

*The types of objects included in the limit are users, tables, views, stored procedures, user-defined functions, user-defined data type, database roles, schemas, and user-defined table types.

Maximum sizes and numbers of various objects defined in SQL Server Replication.

SQL Server Replication objectMaximum sizes/numbers SQL Server (64-bit)
Articles (merge publication)256
Articles (snapshot or transactional publication)32,767
Columns in a table* (merge publication)246
Columns in a table** (SQL Server snapshot or transactional publication)1,000
Columns in a table** (Oracle snapshot or transactional publication)995
Bytes for a column used in a row filter (merge publication)1,024
Bytes for a column used in a row filter (snapshot or transactional publication)8,000

*If row tracking is used for conflict detection (the default), the base table can include a maximum of 1,024 columns, but columns must be filtered from the article so that a maximum of 246 columns is published. If column tracking is used, the base table can include a maximum of 246 columns.

**The base table can include the maximum number of columns allowable in the publication database (1,024 for SQL Server), but columns must be filtered from the article if they exceed the maximum specified for the publication type.

Hardware and Software Requirements for Installing SQL Server 2016
Check Parameters for the System Configuration Checker
SQL Server Utility Features and Tasks

Community Additions

ADD
Show:
© 2016 Microsoft