---
title: SizeToSplitDatabaseOn System Parameter – Split Log Databases by Size
description: SizeToSplitDatabaseOn sets the size in GB at which the Nodinite Logging Service creates a new online Log Database (default 31). Learn how the split works and how a new Log Database is created.
---

# SizeToSplitDatabaseOn - System Parameter

**SizeToSplitDatabaseOn** sets the maximum size, in GB, of the online [Log Database][Log Databases]. When the data files of the online Log Database grow past this size, the [Logging Service][] creates a new online Log Database, and the previous one becomes an archive Log Database.

![The online Log Database Nodinite_DEV_Log_20241113 opened, Show Database Report with Size 1480 MB and Size to split database on 31744 MB, then SizeToSplitDatabaseOn opened from the System Parameters list, changed from 31 to 1 and saved; at the next check a new Log Database is online, and Log Audit Search shows the reason: the size of the current Log Database is '1408' MB, which is greater than the value for system parameter 'sizeToSplitDatabaseOn': '1024' MB, animated walkthrough (7.12)][1]  
*Animated walkthrough: with the limit lowered to 1 GB, the next check creates a new Log Database, and the [Log Audit][Log Audits] gives the Logging Service's reason. The Database Report's **Size** (1480 MB) includes the transaction log; the split compares the data files only (1408 MB).*

## :fa-table: At a Glance {#at-a-glance}

| Property | Value |
| --- | --- |
| Key | `SizeToSplitDatabaseOn` |
| Data type | integer (GB), minimum `1` |
| Default | `31` |
| Read by | [Logging Service][] |
| Takes effect | The Logging Service checks the split limits when it starts and then every hour; a saved value is used at the next check. No restart needed. |
| Status | ✅ Active |
| Since | Nodinite 3 |

## :fa-gears: How It Works

:Nodinite: spreads logged data over several [Log Databases][]. New [Log Events][Log Event] always go to the one online Log Database; older Log Databases are kept as archive Log Databases and stay searchable. The Logging Service starts a new online Log Database when either limit is reached first: size (this parameter) or age ([DaysToSplitDatabaseOn][]). With the `DaysToSplitDatabaseOn` default of `10000` days, size is in practice the only trigger.

The size check runs only when the age check didn't split. It compares the size of the online Log Database's **data files**, in MB and without the transaction log, with the value × 1024, and splits when the data files are larger. The Database Report's **Size** includes the transaction log, so it reads higher than what the split compares. To watch the coming split, open the online Log Database in [Manage Log Databases][], click **Show Database Report**, and compare **Size** with **Size to split database on**; the [Log Audit][Log Audits] records every check, as described on [DaysToSplitDatabaseOn][DaysToSplitDatabaseOn - Watch the Coming Split].

Splitting does not delete anything. Retention per [Message Type][Message Types] removes old data from the online and the archive Log Databases; see [Data Retention][Logging Service - Data Retention] on the Logging Service page.

>[!IMPORTANT]
>If you log more data than retention removes, the Log Databases keep growing until the disk is full, no matter how the data is split.

### :fa-diagram-project: How a New Log Database Is Created {#how-a-new-log-database-is-created}

When a split limit is reached, the Logging Service creates the next Log Database from these [System Parameters][]:

1. **Split**: the online Log Database is larger than `SizeToSplitDatabaseOn` or older than [DaysToSplitDatabaseOn][].
2. **Name**: the new database gets its name from the [LogDatabaseName][] pattern, with `{year}{month}{day}` set to the creation date (UTC).
3. **File placement**: data, image data, index, and transaction log files go to the folders in [LogLocations][], or to the SQL Server default locations when it is empty.
4. **Recovery model**: set from [LogDatabaseRecovery][] (`SIMPLE` or `FULL`); always `FULL` in an [Always On Availability Group][AOAG How].
5. **Access**: every account in [LogServiceUsers][] gets the database roles in [LogAccessRoles][].
6. **Always On**: on an Always On Availability Group, the Logging Service backs up the new database to [AvailabilityGroupBackupPath][], adds it to the group, and restores and joins the secondaries that use manual seeding; see [How the Logging Service Creates a Log Database in an Availability Group][AOAG How].
7. **Switch**: the new database becomes the online Log Database, and the previous one becomes an archive Log Database.

<div class="mermaid">
flowchart TD
    A["fa:fa-hard-drive Logging Service checks the online Log Database"] --> B{"Larger than SizeToSplitDatabaseOn<br/>or older than DaysToSplitDatabaseOn?"}
    B -->|"No"| A
    B -->|"Yes"| C["fa:fa-tag Name from LogDatabaseName"]
    C --> D["fa:fa-hard-drive Files placed per LogLocations"]
    D --> E["fa:fa-life-ring Recovery model from LogDatabaseRecovery"]
    E --> F["fa:fa-user-shield LogServiceUsers get LogAccessRoles"]
    F --> G{"Always On<br/>Availability Group?"}
    G -->|"Yes"| H["fa:fa-server Backup via AvailabilityGroupBackupPath<br/>add to the group, seed the secondaries"]
    G -->|"No"| I["fa:fa-database New online Log Database"]
    H --> I
    style A fill:#2678BD,color:#fff
    style H fill:#9E59BB,color:#fff
    style I fill:#93d16d,color:#000
</div>

*Diagram: simplified sequence the Logging Service follows when it creates a new Log Database. Blue: the regular check; purple: the extra step on an Always On Availability Group; green: the new online Log Database.*

Creating databases and assigning access needs elevated SQL Server rights; see [SQL Server Sysadmin Requirements][]. When your policy doesn't allow that, create the Log Databases in advance (see the FAQ below).

## :fa-lightbulb: Choosing a Value

* Keep the default `31` unless you have a reason to change it; values up to 100 GB are common. A larger Log Database takes longer to back up, reindex ([DatabaseMaintenance][]), and [update][Update Log Database].
* Make sure the disk that holds the online Log Database has enough disk space for this size plus its transaction log ([LogLocations][] decides which disk).
* [SQL Server Express][] limits a database to 50 GB from SQL Server 2025, and to 10 GB in older versions; keep the value below the limit.

## :fa-question: Frequently Asked Questions

### Can I create Log Databases in advance with planned periods?

Yes. :Nodinite: ships the Log Database as a DACPAC package; follow [Create new Log Databases manually][CreateLogDB], name the databases per [LogDatabaseName][], and grant access per [LogServiceUsers][] and [LogAccessRoles][].

## :fa-hand-point-right: Next Steps

* :fa-database: [Log Databases][]  
* :fa-list: [Manage Log Databases][]  
* :fa-pen-to-square: [Manage System Parameters][]  

## :fa-link-horizontal: Related Topics

* :fa-calendar-day: [DaysToSplitDatabaseOn][]  
* :fa-database: [LogDatabaseName][]  
* :fa-disc-drive: [LogLocations][]  
* :fa-life-ring: [LogDatabaseRecovery][]  
* :fa-user-secret: [LogAccessRoles][]  
* :fa-users-class: [LogServiceUsers][]  
* :fa-server: [AvailabilityGroupBackupPath][]  
* :fa-tools: [DatabaseMaintenance][]  
* :fa-hard-drive: [Logging Service][]  
* :fa-database: [SQL Server Options][]  
* :fa-sliders: [System Parameters][]  

[1]:{ndm}/Documentation%20Pictures/IM/CoreServices/ConfigurationDatabase/SystemParameters/SystemParameters_SizeToSplitDatabaseOn.gif

[AOAG How]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/Always%20On%20Availability%20Groups.md#how-the-logging-service-creates-a-log-database-in-an-availability-group
[AvailabilityGroupBackupPath]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/AvailabilityGroupBackupPath.md
[CreateLogDB]:{ndr}/Core%20Services/Log%20Databases/Features/Create%20new%20Log%20Databases%20Manually.md
[DatabaseMaintenance]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/DatabaseMaintenance.md
[DaysToSplitDatabaseOn]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/DaysToSplitDatabaseOn.md
[DaysToSplitDatabaseOn - Watch the Coming Split]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/DaysToSplitDatabaseOn.md#watch-the-coming-split
[Log Audits]:{ndr}/Administration/6.%20Tools/2.%20Log%20Audit%20Search.md
[Log Databases]:{ndr}/Core%20Services/Log%20Databases/Overview.md
[Log Event]:{ndr}/Core%20Services/Log%20Event/Overview.md
[LogAccessRoles]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/LogAccessRoles.md
[LogDatabaseName]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/LogDatabaseName.md
[LogDatabaseRecovery]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/LogDatabaseRecovery.md
[Logging Service]:{ndr}/Core%20Services/Logging%20Service/Overview.md
[Logging Service - Data Retention]:{ndr}/Core%20Services/Logging%20Service/Overview.md#data-retention
[LogLocations]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/LogLocations.md
[LogServiceUsers]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/LogServiceUsers.md
[Manage Log Databases]:{ndr}/Administration/5.%20Settings/2.%20Log%20Databases/Overview.md
[Manage System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Manage%20System%20Parameters.md
[Message Types]:{ndr}/Repository%20Model/Message%20Types/Overview.md
[SQL Server Express]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/SQL%20Server%20Options.md#sql-server-express
[SQL Server Options]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/SQL%20Server%20Options.md
[SQL Server Sysadmin Requirements]:{ndr}/Install%20and%20Update/Troubleshooting/SQL%20Server/SQL%20Server%20Sysadmin%20Requirements.md
[System Parameters]:{ndr}/Administration/5.%20Settings/5.%20System%20Parameters/Overview.md
[Update Log Database]:{ndr}/Administration/5.%20Settings/2.%20Log%20Databases/Update%20Log%20Database.md