- 3 minutes to read

SizeToSplitDatabaseOn - System Parameter

SizeToSplitDatabaseOn sets the maximum size, in GB, of the online Log Database. When the online Log Database grows past this size, the Logging Service creates a new online Log Database, and the previous one becomes an archive Log Database.

At a Glance

Property Value
Key SizeToSplitDatabaseOn
Data type integer (GB)
Default 50
Read by Logging Service
Takes effect Within about 15 seconds; no restart needed. Applies the next time the Logging Service checks the online Log Database.
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.

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.
  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).
  5. Access: every account in LogServiceUsers gets the database roles in LogAccessRoles.
  6. Always On: on an Always On Availability Group, the Logging Service uses the share in AvailabilityGroupBackupPath for the backup that the secondary replicas restore.
  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"] G -- No --> I["fa:fa-database New online Log Database"] H --> I

Diagram: simplified sequence the Logging Service follows when it creates a new 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 50 unless you have a reason to change it; values between 50 and 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