Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TempDB has reached its size quota: How to increase size quota for tempDB on Azure SQL

We are getting an error while loading data from one table to another. We do some monthly/quarterly roll ups on the first table data which is inserted into another table

The source table has clustered column store index. We have billions of rows in the source data table.

the SELECT part of the load script has a WHERE clause which filters data based on month and year.

The error is below

'The database 'tempdb' has reached its size quota. Partition or delete data, drop indexes, or consult the documentation for possible resolutions.'

like image 871
DhruvJoshi Avatar asked Oct 18 '22 13:10

DhruvJoshi


1 Answers

SQLAzure enforces different limits,some are applicable irrespective of tiers,some limits may be higher depending on your service tier.Below is the way Azure handles those limits

Enforcement of limits

Resources other than CPU, Memory, Log I/O, and Data I/O are enforced by denying new requests when limits are reached. When a database reaches the configured maximum size limit, inserts and updates that increase data size fail, while selects and deletes continue to work. Clients receive an error message depending on the limit that has been reached.

so this answers your question on whether we can increase size of TEMPDB

Below are the limits for TEMPDB

enter image description here

This Page Azure SQL Database Resource Limits contains entire Limits in detail, i will try to add all the details when time permits or when i find the Github page ,so that link rot can be avoided

like image 76
TheGameiswar Avatar answered Nov 04 '22 18:11

TheGameiswar