SQL Server Express: 10 GB limit per database and 1410 MB of RAM
How to identify critical database filling and what to do
In the free edition of SQL Server Express, there is a hard limit on the size of a single database — 10 GB (for the 2005 version — 4 GB). Once the limit is reached, the system blocks writing new data, which leads to operations stopping and errors in accounting.
This material is intended for system administrators or users with hands-on experience working with Microsoft SQL Server and an understanding of the consequences of changes in the database structure. All actions are performed at your own risk: incorrect use of commands may result in data loss or an unusable database. Before performing any operations, you must create a full database backup, check available free disk space, and make sure there are no active connections to the database. If you are not confident in the correctness of the actions or their consequences — it is recommended to contact technical support.
Limits
-
SQL Server Express 2008 R2 / 2012 / 2014 / 2016 / 2019 / 2022 — 10 GB per database
-
SQL Server Express 2005 — 4 GB per database (this DBMS version is not supported by the current version of the program.)
-
The limit applies to data files (.mdf). The transaction log (.ldf) is not included in the limit, but it affects stability.
Symptoms of approaching or reaching the limit
Functional errors
-
Unable to create a document or add an item.
-
Messages:
PRIMARY filegroup is full
Could not allocate space for object
Performance
-
Significant slowdown.
-
Slow opening of forms (warehouse, balances, analytics).
Service operations
-
Background tasks do not run.
-
Errors during:
-
cost calculation;
-
statistics updates;
-
index reorganization;
-
backup creation.
Database status
-
Messages about insufficient memory in the buffer pool during complex queries.
How to check the current database size
Quick check (recommended)
-
Open the folder with the database (typically:
C:\TORGSOFT\DATABASE\) -
Check the size of the .mdf file
-
Critical values: 9+ GB — the database is at the limit. It is recommended to check and optimize the amount of data urgently.
Immediate actions (if the database is already full)
1. Clearing logs
-
Delete entries from:
-
the user activity log;
-
the document change log.
-
It is recommended to keep the last 2–3 months. Clear in parts so you do not overload the disk and the transaction log: during mass deletions, the transaction log file (.ldf) may temporarily increase significantly, and after completion its size decreases through Shrink.
-
If free space is 3–4 GB — delete data in batches of 3–4 months per run.
-
If free space is 10+ GB — it is advisable to delete no more than 1 year per run.
-
Typical effect: freeing hundreds of MB or several GB.
2. Deleting statistics for closed periods
It is recommended to do this after clearing logs to reduce system load and avoid unnecessary transaction log growth during deletion operations.
-
Use the built-in Torgsoft function.
-
Delete detailed data for past years (for example, 2015–2022).
-
Summary analytics are retained, but the database size decreases.
3. Database compression (Shrink)
-
After deleting data, be sure to run Shrink via SQL Management Studio.
-
Without this, the physical size of the .mdf file will not decrease.
Radical solution
Switching to a full SQL Server edition
-
SQL Server Standard / Enterprise
-
There is no practical limit on database size.
-
Support for using a much larger amount of RAM (64 GB and more depending on edition and version).
Prevention and monitoring
-
Regularly close accounting periods.
-
Periodically perform:
-
index reorganization;
-
statistics updates.
-
Monitor the .mdf size (monthly monitoring).
-
Avoid entering abnormally large values in quantity or price fields by mistake (risk of arithmetic overflow and unnecessary data growth).
Key takeaway
SQL Server Express is suitable for small and medium accounting, but it is not designed for long-term storage of large historical datasets. Reaching the 10 GB limit is not a failure, but expected system behavior. The only options are regular cleanup or switching to a full SQL Server edition.
-
16.03.2026
Duplicate barcodes and names: how to find, merge and fix them so as not to break the accounting
How to find, merge and fix duplicate products in Torgsoft to avoid errors in balances, reporting and inventory
-
27.02.2026
Directory errors: causes of failures and financial losses
Errors in Torgsoft directories: barcode in quantity, zero cost, duplicates, fiscal failures and database slowdowns
-
03.02.2026
Password recovery for "Owner" or sa user
Guide to restoring Torgsoft access (sa user). Reset password via SQL Management Studio, osql command line, or contact technical support for assistance.









Go back to the previous step