[Bug]: changing recovery model en database configuration
@ericjulien ci sta già lavorando.
Dal 6/8/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Container image tag
sqldbpreview-dpgaeqhmgphzd4bk.azurecr.io/azure-sql/db-dev:latest
Host OS
Windows 11 (x86_64)
Container runtime and version
(build 2026-07-16, EngineEdition = 5, ProductVersion 12.0.2000.8)
What happened
alter database recovery model should not be allowed into sql-azure-container databases to match cloud version.
Additionally, after changing a database's recovery model with ALTER DATABASE ... SET RECOVERY, sys.databases reports inconsistent values for the same database depending on which database the query runs from:
Queried from master → returns the actual value that was set (e.g. BULK_LOGGED).
Queried from within the user database → always returns FULL, regardless of what was set.
seems hardcoded.
Steps to reproduce
-- 1) Create a database and change its recovery model (from a master connection)
CREATE DATABASE recotest;
GO
ALTER DATABASE recotest SET RECOVERY BULK_LOGGED;
GO
-- 2) Read it from master -> returns BULK_LOGGED (the real value)
SELECT recovery_model_desc
FROM sys.databases
WHERE name = 'recotest';
GO
-- 3) Now connect WITH Database=recotest and read the SAME view
-- (e.g. sqlcmd ... -d recotest) -> returns FULL (inconsistent!)
SELECT recovery_model_desc
FROM sys.databases
WHERE database_id = DB_ID();
GO
Expected: both queries return the same value (BULK_LOGGED).
Actual: master returns BULK_LOGGED, the user-database connection returns FULL.
Same thing via sqlcmd against the container, to show the context dependency:
docker exec /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P -C -d master -Q "SELECT recovery_model_desc FROM sys.databases WHERE name='recotest';"
-> BULK_LOGGED
docker exec /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P -C -d recotest -Q "SELECT recovery_model_desc FROM sys.databases WHERE database_id=DB_ID();"
-> FULL
Additional context
No response
Confirmation
- I scanned open issues and Known limitations for a duplicate.
- Lingua principale
- Shell
- Stelle
- 19
- Fork
- 6
- Merge medio
- 5g 5h
- PR unite (30g)
- 4
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/azure-sql-database-container
-
[Bug]: BLOB STORAGE EXTERNAL DATA SOURCE causes A severe error occurred on the current command. The results, if any, should be discarded.Forse già presa @ericjulien l’ha presa 20 giorni fa. Apertabug needs-triage User-filled
Difficoltà 4/5 3-5 giorni Idoneità per principianti 44/100
microsoft/azure-sql-database-container#160 · 2 assegnatari ·
-
[Bug]: container images do not refreshed in almost 30 daysForse di nuovo libera @ericjulien l’ha presa 48 giorni fa e non c’è nessuna pull request aperta. Apertabug User-filled
microsoft/azure-sql-database-container#141 · 1 commento · 2 assegnatari ·
-
[Bug]: An error occurs when importing bacpacForse di nuovo libera @ericjulien l’ha presa 55 giorni fa e non c’è nessuna pull request aperta. Apertabug User-filled
microsoft/azure-sql-database-container#140 · 2 assegnatari ·
-
[Bug]: All the database names in `sys.databases` are set to “master”Forse di nuovo libera @ericjulien l’ha presa 48 giorni fa e non c’è nessuna pull request aperta. Apertabug needs-triage User-filled
microsoft/azure-sql-database-container#139 · 1 assegnatario ·
-
[Feature]: Native DB creation + seeding supportForse di nuovo libera @ascarter l’ha presa 62 giorni fa e non c’è nessuna pull request aperta. Apertaenhancement User-filled
microsoft/azure-sql-database-container#137 · 1 assegnatario ·
Tutte le issue di microsoft/azure-sql-database-container
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
msys2/MSYS2-packages#6813 ·
I maintainer di solito rispondono entro 1 giorno
-
Laptop display stays disabled after unplugging external monitor: FALLBACK output counted as externalAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
-
[Bug]: Three default prefs with JSON values are never set (override.sh escapes their quotes twice)Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
Floorp-Projects/Floorp#2913 ·
I maintainer di solito rispondono entro 1 giorno
-
agent-butler-finding agent-research-recommend bug ready-for-agent
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
jordansmall/spindrift#5258 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno