Recommending Platforms, Tiers and Database Settings
This lesson explains the SQL platforms and Azure SQL Database service tiers, compatibility levels, database scoped configurations and the defaults worth keeping.
Learning outcomes
After completing this lesson, you will be able to:
- Distinguish between the General Purpose, Business Critical and Hyperscale tiers.
- Explain the effect of the compatibility level and database scoped configurations.
- Choose a configuration for a described workload.
Platforms and service tiers
The three SQL platforms in this course share the same engine but differ in management and integration. SQL Server 2025 runs on premises or in VMs with full control. Azure SQL Database is a fully managed database with several purchasing options. SQL database in Fabric is a developer-friendly, autoscaling database that replicates its data to OneLake for analytics. Within Azure SQL Database, the vCore service tiers differ as the following comparison shows.
Serverless compute scales vCores automatically between a minimum and maximum and bills per second; in General Purpose it can auto-pause after a period of inactivity, which suits intermittent and development workloads. The free offer provides up to ten General Purpose serverless databases per subscription, each with 100,000 vCore seconds, 32 GB of data and 32 GB of backup storage per month.
Which service tier?
Compatibility level and database scoped configurations
The compatibility level controls language features and optimizer behaviour per database. Level 170 (SQL Server 2025 and current Azure SQL Database) is required for features such as REGEXP_LIKE and AI_GENERATE_CHUNKS; level 150 introduced scalar UDF inlining and level 160 parameter sensitive plan optimization. Raising the level should be tested, ideally by capturing a baseline in Query Store first.
Database scoped configurations tune behaviour without server access, as the following table lists.
| Setting | Purpose |
|---|---|
| MAXDOP | Limits parallelism per query in the database |
| PARAMETER_SNIFFING | Turns parameter sniffing off when it causes widespread plan problems |
| OPTIMIZE_FOR_AD_HOC_WORKLOADS | Stores a small plan stub on first execution of ad hoc queries |
| LEGACY_CARDINALITY_ESTIMATION | Uses the older cardinality estimator for compatibility |
| PREVIEW_FEATURES (SQL Server 2025) | Enables preview features such as vector indexes and fuzzy matching |
ALTER DATABASE CURRENT SET COMPATIBILITY_LEVEL = 170;
ALTER DATABASE SCOPED CONFIGURATION SET MAXDOP = 4;
SELECT name, value FROM sys.database_scoped_configurations;Database scoped configurations
Defaults worth keeping
Several defaults in Azure SQL Database should normally stay on, as the following list explains.
- Read committed snapshot isolation (RCSI) and snapshot isolation, so readers do not block writers.
- Accelerated database recovery (ADR), which makes rollback and recovery fast regardless of transaction size and is required for optimized locking.
- Optimized locking, which reduces lock memory and blocking.
- Query Store in read-write mode, which records query history for tuning.
- Automatic tuning FORCE_LAST_GOOD_PLAN, which reverts plan regressions; CREATE_INDEX and DROP_INDEX can be enabled when the team accepts automatic index changes.
Defaults worth keeping
A development database that is idle at night
A team needs an Azure SQL database for development and testing of an AI search feature. It is used about four hours a day, must support REGEXP_LIKE and vector search, and cost should be as low as possible. What configuration should the developer recommend?
Use a General Purpose serverless database (the free offer if available) with auto-pause and compatibility level 170. Serverless bills only while the database is active and pauses when idle, and level 170 enables REGEXP_LIKE; vector search is available in Azure SQL Database at any tier. Business Critical would add cost for features the scenario does not need, and a provisioned General Purpose database bills around the clock.
Which Azure SQL Database tiers offer serverless compute, and which can auto-pause?
Show answer
General Purpose and Hyperscale offer serverless; only General Purpose serverless can auto-pause.
Exam Tips
Remember for the exam
- Intermittent use: General Purpose serverless with auto-pause.
- In-Memory OLTP and a readable secondary: Business Critical.
- Newest T-SQL features such as REGEXP_LIKE: compatibility level 170.
- Keep RCSI, ADR, optimized locking, Query Store and FORCE_LAST_GOOD_PLAN on.