Correct the DB_ID finding: documented Azure behaviour, sample-code problem #1
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/db-id-wording"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What does this PR do?
Corrects the README's
DB_ID()finding. It said the behaviour "may be intended". Microsoft's DB_ID documentation confirms it: in Azure SQL Database,DB_IDreturns an ID only for the current database, and NULL for any other. The container is faithful to Azure. The problem is theIF DB_ID('appdb') IS NULL CREATE DATABASE appdb;guard in Microsoft's getting started guide and agent skills, which fails with Msg 1801 on a rerun against a persistent volume, and can wait forever inside the skills' wait loops.Fixes #
How was this tested?
Documentation change only. The behaviour it describes was verified on the lab container before this change: on a
masterconnectionDB_ID(N'appdb')returns NULL whilesys.databasesreports database_id 6, and from insideappdbDB_ID()returns 6.shellcheck scripts/*.sh compose/*.shis clean (no shell changes)sql/build-check.sqlandtests/change-tracking/Test-ChangeTracking.ps1, and stopped it (not needed for a wording change)Checklist
docker inspector the console