Skip to content

Fix mssql-techempower Linux initialization for sqlcmd v18 and deterministic startup - #2197

Merged
sebastienros merged 4 commits into
mainfrom
copilot/fix-mssql-techempower-docker-image
Aug 19, 2026
Merged

Fix mssql-techempower Linux initialization for sqlcmd v18 and deterministic startup#2197
sebastienros merged 4 commits into
mainfrom
copilot/fix-mssql-techempower-docker-image

Conversation

Copilot AI commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

The SQL Server TechEmpower image was starting the engine but failing DB bootstrap because sqlcmd moved to mssql-tools18, leaving hello_world/world/fortune uninitialized. This updates startup/import behavior to be ODBC 18 compatible, readiness-driven, and fail-fast on init errors.

  • Startup/import reliability

    • import-data.sh now uses /opt/mssql-tools18/bin/sqlcmd with ODBC 18 TLS option -C.
    • Replaced fixed sleep 20s with bounded readiness polling (SELECT 1) and explicit timeout failure.
    • Added -b so SQL execution errors return non-zero instead of continuing silently.
  • Container failure semantics

    • entrypoint.sh now supervises sqlservr + import flow so initialization failure terminates container startup (non-zero) instead of leaving a running but uninitialized instance.
  • TechEmpower dataset alignment

    • Updated create.sql world value generation from 0..9999 to canonical inclusive 1..10000.
    • Preserved required dataset shape: 10,000 world rows and 12 standard fortune rows.
  • Tooling-path drift guard

    • Added a lightweight Dockerfile check for expected sqlcmd path presence (/opt/mssql-tools18/bin/sqlcmd) to catch base-image path regressions early.
# import-data.sh (core behavior)
sqlcmd_path="/opt/mssql-tools18/bin/sqlcmd"
sqlcmd=("$sqlcmd_path" -S localhost -U sa -P "$SA_PASSWORD" -C)

"${sqlcmd[@]}" -l 1 -Q "SELECT 1"   # readiness probe (retry/timeout loop)
"${sqlcmd[@]}" -b -d master -i create.sql

Copilot AI changed the title [WIP] Fix Linux SQL Server TechEmpower benchmark Docker image startup failure Fix mssql-techempower Linux initialization for sqlcmd v18 and deterministic startup Aug 18, 2026
Copilot AI requested a review from sebastienros August 18, 2026 22:43
@sebastienros
sebastienros marked this pull request as ready for review August 18, 2026 22:43
@@ -1 +1 @@
FROM mcr.microsoft.com/mssql/server:2019-latest

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can be updated later to a newer version

@sebastienros
sebastienros merged commit 2c03e27 into main Aug 19, 2026
2 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.

3 participants