- 5 minutes to read

LogLocations - System Parameter

LogLocations tells the Logging Service where to place the files of each new Log Database: data, image data, index, primary, and transaction log, on one or several disks. With several configurations, the Logging Service rotates through them round-robin. It is one of the System Parameters applied in How a new Log Database is created.

Setting LogLocations in the Web Client: filter the System Parameters list, open the empty LogLocations, enter one configuration that places every file group on disk H:, Json model is valid, Save, and the saved value, animated walkthrough (7.12)
Animated walkthrough: open the empty LogLocations, enter one configuration on disk H:, see Json model is valid, and click Save. The Logging Service places the files of the next Log Database it creates in these folders.

At a Glance

Property Value
Key LogLocations
Data type json
Default Empty (null): SQL Server default locations apply
Read by Logging Service
Takes effect Within about 15 seconds; no restart needed. Applies to the next Log Database the Logging Service creates.
Status ✅ Active
Since Nodinite 4.3.0.26; renamed from ImLogLocations in Nodinite 7

How It Works

SQL Server's own settings only hold one default folder for data files and one for log files.

SQL Server Database Settings page with the default data, log, and backup locations
SQL Server Database Settings hold only the DATA, LOG, and Backup default locations.

A Nodinite Log Database has more file groups, and LogLocations lets you put each on its own disk to spread the read and write load:

File group JSON property Holds
Data CustomPathData The main tables
ImageData CustomPathImagedata Message payloads, kept apart from the event tables to reduce fragmentation
Index CustomPathIndex Clustered and other indexes
Primary DefaultPath The SQL Server primary file (not used for Nodinite data)
Log DefaultPathLog The transaction log

The recovery model of the new Log Database is set by LogDatabaseRecovery, not by this parameter.

When the value is empty, SQL Server places every file in its default locations. When it holds configurations, the Logging Service picks one for each new Log Database: the configuration with the lowest Order above LastOrderDeployed, or, when none is above, the one with the lowest Order. It creates the files in that configuration's folders and sets LastOrderDeployed to its Order. With one configuration, it always uses that one.

flowchart LR A["fa:fa-database New Log Database"] --> B{"LogLocations
set?"} B -->|"No"| C["fa:fa-folder SQL Server default locations"] B -->|"Yes"| D["fa:fa-list-ol Next configuration
by Order"] D --> E["fa:fa-hard-drive Files created in its folders"] E --> F["fa:fa-rotate LastOrderDeployed updated"] style C fill:#2678BD,color:#fff style D fill:#3F827B,color:#fff style E fill:#3F827B,color:#fff style F fill:#3F827B,color:#fff

Diagram: how the Logging Service chooses file locations for a new Log Database. Blue: SQL Server default locations (LogLocations empty); green: the LogLocations rotation.

Value Format

Property Type Default Meaning
Configurations array – One entry per disk layout; the Logging Service rotates through them.
Configurations[].CustomPathData string – Folder for the Data file group.
Configurations[].CustomPathImagedata string – Folder for the ImageData file group.
Configurations[].CustomPathIndex string – Folder for the Index file group.
Configurations[].DefaultPath string – Folder for the primary file.
Configurations[].DefaultPathLog string – Folder for the transaction log.
Configurations[].Order integer – Zero-based position of the configuration in the rotation.
LastOrderDeployed integer 0 The Order of the configuration used last; the Logging Service updates it. The next Log Database uses the next higher Order, so with 0 and Orders 0, 1, 2 it starts with Order 1. To start with Order 0, set it to the highest Order (or -1).

Paths are folders on the SQL Server host. In JSON, write each backslash twice.

Important

The JSON check in the Web Client only checks that the value fits this structure. Unknown or misspelled properties are ignored, and even {} shows Json model is valid, so compare the property names with the table above.

Example: One Disk Instead of the SQL Server Defaults

All files go to disk H:.

{
  "Configurations": [
    {
      "CustomPathData": "H:\\MSSQLSERVER\\DATA\\",
      "CustomPathImagedata": "H:\\MSSQLSERVER\\DATA\\",
      "CustomPathIndex": "H:\\MSSQLSERVER\\DATA\\",
      "DefaultPath": "H:\\MSSQLSERVER\\DATA\\",
      "DefaultPathLog": "H:\\MSSQLSERVER\\LOG\\",
      "Order": 0
    }
  ],
  "LastOrderDeployed": 0
}

Example: Four Disks in Three Rotating Configurations

Data, image data, and index rotate over K:, L:, and M:; the primary file and the transaction log stay on N:. LastOrderDeployed is 2, the highest Order, so the first new Log Database uses Order 0.

{
  "Configurations": [
    {
      "CustomPathData": "K:\\MSSQLSERVER\\DATA\\",
      "CustomPathImagedata": "L:\\MSSQLSERVER\\DATA\\",
      "CustomPathIndex": "M:\\MSSQLSERVER\\DATA\\",
      "DefaultPath": "N:\\MSSQLSERVER\\DATA\\",
      "DefaultPathLog": "N:\\MSSQLSERVER\\LOG\\",
      "Order": 0
    },
    {
      "CustomPathData": "M:\\MSSQLSERVER\\DATA\\",
      "CustomPathImagedata": "K:\\MSSQLSERVER\\DATA\\",
      "CustomPathIndex": "L:\\MSSQLSERVER\\DATA\\",
      "DefaultPath": "N:\\MSSQLSERVER\\DATA\\",
      "DefaultPathLog": "N:\\MSSQLSERVER\\LOG\\",
      "Order": 1
    },
    {
      "CustomPathData": "L:\\MSSQLSERVER\\DATA\\",
      "CustomPathImagedata": "M:\\MSSQLSERVER\\DATA\\",
      "CustomPathIndex": "K:\\MSSQLSERVER\\DATA\\",
      "DefaultPath": "N:\\MSSQLSERVER\\DATA\\",
      "DefaultPathLog": "N:\\MSSQLSERVER\\LOG\\",
      "Order": 2
    }
  ],
  "LastOrderDeployed": 2
}

Edit page of the LogLocations System Parameter with Save in the page toolbar, the one-disk example on H:, the whole JSON visible, Json model is valid, Data type json, and the Save, Save and close, and Cancel buttons (7.12)
The one-disk example entered in the Web Client: it overrides the SQL Server default locations for new Log Databases.

Choosing a Value

  • Leave it empty when the SQL Server default locations are fine. To go back to them later, clear Value and click Save; an empty value shows no JSON check.
  • Create the folders on the SQL Server host first, and make sure the SQL Server service account can write to them.
  • Agree on the disk layout with your DBA; see SQL Server Sysadmin Requirements for coordinating file locations with DBA policy.
  • Size each disk for at least one full Log Database (SizeToSplitDatabaseOn).

Next Steps