Skip to content

Fix CREATE DATABASE failure when model DB has large files (#676)#678

Merged
erikdarlingdata merged 1 commit intodevfrom
fix/model-db-size-676
Mar 24, 2026
Merged

Fix CREATE DATABASE failure when model DB has large files (#676)#678
erikdarlingdata merged 1 commit intodevfrom
fix/model-db-size-676

Conversation

@erikdarlingdata
Copy link
Owner

Summary

  • Fixes [BUG] Create Database PerformanceMonitor Doesn't Account For model DB #676 — installer fails with error 1803 when model database files are larger than our hardcoded defaults (1024MB data, 256MB log)
  • Two layers of protection:
    1. Pre-check: query sys.master_files for model's file sizes, use MAX(model, default). Wrapped in TRY/CATCH for restricted permissions, NULL-safe.
    2. Retry on error 1803: if CREATE DATABASE still fails, parse the required MB from the error message (language-independent — searches for digits before " MB") and retry once.

Test plan

  • Error message parsing tested with English and German error formats
  • NULL/empty result handling verified (falls back to defaults)
  • Syntax validated on sql2022 (existing DB path)
  • Full reinstall on sql2016 (same version as reporter) — 54 files, 45 collectors, clean

🤖 Generated with Claude Code

If the model database has been configured with file sizes larger than
our defaults (1024MB data, 256MB log), CREATE DATABASE fails with
error 1803.

Two layers of protection:
1. Pre-check model file sizes via sys.master_files (TRY/CATCH for
   restricted permissions, NULL-safe fallback to defaults)
2. If CREATE DATABASE still fails with error 1803, parse the required
   size from the error message and retry once

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit bf29410 into dev Mar 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant