Skip to content

[BUG] PerformanceMonitorInstaller-2.2.0 failed and deleted the existing PerformanceMonitor database #538

@ghauan

Description

@ghauan

Component

Installer (GUI)

Performance Monitor Version

2.2.0

SQL Server Version

Microsoft SQL Server 2019 (RTM-CU32) (KB5054833) - 15.0.4430.1 (X64)

Windows Version

Windows server 2016 (on the sql box)

Describe the Bug

Not sure if it counts as a bug, but here is what happend:
Ran the install via the GUI for version 2.2.0. It reported before install that I had version 1.3.0 installed (this was wrong, as I had version 2.1.0 installed. This was due to the previous bug where the version number would not be updated when using the GUI installer.)

Started the install process, and after running for some time, it failed. After this, the entire PerformanceMonitor database had been deleted. (I did not chose clean install)

Steps to Reproduce

Open the GUI installer and run it for a server where a previous install had been done using the GUI installer.

Expected Behavior

Installation success and excisint data compressed.

Actual Behavior

Installation failed, PerformanceMonitor database gone.

Error Messages / Log Output

================================================================================
Performance Monitor Installation Report
================================================================================

INSTALLATION SUMMARY
--------------------------------------------------------------------------------
Status:              FAILED
Start Time:          2026-03-12 20:44:03
End Time:            2026-03-12 20:44:30
Duration:            26,5 seconds
Files Executed:      1
Files Failed:        1

SERVER INFORMATION
--------------------------------------------------------------------------------
Server Name:         SERVERNAME-HERE
SQL Server Edition:  Enterprise Edition (64-bit)

SQL Server Version:
  Microsoft SQL Server 2019 (RTM-CU32) (KB5054833) - 15.0.4430.1 (X64)
  Feb 21 2025 17:28:26
  Copyright (C) 2019 Microsoft Corporation
  Enterprise Edition (64-bit) on Windows Server 2016 Standard 10.0 <X64> (Build 14393: ) (Hypervisor)

INSTALLER INFORMATION
--------------------------------------------------------------------------------
Installer Version:   2.2.0+8ed7a95c6484fda201bfe6f0c56931dc28091a50
Working Directory:   D:\PerformanceMonitor\PerformanceMonitorInstaller-2.2.0
Machine Name:        APP-SERVERNAME
User Name:           my_username

ERRORS
--------------------------------------------------------------------------------
File: 01_install_database.sql
Error: Batch 2 failed:
/*
██████╗ ███████╗██████╗ ███████╗ ██████╗ ██████╗ ███╗   ███╗ █████╗ ███╗   ██╗ ██████╗███████╗
██╔══██╗██╔════╝██╔══██╗██╔════╝██╔═══██╗██╔══██╗████╗ ████║██╔══██╗████╗  ██║██╔════╝██╔════╝
██████╔╝█████╗  ██████╔╝█████╗  ██║   ██║██████╔╝██╔████╔██║███████║██╔██╗ ██║██║     █████╗  
██╔═══╝ ██╔══╝  ██╔══██╗██╔══╝  ██║   ██║██╔══██╗██║╚██╔╝██║██╔══██║██║╚██╗██║██║     ██╔══╝  
██║     ███████╗██║  ██║██║     ╚██████╔╝██║  ██║██║ ╚═╝ ██║██║  ██║██║ ╚████║╚██████╗███████╗
...

DETAILED INSTALLATION LOG
--------------------------------------------------------------------------------
Performance Monitor Installer v2.2.0+8ed7a95c6484fda201bfe6f0c56931dc28091a50
Copyright (c) 2026 Darling Data, LLC
Found 3 upgrade(s) to apply
Applying upgrade: 1.3.0-to-2.0.0
[OK]   01_memory_grant_stats_schema.sql - Success
[OK]   02_session_wait_stats_cleanup.sql - Success
[OK]   03_default_trace_schema.sql - Success
[OK] Upgrade 1.3.0-to-2.0.0: 3 succeeded, 0 failed
Applying upgrade: 2.0.0-to-2.1.0
[OK]   01_collection_schedule_optional_text.sql - Success
[OK]   02_default_trace_events_new_columns.sql - Success
[OK] Upgrade 2.0.0-to-2.1.0: 2 succeeded, 0 failed
Applying upgrade: 2.1.0-to-2.2.0
[ERROR]   01_compress_query_stats.sql - FAILED: Batch 6 failed:
BEGIN TRY

    /*
    Step 1: Create the _new table with compressed column types
    */
    IF OBJECT_ID(N'collect.query_stats_new', N'U') IS NOT NULL
    BEGIN
        DROP TABLE collect.query_stats_new;
        PRINT 'Dropped existing collect.query_stats_new';
    END;

    CREATE TABLE
        collect.query_stats_new
    (
        collection_id bigint IDENTITY NOT NULL,
        collection_time datetime2(7) NOT NULL
            DEFAULT SYSDATETIME(),
        server_start_time ... [truncated, total length: 11086]

Original error: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
Operation cancelled by user.
Created collect.query_stats_new
Checking identity information: current identity value 'NULL'.
DBCC execution completed. If DBCC printed error messages, contact your system administrator.
Reseeded IDENTITY to 2656731
 
Migrating data in batches of 10000...
  Migrated 10000 rows so far...
  Migrated 20000 rows so far...
  Migrated 30000 rows so far...
  Migrated 40000 rows so far...
  Migrated 50000 rows so far...
  Migrated 60000 rows so far...
  Migrated 70000 rows so far...
  Migrated 80000 rows so far...
  Migrated 90000 rows so far...
  Migrated 100000 rows so far...
  Migrated 110000 rows so far...
  Migrated 120000 rows so far...
The statement has been terminated.
[OK]   02_compress_query_store_data.sql - Success
[OK]   03_compress_procedure_stats.sql - Success
[OK]   04_create_tracking_tables.sql - Success
[OK]   05_add_finops_collectors.sql - Success
[WARN] Upgrade 2.1.0-to-2.2.0: 4 succeeded, 1 failed
Starting installation...
Executing 00_uninstall.sql...
[OK] 00_uninstall.sql - Success
Executing 01_install_database.sql...
[ERROR] 01_install_database.sql - FAILED: Batch 2 failed:
/*
██████╗ ███████╗██████╗ ███████╗ ██████╗ ██████╗ ███╗   ███╗ █████╗ ███╗   ██╗ ██████╗███████╗
██╔══██╗██╔════╝██╔══██╗██╔════╝██╔═══██╗██╔══██╗████╗ ████║██╔══██╗████╗  ██║██╔════╝██╔════╝
██████╔╝█████╗  ██████╔╝█████╗  ██║   ██║██████╔╝██╔████╔██║███████║██╔██╗ ██║██║     █████╗  
██╔═══╝ ██╔══╝  ██╔══██╗██╔══╝  ██║   ██║██╔══██╗██║╚██╔╝██║██╔══██║██║╚██╗██║██║     ██╔══╝  
██║     ███████╗██║  ██║██║     ╚██████╔╝██║  ██║██║ ╚═╝ ██║██║  ██║██║ ╚████║╚██████╗███████╗
╚═╝     ╚══════╝... [truncated, total length: 3612]

Original error: Could not obtain exclusive lock on database 'model'. Retry the operation later.
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
User does not have permission to alter database 'PerformanceMonitor', the database does not exist, or the database is not in a state that allows access checks.
ALTER DATABASE statement failed.
Created PerformanceMonitor database at d:\data\PerformanceMonitor.mdf
[ERROR] Critical installation file failed. Aborting installation.

================================================================================
Generated by Performance Monitor Installer GUI
Copyright (c) 2026 Darling Data, LLC
================================================================================

Screenshots

Image

Additional Context

The existing PerformanceMonitor database was pretty big (about 240 GB).
I tried this install on a testserver with a very small PerformanceMonitor database before this, and that installed normally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions