Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug]: changing recovery model en database configuration

Đang mở
#130 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

@ericjulien đang làm issue này rồi.

Từ ngày 6/8/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug User-filled
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.
Ngôn ngữ chính
Shell
Star
17
Fork
4
Merge trung bình
12 giờ 8 phút
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/azure-sql-database-container

Tất cả issue của microsoft/azure-sql-database-container

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.