- 15 minutes to read

Update Log Database

Maintain your Nodinite Log Databases with confidence using the Update Guide in the Nodinite Web Client. This comprehensive guide empowers SQL DBAs and Nodinite administrators to:

  • ✅ Safely update Log Database schemas to the latest version
  • ✅ Manage SQL Server recovery modes (SIMPLE/FULL) automatically
  • ✅ Verify Logging Service permissions by running scripts with service credentials
  • ✅ Apply database updates to both Active and Archive Log Databases
  • ✅ Minimize downtime with step-by-step service management

Important

This guide applies to Nodinite version 7.2.0 and later. Nodinite v6 is no longer supported; to move a v6 installation, follow Updating from v6 to v7.

Note

From time to time, Nodinite releases database schema updates to improve performance, add features, or optimize indexing. The Update Guide automates script generation based on your SQL Server configuration.

Navigate to Update Guide

To access the Update Guide for Log Databases:

  1. Log on to the Nodinite Web Client.
  2. Navigate to Administration | Settings | Log Databases.
  3. Check whether the current Log Databases list shows an update is available.
    Log Databases list with an update arrow in the Version column of a Log Database
    An arrow next to the version means the schema is older than the one shipped with your Nodinite version.
  4. Click the Update Guide button at the top of the page.
    Update Guide button at the top of the Log Databases administration page
    The Update Guide button sits next to Add Log Database.

The Update Guide will analyze your current Log Databases and detect if any schema updates are available.

Update Prerequisites

Before starting the update process, ensure you have:

  • SQL Server access – Administrative permissions on the SQL Server hosting the Log Databases.
  • Backup completed – Always backup your databases before applying schema changes.
  • Maintenance window – Schedule updates during low-activity periods to minimize impact.
  • Logging Service credentials – Access to the Windows account running the Logging Service.
  • .DACPAC file access – Default file: C:\Program Files\Nodinite\{EnvironmentName}\LoggingService\Nodinite.LogDatabase.dacpac (where {EnvironmentName} is your EnvironmentName like DEMO, Production, or Test).
  • Latest SqlPackage.exe (DACFX) – Its path is in the SqlPackageExecutable System Parameter.

Tip

If the database is in FULL recovery mode, you can temporarily change to SIMPLE recovery mode to speed up the update process. The Nodinite Update Guide respects the LogDatabaseRecovery system parameter.

LogDatabaseRecovery System Parameter

The Update Guide automatically generates scripts based on the LogDatabaseRecovery System Parameter. This parameter determines the SQL Server recovery mode applied to Log Databases:

SQL Environment Recovery Mode
Always On Availability Groups (AOAG) FULL
Standalone or Failover Cluster SIMPLE
  • The Logging Service uses this value when creating new Log Databases.
  • The Update Guide uses this value to set the recovery mode flag when applying schema updates with the .DACPAC file.

Important

If you change the LogDatabaseRecovery system parameter, the Update Guide will automatically apply the new recovery mode for future updates. Existing databases are not automatically changed.

Learn more in the LogDatabaseRecovery System Parameter documentation.

Update Process Overview

The Update Guide provides a five-step wizard to safely update your Log Databases:

  1. Stop Logging/Monitoring Services – Prevent active database writes during schema updates.
  2. Put Archive Databases into Read-Only Mode – Protect historical data from accidental modifications.
  3. Command Line Scripts – Generate and execute SqlPackage.exe commands to apply schema updates.
  4. Set Archive Databases Back from Read-Only Mode – Re-enable write access to Archive databases.
  5. Restart Services – Resume normal operations.
graph LR S1["fa:fa-stop Step 1
Stop Logging and
Monitoring Services"] --> S2["fa:fa-lock Step 2
Archive databases
read-only"] S2 --> S3["fa:fa-terminal Step 3
Run SqlPackage.exe
scripts"] S3 --> S4["fa:fa-lock-open Step 4
Archive databases
read-write"] S4 --> S5["fa:fa-play Step 5
Restart services"] style S1 fill:#c33d34,color:#fff style S2 fill:#9E59BB,color:#fff style S3 fill:#E47528,color:#fff style S4 fill:#9E59BB,color:#fff style S5 fill:#93d16d,color:#000

Red: no data is collected while the services are stopped. Purple: archive databases are protected and then released. Orange: the schema update itself, run by you outside the Web Client. Green: normal operation resumes.

Log Database Update Guide page with the five collapsible steps
The Update Guide in the Web Client: open each step in order, and run the active and archive databases separately.

Step 1: Stop Logging/Monitoring Services

Before applying database schema changes, stop the Nodinite Logging Service and Monitoring Service to prevent active writes to the databases. Use the Stop Services button for this; the MaintenanceMode System Parameter is a Web API flag and does not pause the services.

In the Update Guide, do the following:

  1. Click the Stop button.
  2. Wait for confirmation that both services have stopped successfully.

Update Guide Step 1 with the Stop button and LoggingService and MonitoringService shown as Running
Before you click Stop, both services report Running.

Warning

No new logs or monitor data will be collected while services are stopped. Schedule updates during maintenance windows.

Once the services have stopped, you can proceed to the next step.
Update Guide Step 1 with LoggingService and MonitoringService shown as Paused
Both services report Paused; the Next button is now enabled.

Click the Next button to proceed to Step 2.

Step 2: Put Archive Databases into Read-Only Mode

Setting Archive Log Databases to read-only mode ensures historical data is protected during the schema update process.

In the Update Guide, do the following:

  1. Click the Set Read-Only button.
  2. The Update Guide will execute SQL commands to set all Archive databases to read-only mode.

Update Guide Step 2 with the button that puts archive databases into read-only mode
Step 2 acts on archive databases only.

Note

The Active Log Database is not set to read-only, as it must remain writable to apply schema changes.

Once the read-only mode has been set, you can proceed to the next step.
Update Guide Step 2 success message after archive databases were set to read-only
The success message confirms that the archive databases are protected.

Click the Next button to proceed to Step 3.

Step 3: Command Line Scripts

In this step, the Update Guide generates SqlPackage.exe command-line scripts for updating database schemas, and you execute them to apply the changes.

Warning

Disk Space Management: Schema updates may allocate significant disk space. After completing all updates, consider running SHRINK operations on the Log Databases to release allocated disk space back to the system. Plan for adequate free disk space before starting (at least 50% of current database size).

[!IMPORTANT] You must use the latest version of DACFX (SqlPackage.exe). The Update Guide uses advanced parameters that are only available in recent DACFX versions. The latest DACFX version works with all SQL Server versions (2008 R2 through 2025). Configure the SqlPackage.exe path in the SqlPackageExecutable system parameter.

Settings

The Update Guide uses the following settings to build the command-line scripts:

Dacpac Executable File Path

Despite its label, this field holds the folder of the .dacpac file, by default C:\Program Files\Nodinite\<EnvironmentName>\LoggingService. The path to SqlPackage.exe itself comes from the SqlPackageExecutable System Parameter, for example C:\Program Files\Microsoft SQL Server\170\DAC\bin\SqlPackage.exe.

Configuration Options

  • Encryption – Source Connection and Target Connection (enabled by default)
  • Trust Certificate – Source Server Certificate and Target Server Certificate (enabled by default)
  • Use Integrated Security – Uses Windows Authentication for SQL Server connections (enabled by default)
  • Ignore DACPAC Options – Advanced option to skip certain DACPAC deployment properties

Tip

The default settings work for most environments. Only modify these if you have specific security or authentication requirements.

Commands

The Update Guide provides scripts for:

  • Active Database – The current database actively receiving new log events.
  • Archive Databases – Historical databases containing older log data (if any exist and require updates).

Update Guide Step 3 with Settings, Encryption and Trust Certificate options, and the Active Database and Archive Databases commands
Changing a setting rebuilds the commands; copy them with the Copy button.

Understanding the Generated Scripts

The scripts use SqlPackage.exe (part of SQL Server Data-Tier Application Framework) to deploy the .DACPAC file to your databases.

Example Script for the Active Database

"C:\Program Files\Microsoft SQL Server\170\DAC\bin\SqlPackage.exe" /Action:Publish /SourceFile:"C:\Program Files\Nodinite\DEMO\LoggingService\Nodinite.LogDatabase.dacpac" /TargetServerName:"localhost" /TargetDatabaseName:"Nodinite_DEMO_Log" /SourceEncryptConnection:true /TargetEncryptConnection:true /SourceTrustServerCertificate:true /TargetTrustServerCertificate:true /Properties:RegisterDataTierApplication=True /Properties:BlockOnPossibleDataLoss=False /Properties:BlockWhenDriftDetected=False /Properties:DropIndexesNotInSource=True /Properties:DropConstraintsNotInSource=True /Properties:ScriptNewConstraintValidation=False /Properties:PopulateFilesOnFilegroups=False /v:CustomPathData="null" /v:CustomPathImagedata="null" /v:CustomPathIndex="null" /v:RecoveryMode="FULL"

Note

Replace DEMO with your actual environment name (e.g., Production, Test). Replace localhost with your SQL Server name. The /v:RecoveryMode parameter is automatically set by the Update Guide based on the LogDatabaseRecovery system parameter value (SIMPLE or FULL).

Key Script Parameters

  • /Action:Publish – Deploys the .DACPAC schema to the target database.
  • /SourceFile – Path to the .DACPAC file (Nodinite.LogDatabase.dacpac).
  • /TargetServerName – SQL Server instance name (e.g., localhost, SQL-SERVER-01).
  • /TargetDatabaseName – Name of the Log Database to update (e.g., Nodinite_DEMO_Log).
  • /SourceEncryptConnection:true / /TargetEncryptConnection:true – Encrypt connections to SQL Server (recommended for security).
  • /SourceTrustServerCertificate:true / /TargetTrustServerCertificate:true – Trust SQL Server certificates (required for self-signed certificates).
  • /Properties:BlockOnPossibleDataLoss=False – Allows schema changes that might result in data loss (use with caution).
  • /Properties:DropIndexesNotInSource=True – Removes indexes not defined in the .DACPAC (ensures schema consistency).
  • /Properties:DropConstraintsNotInSource=True – Removes constraints not defined in the .DACPAC.
  • /v:RecoveryMode – Critical: Sets the database recovery mode (SIMPLE or FULL) based on the LogDatabaseRecovery system parameter. The Update Guide automatically sets this value.

Customizing Scripts for Your Environment

You may need to customize the generated scripts in the following scenarios:

Scenario 1: Running scripts from a different server

If you need to run the update from a different SQL Server or workstation, copy the .DACPAC file to the target machine:

REM Copy .DACPAC file to SQL Server (replace DEMO with your environment name)
copy "C:\Program Files\Nodinite\DEMO\LoggingService\Nodinite.LogDatabase.dacpac" "\\SQL-SERVER-01\C$\Temp\Nodinite.LogDatabase.dacpac"

REM Update script to reference new location
"C:\Program Files\Microsoft SQL Server\170\DAC\bin\SqlPackage.exe" /Action:Publish /SourceFile:"C:\Temp\Nodinite.LogDatabase.dacpac" /TargetServerName:"SQL-SERVER-01" /TargetDatabaseName:"Nodinite_DEMO_Log" /SourceEncryptConnection:true /TargetEncryptConnection:true /SourceTrustServerCertificate:true /TargetTrustServerCertificate:true /v:RecoveryMode="FULL"

Scenario 2: Using SQL Server authentication instead of Windows authentication

If your environment uses SQL Server authentication, clear Use Integrated Security and add the authentication parameters to the generated command:

/TargetUser:"sa" /TargetPassword:"YourSecurePassword"

Scenario 3: SQL Server Always On Availability Groups (AOAG)

For AOAG environments, you may need to:

  1. Temporarily remove the database from the availability group.
  2. Apply the schema update to the primary replica.
  3. Allow AOAG to synchronize changes to secondary replicas.
  4. Re-add the database to the availability group.

Tip

Consult your SQL Server DBA for AOAG-specific update procedures.

Scenario 4: Custom .DACPAC file location

If you have copied the .DACPAC file to a different folder, update the /SourceFile parameter:

/SourceFile:"D:\NodiniteBackups\DACPACs\Nodinite.LogDatabase.dacpac"

Copy and Execute Scripts

  1. Copy the Active Database script from the left panel by clicking the Copy button.
  2. Copy the Archive Databases script from the right panel (this single script contains commands for all archive databases).
  3. Execute the scripts to apply the database schema updates.

Note

If you have no Archive databases, or none that require updates, the Archive Databases panel will show: "No archive databases found, or none that require updates."

[!TIP] If you have many Archive databases (50+), the Archive Databases script will be very large as it contains one SqlPackage.exe command per archive database. You can execute the entire script at once, or split it into smaller batches.

[!IMPORTANT] Execute the commands above using a command prompt (cmd.exe) running as the Nodinite Logging Service account, or as a SQL Server sysadmin user.

Use SQL Server Sysadmin Requirements when coordinating this with DBA/security policy, including non-sysadmin fallback actions.

Running as the Logging Service account ensures the service has proper SQL Server access rights for future automated database operations.

Run the scripts locally on the Nodinite Application Server, using the Logging Service credentials.

Why This Approach

  • Verifies permissions – Confirms the Logging Service has proper SQL Server access rights.
  • Future-proofs deployments – The Logging Service may automatically spawn new Log Databases when the Active database grows too large or reaches a time-based retention threshold (controlled by System Parameters).
  • Security best practice – Ensures service account has minimal required permissions.

Execution Steps

Step 3.1: Open an elevated Command Prompt

  1. On the Nodinite Application Server, open Command Prompt as Administrator.
  2. Optionally, run the command prompt as the Logging Service user account using runas:
runas /user:DOMAIN\NodiniteLogSvc cmd.exe

Tip

Alternatively, you can run the commands as a SQL Server sysadmin user if you have those credentials.

For policy-aligned alternatives and maintenance implications, review SQL Server Sysadmin Requirements.

Step 3.2: Navigate to the SqlPackage.exe directory

cd "C:\Program Files\Microsoft SQL Server\170\DAC\bin"

Important

Always use the latest version of SqlPackage.exe (typically from SQL Server 2025 or 2022). The generated scripts use advanced parameters that require a recent DACFX version. Newer DACFX versions work with all SQL Server database versions (2008 R2 through 2025). The path is configured in the SqlPackageExecutable system parameter. Common paths:

  • SQL Server 2025 (recommended): C:\Program Files\Microsoft SQL Server\170\DAC\bin
  • SQL Server 2022: C:\Program Files\Microsoft SQL Server\160\DAC\bin

The encryption and certificate trust options in the generated scripts (/TargetEncryptConnection, /TargetTrustServerCertificate, and their Source counterparts) are the same kind of options the Logging Service takes from the SqlPackageParams System Parameter when it creates new Log Databases.

Step 3.3: Execute the Active Log Database script

Paste and execute the script you copied for the Active Log Database. It looks like the example script above, with your server, database, and environment names already filled in.

Important

The /v:RecoveryMode parameter value (SIMPLE or FULL) is automatically set by the Update Guide based on your LogDatabaseRecovery system parameter. Do not change this value manually unless you understand the implications for your SQL Server environment.

Expected output:

Importing to database 'NodiniteLog' on server 'SQL-SERVER-01'.
Creating deployment plan
Initializing deployment
Verifying deployment plan
Analyzing deployment plan
Updating database
Successfully published database.

Step 3.4: Execute the Archive Log Database scripts

Repeat Step 3.3 for each Archive Log Database script.

Important

If you encounter errors during script execution, do not proceed. Review the error messages, consult your SQL Server DBA, and resolve issues before continuing.

Common Errors and Solutions

Error Message Cause Solution
Login failed for user 'DOMAIN\NodiniteLogSvc' Logging Service account lacks SQL Server permissions. See Logging Service prerequisites for required permissions.
Cannot find file: Nodinite.LogDatabase.dacpac .DACPAC file path is incorrect. Verify the file exists at the specified path. Copy from installation folder if needed.
Database is in use Active connections exist to the database. Ensure Logging/Monitoring Services are stopped. Close any open SQL Server Management Studio connections.
Timeout expired Large database or slow server. Increase the timeout value in the connection string: Connection Timeout=300;

Click the Next button in the Update Guide to proceed to Step 4.

Step 4: Set Archive Databases Back from Read-Only Mode

After successfully applying schema updates, restore Archive Log Databases to read-write mode.

In the Update Guide, do the following:

  1. Click the Set Read-Write button.
  2. The Update Guide will execute SQL commands to restore Archive databases to read-write mode.

Update Guide Step 4 with the button that sets archive databases back from read-only mode
Archive databases you had set read-only on purpose before the update need to be set read-only again afterwards on the Log Database form.

Note

The Active Log Database remains in read-write mode throughout the process.

If the operation is successful, the Update Guide will display a success message.
Update Guide Step 4 success message after archive databases were set back to read-write
The success message confirms that maintenance can reach the archive databases again.

Click the Next button to proceed to Step 5.

Step 5: Restart Services

Resume normal Nodinite operations by starting the Logging Service and Monitoring Service.

In the Update Guide, do the following:

  1. Click the Start button.
    Update Guide Step 5 with the Start button while both services are still paused
    Both services are still paused until you click Start.
  2. Wait for confirmation that both services have started successfully.
    Update Guide Step 5 with LoggingService and MonitoringService shown as Running again
    Both services report Running; logging and monitoring resume.

Tip

After starting the services, verify that log collection works: open a Log View and confirm that new log events arrive.

Frequently Asked Questions

Do I need to update all Archive databases?

Yes. All Archive Log Databases should use the same schema version as the Active database to ensure consistency and prevent errors when querying historical data.

What if I have 50+ Archive databases?

The Update Guide generates one large script containing all SqlPackage.exe commands for all Archive databases. For environments with many archives, consider:

  1. Execute the entire script – Run the generated script as-is. It will update all archives sequentially.
  2. Staged rollout – Edit the script to update critical/recent archives first, then older archives during subsequent maintenance windows.
  3. Archival strategy review – Evaluate if older archives can be exported and removed from active SQL Server to reduce update time.

Can I skip updating Archive databases?

Not recommended. Skipping Archive database updates may cause:

  • Query errors when searching historical log data.
  • Incompatibility with new Nodinite features that rely on schema changes.
  • Difficulty troubleshooting issues across Active and Archive databases.

How long does the update process take?

Update duration depends on:

  • Database size – Larger databases take longer (expect 1-5 minutes per database).
  • SQL Server performance – Faster servers complete updates more quickly.
  • Number of Archive databases – More archives = longer total time.

Typical Update Times

  • Active database (10 GB): 2-5 minutes
  • Archive database (50 GB): 5-15 minutes
  • Total for 10 databases: 30-90 minutes

What if the Logging Service account doesn't have permissions?

If the Logging Service account lacks SQL Server permissions, refer to the Logging Service prerequisites documentation for detailed instructions on granting the required permissions.

As an alternative, run the scripts using a SQL Server sa account or domain administrator with elevated privileges. However, this does not verify that the Logging Service account has proper permissions for future automated database operations.

Do I need to restart the Nodinite Application Server?

No. Restarting the server is not required. Only the Logging Service and Monitoring Service need to be stopped and restarted.

How do I reclaim disk space after updates?

Database schema updates may allocate additional disk space that remains allocated even after the update completes. Nodinite can automatically reclaim disk space through the DatabaseMaintenance system parameter, or you can perform manual shrink operations.

Enable the DatabaseMaintenance system parameter to allow the Logging Service to automatically shrink Archive databases during scheduled maintenance (03:00-04:00 AM):

  • Set DatabaseMaintenance = true (default)
  • Ensure the Logging Service account has the sysadmin role (required for shrink operations)
  • Nodinite automatically reindexes and shrinks Archive databases as needed

Note

The Active database is only reindexed (never shrunk) to maintain optimal write performance.

Option 2: Manual shrink operations

If you prefer manual control or have disabled automated maintenance, run SQL Server SHRINK operations on each updated database:

-- Shrink database to release unused space
USE [Nodinite_DEMO_Log]
GO
DBCC SHRINKDATABASE ([Nodinite_DEMO_Log], 10)
GO

Tip

Schedule SHRINK operations during maintenance windows, as they can be resource-intensive and may cause temporary performance degradation.

[!NOTE] The 10 parameter leaves 10% free space in the database for future growth. Adjust based on your database growth patterns.

Next Steps

Database Management

System Configuration

Core Services