Ngân hàng đề — Microsoft Administering Azure SQL
Tìm thấy 110 câu.
A retail company is building a new order-management application and wants to create its transactional database directly inside an existing Microsoft Fabric workspace. Analysts must be able to query the operational data from Power BI reports and Spark notebooks in near real time without the team building or maintaining any ETL pipeline. The company wants the database to consume the Fabric capacity it already owns, and all access must be controlled through Microsoft Entra ID. Which database offering should you recommend?
- A Azure SQL Database in the Hyperscale tier with a named replica dedicated to analytical queries
- B SQL database in Microsoft Fabric
- C Azure SQL Database in an Azure subscription with Mirroring in Fabric enabled for the database
- D SQL Server on an Azure virtual machine with a nightly Data Factory pipeline that loads the data into a Fabric lakehouse
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Đề cương DP-300 bản 2026 thêm mục Identify use cases for Azure SQL Database in Microsoft Fabric. Câu hỏi gom đủ các dấu hiệu nhận biết: CSDL tạo ngay trong workspace Fabric, dữ liệu phải sẵn sàng cho Power BI và Spark gần thời gian thực mà không dựng ETL, tính phí qua Fabric capacity đã có, và chỉ dùng Microsoft Entra ID để xác thực.
✅ Vì sao đáp án đúng là đúng
SQL database in Microsoft Fabric dùng cùng Database Engine với Azure SQL Database nhưng là một item SaaS nằm trong workspace Fabric. Theo tài liệu chính thức: dữ liệu được tự động sao chép vào OneLake và chuyển sang định dạng Parquet/Delta gần thời gian thực, kèm một SQL analytics endpoint để Spark, notebook và Power BI truy vấn thẳng mà không cần pipeline. Nó chỉ hỗ trợ Microsoft Entra authentication và được tính vào Fabric capacity (theo dõi bằng Fabric Capacity Metrics app). Đúng mọi ràng buộc của đề.
❌ Vì sao các phương án còn lại sai
- Hyperscale + named replica: tài nguyên nằm trong Azure subscription, tính phí riêng theo vCore, không tự đưa dữ liệu vào OneLake; analysts vẫn phải kết nối trực tiếp hoặc dựng ETL.
- Azure SQL Database + Mirroring in Fabric: Mirroring cũng đưa dữ liệu vào OneLake, nhưng nó dành cho CSDL đã tồn tại bên ngoài Fabric; CSDL vẫn là tài nguyên Azure, tính phí riêng và có thể dùng SQL authentication — trái yêu cầu tạo trong workspace và dùng Fabric capacity.
- SQL Server trên VM + pipeline nightly: chính là ETL mà đề muốn tránh, độ trễ theo ngày chứ không gần thời gian thực, và phát sinh chi phí VM.
📌 Điểm cần nhớ
- Fabric SQL database = Azure SQL engine + SaaS trong Fabric, OneLake mirroring tự động, Entra-only, tính phí theo capacity.
- Mirroring in Fabric = cho CSDL có sẵn bên ngoài (Azure SQL DB, SQL Server, Cosmos DB...).
- Không có khái niệm elastic pool; thay bằng Fabric capacity dùng chung giữa các workspace.
A manufacturing company runs 40 SQL Server 2016 and SQL Server 2019 instances in its own data center and at a third-party hosting provider. The company does not plan to migrate these instances during the next two years, but it wants a single inventory of all instances and databases in the Azure portal, best practices assessment reports, Microsoft Defender for Cloud protection, and the option to switch some instances to pay-as-you-go licensing billed through Azure. Which approach should you recommend?
- A Install the Azure Connected Machine agent and the Azure extension for SQL Server on each host so the instances become SQL Server enabled by Azure Arc
- B Deploy Azure Migrate and run a discovery and assessment of the SQL Server estate
- C Migrate every instance to SQL Server on Azure Virtual Machines and register them with the SQL IaaS Agent extension
- D Configure the Managed Instance link from each instance to a new Azure SQL Managed Instance
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Mục Identify use cases for Azure Arc-enabled SQL services trong đề cương đòi nhận ra khi nào Azure Arc là lời giải. Dấu hiệu: SQL Server nằm ngoài Azure (trung tâm dữ liệu riêng và nhà cung cấp hosting khác), không di trú, nhưng muốn các dịch vụ Azure: inventory tập trung, best practices assessment, Defender for Cloud, và pay-as-you-go billed through Azure.
✅ Vì sao đáp án đúng là đúng
SQL Server enabled by Azure Arc đúng là tính năng mở rộng dịch vụ Azure tới SQL Server chạy ở bất kỳ đâu: on-premises, edge, hay cloud khác. Cài Azure Connected Machine agent rồi Azure extension for SQL Server trên host, chỉ cần kết nối HTTPS ra ngoài cổng 443. Tài liệu liệt kê đúng các khả năng đề nêu: inventory chi tiết và truy vấn bằng Azure Resource Graph, best practices assessment, Microsoft Defender for Cloud, Microsoft Purview, Extended Security Updates, và pay-as-you-go cho SQL Server 2012 trở lên. SQL Server 2016/2019 đều được hỗ trợ (bảng tính năng theo phiên bản).
❌ Vì sao các phương án còn lại sai
- Azure Migrate: chỉ khám phá và đánh giá sẵn sàng di trú một lần; không cung cấp Defender, không đổi mô hình license, không phải công cụ vận hành liên tục.
- Di trú sang SQL Server on Azure VM: trái với ràng buộc không di trú trong hai năm tới; SQL IaaS Agent extension chỉ dùng cho VM trong Azure.
- Managed Instance link: là công cụ sao chép dữ liệu sang Azure SQL Managed Instance (DR, di trú, read scale-out), không giải quyết inventory, assessment hay licensing cho các instance tại chỗ.
📌 Điểm cần nhớ
- Arc = quản lý và bảo vệ SQL Server tại chỗ từ Azure, không di chuyển dữ liệu.
- Yêu cầu: Connected Machine agent + Azure extension for SQL Server, outbound 443; Windows Server 2016+, SQL Server 2014+ (64-bit).
- Microsoft Entra authentication qua Arc chỉ cho SQL Server 2022+; PAYG cho 2012+; Best practices assessment cần AMA + Log Analytics.
A company runs two Azure SQL Managed Instances in the same Azure region, in two different subscriptions of the same Microsoft Entra tenant. A 2-TB user database must be relocated from the first instance to the second instance so that the first instance can later be scaled down. The business requires near-zero downtime, a guarantee that no committed transaction is lost, and automatic removal of the source database when the relocation finishes. The database is not part of a failover group. What should you do?
- A Start a database move operation from the source instance to the destination instance, wait for the status Ready for completion, and then complete the operation during a short cutover window
- B Take a COPY_ONLY backup to Azure Blob Storage, restore it on the destination instance, and then drop the source database
- C Perform a cross-instance point-in-time restore to the destination instance and then drop the source database
- D Configure the Managed Instance link between the two instances and fail over the database
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Đề cương có mục Implement Azure SQL Managed Instance database copy and move. Tình huống: hai SQL Managed Instance cùng vùng, khác subscription cùng tenant, cần chuyển CSDL 2 TB với downtime gần bằng 0, không mất giao dịch, và nguồn tự bị xoá khi xong.
✅ Vì sao đáp án đúng là đúng
Tính năng database copy/move của Azure SQL Managed Instance dùng công nghệ Always On availability group để seed rồi sao chép thay đổi gần thời gian thực sang đích. Tài liệu ghi rõ: hỗ trợ cross-subscription trong cùng tenant; khi trạng thái là Ready for completion, mọi thay đổi ở nguồn vẫn được áp sang đích cho tới khi bạn bấm Complete (có 24 giờ để hoàn tất). Với thao tác move, thiết kế bảo đảm không mất dữ liệu: nguồn ngừng nhận ghi, giao dịch cuối được sao chép, đích lên online, rồi nguồn bị drop tự động. Đây đúng là ba yêu cầu của đề.
❌ Vì sao các phương án còn lại sai
- COPY_ONLY backup rồi restore: với 2 TB thì sao lưu và khôi phục mất hàng giờ; mọi ghi trong khoảng đó bị mất hoặc phải dừng ứng dụng — không đạt near-zero downtime.
- Cross-instance PITR: tạo bản sao tại một thời điểm trong quá khứ; dữ liệu sau mốc đó không có ở đích, buộc phải ngừng ghi từ trước khi restore. Tài liệu cũng nhấn mạnh copy/move khác PITR ở điểm này.
- Managed Instance link: chỉ nối giữa SQL Server và SQL Managed Instance, không dùng giữa hai managed instance; thậm chí CSDL đang dùng link còn bị cấm copy/move.
📌 Điểm cần nhớ
- Copy giữ nguồn online; Move drop nguồn. Cả hai cần cùng vùng Azure, chỉ CSDL người dùng, tối đa 8 thao tác song song mỗi instance nguồn.
- PITR backup không đi theo CSDL đã move; chuỗi sao lưu bắt đầu lại ở đích.
- Không dùng được khi instance thuộc failover group hoặc CSDL dùng Managed Instance link; TDE với CMK đòi đích truy cập được cùng key.
A financial services company stores loan records in an Azure SQL Database. Loan officers must be able to update and delete rows as part of normal processing. External auditors require cryptographic proof that no historical value has been altered by anyone, including database administrators and cloud administrators, and the evidence must be stored outside the database in a tamper-proof location without manual steps. Which solution meets the requirements?
- A Create the table as an updatable ledger table and enable automatic database digest storage to Azure Confidential Ledger or to immutable Azure Blob Storage
- B Create the table as an append-only ledger table and enable automatic database digest storage
- C Convert the table to a system-versioned temporal table and enable SQL auditing to a Log Analytics workspace
- D Enable transparent data encryption with a customer-managed key stored in Azure Key Vault
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Mục Implement ledger in Azure SQL của đề cương. Ba ràng buộc: ứng dụng cần UPDATE/DELETE; cần bằng chứng mật mã chống cả DBA và cloud admin; bằng chứng phải nằm ngoài CSDL, chống sửa, tự động.
✅ Vì sao đáp án đúng là đúng
Ledger băm SHA-256 mọi dòng bị giao dịch thay đổi theo cấu trúc Merkle tree, nối các block thành chuỗi và sinh database digest đại diện trạng thái CSDL. Có hai dạng bảng: updatable ledger table cho phép update/delete nhưng giữ bản cũ trong history table kèm ledger view; append-only chỉ cho insert. Vì loan officers phải sửa và xoá dòng, phải chọn updatable. Tài liệu nêu ledger tự động sinh và lưu digest vào Azure Blob Storage có immutability policy hoặc Azure Confidential Ledger, đúng yêu cầu lưu ngoài CSDL, chống sửa và không cần thao tác tay. Quy trình verification sau đó so hash tính lại với digest để phát hiện mọi sửa đổi, kể cả sửa thẳng file dữ liệu.
❌ Vì sao các phương án còn lại sai
- Append-only ledger table: chặn UPDATE và DELETE ở tầng API, ứng dụng nghiệp vụ sẽ lỗi ngay.
- Temporal table + SQL audit: temporal giữ lịch sử nhưng không có hash, admin có đủ quyền sửa cả bảng history lẫn tắt audit; audit log không phải bằng chứng mật mã về tính toàn vẹn dữ liệu.
- TDE với CMK: bảo vệ tính bí mật của file dữ liệu ở trạng thái nghỉ, hoàn toàn không chứng minh được dữ liệu chưa bị sửa.
📌 Điểm cần nhớ
- Updatable = cho phép sửa, có history table; Append-only = chỉ insert, không history table.
- Digest phải lưu ở nơi không ai sửa được: immutable Blob hoặc Azure Confidential Ledger; có thể lưu tay nhưng đề yêu cầu tự động.
- Ledger database (toàn bộ bảng là ledger) chỉ chọn lúc tạo và không chuyển ngược về CSDL thường.
An Azure SQL Database in the General Purpose tier on standard-series hardware stores a column of national identification numbers protected by Always Encrypted so that database administrators cannot see plaintext values. A new application feature must run LIKE pattern searches and range comparisons on that column, and the security team wants to rotate the column encryption key without extracting the data to a client and re-uploading it. The company does not want to change the hardware configuration of the database. What should you do?
- A Enable a virtualization-based security (VBS) enclave for the database, create an enclave-enabled column master key, and encrypt the column with randomized encryption using an enclave-enabled column encryption key
- B Re-encrypt the column with deterministic encryption so that the Database Engine can evaluate the LIKE and range predicates
- C Move the database to DC-series hardware to obtain an Intel SGX enclave and configure Microsoft Azure Attestation for the application
- D Replace Always Encrypted with dynamic data masking on the column and grant the UNMASK permission only to the application login
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Đề cương tách riêng Implement Always Encrypted with secure enclaves. Always Encrypted thường chỉ cho phép so sánh bằng trên cột deterministic; đề đòi LIKE và so sánh khoảng, xoay khoá tại chỗ, giữ DBA không thấy plaintext, và không đổi phần cứng (đang là standard-series).
✅ Vì sao đáp án đúng là đúng
Tài liệu nói rõ: trong Azure SQL Database, CSDL không dùng DC-series (kể cả DTU) có thể cấu hình VBS enclave — công nghệ phần mềm dựa trên hypervisor, không cần phần cứng đặc biệt. Enclave cho phép hai thứ đề cần: in-place encryption (mã hoá, xoay CEK, đổi kiểu mã hoá ngay trong enclave bằng ALTER TABLE, không kéo dữ liệu ra client) và confidential queries gồm comparison operators, BETWEEN, IN, LIKE, DISTINCT, JOIN, ORDER BY, GROUP BY. Các phép này đòi randomized encryption với enclave-enabled CEK, tức CEK được mã bằi CMK có thuộc tính ENCLAVE_COMPUTATIONS. VBS enclave trên Azure SQL Database không hỗ trợ attestation nên không cần cấu hình thêm.
❌ Vì sao các phương án còn lại sai
- Deterministic encryption: chỉ hỗ trợ so sánh bằng; LIKE và range vẫn không thể thực hiện, và các phép trong enclave còn yêu cầu randomized.
- DC-series + Intel SGX: hoạt động được nhưng đổi cấu hình phần cứng, trái ràng buộc; ngoài ra SGX enclaves trên Azure SQL Database hết hỗ trợ ngày 31/10/2027 và Microsoft sẽ tự chuyển sang VBS.
- Dynamic data masking: chỉ che hiển thị, dữ liệu vẫn plaintext trong engine, DBA có quyền UNMASK hoặc truy vấn gián tiếp — không đạt mục tiêu bảo mật của Always Encrypted.
📌 Điểm cần nhớ
- VBS enclave: mọi tier Azure SQL Database trừ DC-series, không attestation; SGX: chỉ DC-series, bắt buộc Microsoft Azure Attestation, sắp ngừng.
- Enclave queries cần compat level 160+, cột char/nchar cần collation _BIN2 hoặc UTF-8.
- Có thể tạo nonclustered index trên cột randomized enclave-enabled; nên bật ADR trước.
A company has 60 Azure SQL databases and 4 SQL managed instances spread across three subscriptions in a single Microsoft Entra tenant. The operations team wants one estate-level dashboard that shows CPU heatmaps, top resource-consuming queries, wait statistics, and historical active sessions for every resource. The collected data must be stored where the team can analyze it with KQL, and the company refuses to pay a per-database monitoring fee. Which solution should you recommend?
- A Create a database watcher, add all databases and managed instances as SQL targets, and use an Azure Data Explorer cluster or a Fabric Real-Time Analytics database as the data store
- B Enable Query Store on every database and use SQL Server Agent jobs to copy Query Store data into a central reporting database
- C Enable Intelligent Insights on each database and send the SQLInsights diagnostic log to a Log Analytics workspace
- D Create an Azure Monitor metric alert on CPU percentage for each database and pin the metric charts to a shared Azure dashboard
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Đề cương có mục Monitor by using database watcher. Dấu hiệu: giám sát cả estate gồm SQL Database lẫn Managed Instance, nhiều subscription cùng tenant, cần active sessions, wait stats, top queries, heatmap, dữ liệu truy vấn bằng KQL, và không trả phí theo từng CSDL.
✅ Vì sao đáp án đúng là đúng
Database watcher là giải pháp giám sát được quản lý cho Azure SQL Database và Azure SQL Managed Instance. Nó thu dữ liệu từ hơn 70 DMV/catalog view thành các dataset (Active sessions, Wait statistics, Top queries, Performance counters...) vào Azure Data Explorer hoặc Real-Time Analytics trong Microsoft Fabric, truy vấn bằng KQL hoặc T-SQL. Dashboard estate có heatmap CPU và top queries cho toàn bộ tài nguyên; dashboard resource có active sessions lịch sử. Tài liệu nói rõ SQL targets có thể nằm ở bất kỳ subscription nào trong cùng tenant và watcher cùng dashboard miễn phí, không có phí theo tài nguyên hay theo người dùng — chỉ trả cho cluster ADX (có bản free). Xác thực khuyến nghị bằng managed identity của watcher.
❌ Vì sao các phương án còn lại sai
- Query Store + SQL Server Agent: Azure SQL Database không có SQL Server Agent; Query Store cũng không ghi active sessions hay performance counter, và phải tự dựng gom dữ liệu cho 64 tài nguyên.
- Intelligent Insights + Log Analytics: cấu hình từng tài nguyên, tập trung phát hiện bất thường hiệu năng, không có dashboard estate với heatmap/active sessions, và Log Analytics tính phí theo GB ingest.
- Metric alert CPU: chỉ có vài metric cấp tài nguyên, không có wait stats, top queries hay sessions.
📌 Điểm cần nhớ
- Database watcher: tối đa 100 SQL targets/watcher, 20 watchers/subscription; hỗ trợ mọi tier kể cả Hyperscale và readable replicas.
- Quyền cần cấp rất hẹp (##MS_ServerPerformanceStateReader## v.v.); cấp thừa quyền watcher sẽ tự ngắt kết nối.
- Lưu ý vận hành: database watcher ngừng ngày 30/04/2027, không tạo mới từ 09/11/2026; hướng thay thế là Database Hub trong Fabric.
An Azure SQL Managed Instance hosts a database at compatibility level 150. A stored procedure filters a large table on a customer identifier column whose value distribution is heavily skewed. Depending on which parameter value compiles the plan first, the procedure sometimes completes in seconds and sometimes runs for many minutes. You need the Database Engine to keep multiple cached plans for the statement so that each parameter value uses an appropriate plan, without changing the application or the procedure code. What should you do?
- A Set the database compatibility level to 160 or higher so that Parameter Sensitive Plan optimization is enabled
- B Run ALTER DATABASE SCOPED CONFIGURATION SET PARAMETER_SNIFFING = OFF
- C Add OPTION (RECOMPILE) to the SELECT statement inside the stored procedure
- D Use sp_query_store_force_plan to force the plan that currently has the lowest duration
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Mục Identify use cases for intelligent query processing (IQP) features. Triệu chứng là parameter sniffing trên cột phân phối lệch; đề đòi engine giữ nhiều plan cho một câu lệnh và không sửa code.
✅ Vì sao đáp án đúng là đúng
Parameter Sensitive Plan (PSP) optimization thuộc họ IQP, có trên SQL Server 2022+, Azure SQL Database và Azure SQL Managed Instance. Tài liệu mô tả: lúc biên dịch, engine dùng histogram thống kê để nhận ra predicate lệch, tạo dispatcher plan; lúc chạy, dispatcher phân giá trị tham số vào các khoảng cardinality (thấp/trung/cao) và biên dịch query variant riêng cho từng khoảng, mỗi variant có plan riêng trong plan cache và Query Store. Điều kiện kích hoạt là database compatibility level 160 trở lên. Vì CSDL đang ở 150, chỉ cần ALTER DATABASE ... SET COMPATIBILITY_LEVEL = 160 (hoặc 170) là bật, không đụng tới ứng dụng hay procedure.
❌ Vì sao các phương án còn lại sai
- PARAMETER_SNIFFING = OFF: engine dùng mật độ trung bình để sinh một plan cho mọi giá trị — ngược với yêu cầu nhiều plan; tài liệu còn ghi rõ tắt sniffing thì PSP cũng bị vô hiệu.
- OPTION (RECOMPILE): phải sửa code procedure và tốn CPU biên dịch mỗi lần chạy; cũng không giữ nhiều plan trong cache.
- Force plan trong Query Store: khoá một plan cho mọi tham số, nên giá trị ở khoảng cardinality khác vẫn chạy plan không phù hợp.
📌 Điểm cần nhớ
- PSP cần compat 160+; compat 170 (SQL Server 2025) mở rộng sang DML, nhiều predicate cùng bảng.
- Chỉ áp dụng cho equality predicate, tối đa 3 predicate mỗi truy vấn.
- Tắt ở mức CSDL bằng PARAMETER_SENSITIVE_PLAN_OPTIMIZATION = OFF, mức truy vấn bằng hint DISABLE_PARAMETER_SENSITIVE_PLAN; xem quan hệ parent/dispatcher/variant trong sys.query_store_query_variant.
A SaaS provider hosts 300 Azure SQL databases across three logical servers that belong to two different Azure subscriptions. New tenant databases are added every week. A Transact-SQL index maintenance script must run every night against every database that exists at run time, and the security team prohibits storing SQL authentication passwords anywhere. Which solution requires the least ongoing administrative effort?
- A Create an elastic job agent that authenticates with a user-assigned managed identity, add the three logical servers to a target group, create a Microsoft Entra user for the identity in each database, and schedule the job
- B Create a SQL Server Agent job on each logical server that enumerates the databases from the master database and runs the script
- C Create an Azure Automation runbook that connects to each database with a database-scoped credential stored in the job database
- D Create an elastic job agent that authenticates with the system-assigned managed identity of the job database server and add each database individually to a target group
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Mục Create and configure elastic jobs. Ràng buộc: nhiều server, nhiều subscription, CSDL thêm hằng tuần (phải tự nhận diện lúc chạy), không lưu mật khẩu SQL, và ít công vận hành nhất.
✅ Vì sao đáp án đúng là đúng
Elastic jobs chạy T-SQL theo lịch trên một hay nhiều Azure SQL database. Tài liệu nêu target group có thể chứa logical server hoặc elastic pool, và server/pool được dynamic enumeration tại thời điểm chạy nên mọi CSDL tồn tại lúc đó đều được xử lý — đúng với việc thêm tenant hằng tuần; target còn được phép ở nhiều subscription và vùng. Về xác thực, lựa chọn khuyến nghị là Microsoft Entra với user-assigned managed identity (UMI): job agent dùng UMI kết nối tới target, không dùng SQL authentication; chỉ cần tạo user từ identity đó trong mỗi CSDL (có thể làm bằng chính một job) và cấp quyền. Không có mật khẩu nào được lưu.
❌ Vì sao các phương án còn lại sai
- SQL Server Agent: Azure SQL Database không có SQL Server Agent (chỉ có trên Managed Instance và SQL Server); tài liệu còn nhấn mạnh Agent không enumerate CSDL động được như elastic jobs.
- Automation runbook + database-scoped credential: database-scoped credential bản chất là lưu mật khẩu SQL (IDENTITY/SECRET), vi phạm chính sách; tự viết logic duyệt server, retry, log là thêm công vận hành.
- System-assigned managed identity: tài liệu ghi rõ SMI isn't supported cho elastic jobs; thêm từng CSDL riêng lẻ cũng buộc cập nhật target group mỗi tuần.
📌 Điểm cần nhớ
- Một job agent chỉ dùng một phương thức xác thực cho mọi target; UMI là khuyến nghị, SMI không hỗ trợ.
- Target group: server/pool (enumerate động, cần quyền trên master) hoặc database riêng; có include/exclude.
- Job database phải là Azure SQL Database thường (không Hyperscale, không serverless auto-pause); tier JA100–JA800 quyết định số kết nối song song; script phải idempotent.
An Azure SQL Database in the Business Critical tier is a member of a failover group whose secondary database is in another region. Regulations require that the first full backup of every year be kept for seven years and that every weekly full backup be kept for eight weeks, and these backups must keep being produced even if the company fails over to the secondary region and continues operating there. You need to configure backup retention with the minimum administrative effort. What should you do?
- A Configure a long-term retention policy with weekly retention of 8 weeks, yearly retention of 7 years and a WeekOfYear value on both the primary database and the secondary database
- B Configure the long-term retention policy only on the primary database, because long-term backups are generated from the secondary database as well
- C Increase the point-in-time restore retention period of the database to seven years
- D Create a SQL Server Agent job that takes weekly COPY_ONLY backups of the database to Azure Blob Storage
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Mục Configure long-term backup retention. Đề yêu cầu giữ bản đầu năm 7 năm, bản tuần 8 tuần, và sao lưu phải tiếp tục sau khi failover sang vùng phụ, với ít công vận hành nhất.
✅ Vì sao đáp án đúng là đúng
Long-term retention (LTR) sao chép full backup tự động của Azure SQL Database sang Azure Blob Storage với chính sách tới 10 năm, định nghĩa bằng bốn tham số: W (giữ bản tuần), M (bản đầu tháng), Y (bản của tuần WeekOfYear mỗi năm). Chính sách W=8, Y=7 kèm WeekOfYear đáp ứng đúng hai yêu cầu giữ. Về failover, tài liệu nêu rõ: với active geo-replication hoặc failover group, hãy cấu hình cùng LTR policy trên CSDL phụ, vì backup chỉ sinh trên primary; sau failover, CSDL phụ trở thành primary và chính sách đã cấu hình sẵn ở đó mới tiếp tục tạo LTR backup. Chi phí không tăng khi còn là phụ vì không có backup nào được tạo từ secondary.
❌ Vì sao các phương án còn lại sai
- Chỉ cấu hình trên primary: khẳng định sai — LTR không sinh từ secondary; sau failover sẽ không còn LTR backup nào cho tới khi ai đó cấu hình lại, vi phạm quy định.
- Tăng PITR lên 7 năm: short-term retention tối đa 35 ngày; PITR cũng là bản sao liên tục, không phải lưu trữ dài hạn theo mốc năm.
- SQL Server Agent + COPY_ONLY: Azure SQL Database không có SQL Server Agent và không hỗ trợ BACKUP TO URL do người dùng tự chạy; đây là cách của Managed Instance.
📌 Điểm cần nhớ
- LTR tối đa 10 năm, có cả Hyperscale; đổi policy chỉ ảnh hưởng backup tương lai; backup đầu tiên có thể mất tới 7 ngày mới xuất hiện.
- Failover group / geo-replication: cấu hình LTR ở cả hai phía.
- Xoá CSDL hay server thì LTR backup vẫn còn, restore được sang server khác trong cùng subscription; Azure SQL Database còn có tuỳ chọn immutable LTR.
A company runs its line-of-business database on SQL Server 2022 Enterprise edition on-premises. It wants a disaster recovery replica in Azure SQL Managed Instance with near real-time replication, the ability to fail over to Azure during an outage and later fail back to the on-premises server online, and it does not want to pay SQL Server licensing for the passive replica in Azure. Which configuration should you recommend?
- A Deploy a SQL managed instance with the SQL Server 2022 update policy, configure the Managed Instance link from the SQL Server instance to the managed instance, and designate the instance as a license-free passive disaster recovery replica
- B Deploy a SQL managed instance with the Always-up-to-date update policy and configure the Managed Instance link from the SQL Server instance to the managed instance
- C Create an auto-failover group that contains the on-premises SQL Server instance and the managed instance
- D Configure log shipping from the on-premises SQL Server instance to the managed instance with a 15-minute restore schedule
Xem giải thích
🧩 Phân tích nội dung câu hỏi
Mục Evaluate HA/DR for hybrid deployments. Bốn yêu cầu: đích là Azure SQL Managed Instance, sao chép gần thời gian thực, fail over rồi fail back online về SQL Server 2022, và không trả license cho bản sao thụ động.
✅ Vì sao đáp án đúng là đúng
Managed Instance link dựng distributed availability group giữa SQL Server và SQL Managed Instance, sao chép gần thời gian thực. Tài liệu nói rõ với SQL Server 2022 và 2025, link hỗ trợ DR hai chiều: fail over sang managed instance rồi fail back online về SQL Server. Nhưng có điều kiện bắt buộc: managed instance phải dùng update policy tương ứng (SQL Server 2022 update policy cho SQL Server 2022); instance cấu hình Always-up-to-date không thể sao chép ngược hay fail back. Về chi phí, phần License-free passive DR replica cho phép bật hybrid failover benefit để không bị tính license vCore cho instance chỉ làm DR, không chạy workload.
❌ Vì sao các phương án còn lại sai
- Always-up-to-date policy: tạo link được, nhưng tài liệu ghi sau khi failover sang Managed Instance, bạn không thể sao chép dữ liệu hay fail back về SQL Server — vi phạm yêu cầu fail back.
- Auto-failover group: chỉ dùng giữa hai managed instance (hoặc giữa các logical server của SQL Database), không bao giờ chứa SQL Server on-premises; ngoài ra failover group và link không dùng chung trên một instance.
- Log shipping tới managed instance: Managed Instance không nhận restore log liên tục kiểu log shipping (chỉ có Log Replay Service cho di trú một chiều), RPO 15 phút không phải gần thời gian thực, và không có đường fail back online.
📌 Điểm cần nhớ
- Link: SQL Server 2016–2019 chỉ một chiều (không fail back); 2022/2025 hai chiều khi update policy khớp.
- Cần SQL Server trên Windows Server (không phải Windows 10/11), kết nối VPN/ExpressRoute, xác thực bằng chứng chỉ, chỉ qua VNet-local endpoint.
- Khi là passive DR, bật hybrid failover benefit để miễn phí license; không replicate login, agent job hay system database.