- 4 minutes to read

SizeToSplitDatabaseOn - System Parameter

SizeToSplitDatabaseOn sets the maximum size, in GB, of the online Log Database. 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)
Animated walkthrough: with the limit lowered to 1 GB, the next check creates a new Log Database, and the Log Audit 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).

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

How It Works

Nodinite spreads logged data over several Log Databases. New Log Events 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 records every check, as described on DaysToSplitDatabaseOn.

Splitting does not delete anything. Retention per Message Type removes old data from the online and the archive Log Databases; see 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.

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.
  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.
  7. Switch: the new database becomes the online Log Database, and the previous one becomes an archive Log Database.
flowchart TD A["fa:fa-hard-drive Logging Service checks the online Log Database"] --> B{"Larger than SizeToSplitDatabaseOn
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
Availability Group?"} G -->|"Yes"| H["fa:fa-server Backup via AvailabilityGroupBackupPath
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

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).

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.
  • 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 10 GB, so set a lower value on Express.

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, name the databases per LogDatabaseName, and grant access per LogServiceUsers and LogAccessRoles.

Next Steps