DP-300 Cheatsheet
Administering Microsoft Azure SQL Solutions
Download free PDFPlan and implement data platform resources (15-20%)
Choose the SQL deployment model
- **Azure SQL Database** manages individual databases or elastic pools. **SQL Managed Instance** adds instance features such as SQL Server Agent, linked servers and native cross-database queries, subject to supported-feature limits.
- **SQL Server on Azure VMs** provides operating-system access and the broadest instance compatibility. Use it for dependencies such as FILESTREAM/FileTable, custom agents or unsupported platform features; manage patching, backups and availability.
- **Compatibility assessment** inventories database objects, instance dependencies, authentication, jobs and integrations. A supported database engine feature does not guarantee that every external dependency migrates unchanged.
- **General Purpose** balances cost and performance. **Business Critical** uses local SSD storage and replicas for low I/O latency. **Hyperscale** separates compute and storage for large Azure SQL databases and read scaling.
- **DTUs** bundle CPU, memory and I/O. **vCores** expose compute sizing separately from storage. Compare memory per vCore, storage throughput and latency; core count alone does not describe capacity.
Pools, serverless and cost controls
- **Elastic pools** share resources among databases on one logical server. Size for aggregate average demand, simultaneous peaks and total allocated storage; set per-database limits to control noisy neighbors.
- **Serverless** scales compute within configured minimum and maximum bounds and bills compute per second. Eligible configurations support auto-pause; evaluate idle time, resume latency and connection retries.
- **Scaling** can cause brief connection interruptions. Pool resource sharing does not merge databases, supply cross-database transactions or automatically increase the pool's purchased capacity.
- **Azure Hybrid Benefit** applies eligible SQL licenses under their terms. Reservations suit predictable compute demand. Match the Azure VM licensing record to the installed SQL edition when changing editions.
Migration paths and cutover
- **Online migration** seeds a target and applies ongoing changes before cutover. Stop source writes, finish synchronization, switch clients and validate. **Offline migration** accepts downtime for the copy and restore.
- **Database Migration Service** supports selected source-target paths. Validate connectivity, permissions, source versions and backup access. Migration assessment and data transfer are separate activities.
- **Managed Instance native restore** uses backups in Blob Storage. **Log Replay Service** replays full, differential and log backups; **Managed Instance link** uses availability-group technology for supported replication and migration scenarios.
- **Backup-based migration** needs a valid restore chain and readable backup locations. For workflows requiring them, use backup checksums and separate backup files; preserve all required transaction-log backups until cutover.
- **Transactional replication** can keep a supported Azure SQL Database subscriber current during migration. **BACPAC** carries schema and data for logical export/import; **DACPAC** deploys a database schema model.
- **SQL Data Sync** uses an Azure SQL Database hub and agents for supported SQL Server members to synchronize selected tables. Plan conflict handling and schema requirements; synchronization does not replace backups or automatic HA.
- **Azure Data Box** addresses very large transfers over slow links; plan a supported database restore target and final-change synchronization. A physical transfer device alone does not migrate database dependencies.
- **PostgreSQL/MySQL** require engine-specific compatibility checks and administration tools. Assess extensions and target support for migration; use the selected deployment's query-performance and slow-query telemetry rather than SQL Server DMVs.
SQL VM compute and storage
- **Disk performance** is constrained by both individual disks and VM IOPS/throughput limits. Stripe disks where appropriate for aggregate bandwidth; separate data and log workloads and measure before resizing.
- **Host caching** can help supported data disks with read-only caching. Transaction-log disks generally use no host caching. Ultra Disk and Premium SSD v2 require their supported VM, region and caching configurations.
- **Premium SSD v2** separates capacity, IOPS and throughput configuration. **Ultra Disk** targets demanding I/O workloads. **Write Accelerator** is a specialized option for supported VM/disk combinations, often used for log latency.
- **tempdb** can use suitable local temporary storage because it is recreated at startup. Keep persistent data, log and backup files on durable storage; local temporary disks can be lost on host movement.
- **SQL IaaS Agent extension** registers and manages SQL VM features through **Microsoft.SqlVirtualMachine**. Windows and Linux capabilities differ; verify support for the selected image and management feature.
Partitions, data types and compression
- **Partition function** maps values to boundaries; **partition scheme** maps partitions to filegroups; the table or index uses the scheme. Distribution across Synapse nodes is a separate design choice.
- **Partition switching** supports efficient retention and staged loading when source and target structures align. Plan date boundaries and indexes before implementing a sliding retention window.
- **Row/page compression** reduces rowstore storage at a CPU cost. **Columnstore** favors large analytical scans; **COLUMNSTORE_ARCHIVE** compresses further with extra processing overhead for infrequently accessed data.
- **Right-sized data types** reduce row width and I/O. Use date-only types when time is unnecessary and exact numeric types for amounts. Store phone numbers as strings to preserve formatting and leading zeros.
- **COMPRESS/DECOMPRESS** operates on individual values using GZIP and returns binary data. It differs from index compression; decompress values before treating their contents as ordinary searchable text.
Analytical storage and external data
- **Star schemas** place measures and foreign keys in fact tables and descriptive attributes in dimensions. Integer surrogate keys decouple identity from business-key changes; a date dimension can serve multiple date roles.
- **Synapse dedicated SQL pool** provisions warehouse compute. **Serverless SQL pool** queries external files on demand. Use Spark for distributed transformations and schema-aware processing of formats such as JSON and Parquet.
- **HASH distribution** colocates suitable large-table joins when keys align and values spread evenly. **REPLICATE** avoids movement for small dimensions. **ROUND_ROBIN** is simple for staging but may require data movement for joins.
- **External data source**, **external file format** and **external table** describe location, encoding and schema. Protect credentials with the required key hierarchy; use the syntax supported by the chosen SQL engine.
- **OPENROWSET** queries external files; **CETAS** writes query results and creates external-table metadata. Prune files through useful folder partitions and column projection; excessive tiny partitions add overhead.
- **Parquet** provides compressed columnar storage and typed fields. Compatible Spark table metadata can be exposed to Synapse serverless SQL; shared metadata does not make every Spark format or feature interchangeable.
Implement a secure environment (20-25%)
Identities and database principals
- **Microsoft Entra authentication** centralizes identities and supports appropriate MFA/Conditional Access flows. Configure an Entra administrator and connect with an authorized Entra principal before provisioning database users.
- **CREATE USER [principal] FROM EXTERNAL PROVIDER** maps a user, group, service principal or managed identity into a database. Grant database permissions separately; creating the principal alone does not authorize table access.
- **Managed identities** remove application-managed passwords. Noninteractive provisioning may also require the SQL resource identity to read directory objects through supported Microsoft Graph permissions.
- **SQL login** resides at instance/server scope and can map to database users. A **contained SQL user** stores authentication in its database; specify that database when connecting.
- **Database discovery** and database access are distinct. A user who connects directly to a database may also need a principal in virtual master for tools that enumerate databases.
- **SQL VM Windows authentication** uses appropriate domain/service identities. Mixed mode also enables SQL authentication. Entra join or a VM managed identity alone does not create SQL administrator permissions.
Least privilege and permission scope
- **Azure RBAC** governs resource management; SQL permissions govern database access. **SQL DB Contributor** manages databases without granting SELECT access or general administration of the parent logical server.
- **db_datareader** reads all user tables and views; **db_datawriter** modifies user-table data. Use a custom role and object/schema grants when access must be narrower; add members with **ALTER ROLE ... ADD MEMBER**.
- **Schema-level SELECT** can cover future objects in that schema. Grant object creation plus appropriate rights in a dedicated tenant schema when users must create objects without changing supplied application objects.
- **db_ddladmin** is broad database DDL access; **db_owner** has extensive database control. Prefer specific ALTER permissions for limited schema changes. In Azure SQL virtual master, **dbmanager** can create and delete databases.
- **EXECUTE AS USER** tests a database execution context; **REVERT** returns to the caller. Impersonation requires permission and does not prove that external authentication or network access works.
- **VIEW DEFINITION**, **SHOWPLAN** and state/performance permissions serve different purposes. Grant the supported DMV permission at the required scope; monitoring permissions can expose sensitive operational information.
Network access and encrypted connections
- **Private endpoint** assigns a private IP for access to a particular SQL resource through Private Link. Configure private DNS and routing, then disable public network access when public connections must be blocked.
- **Service endpoints** identify an allowed VNet subnet to the SQL public endpoint. They do not assign the database a private IP. A private endpoint gives a more specific destination for network isolation.
- **Server-level IP firewall rules** apply across the logical server; **database-level rules** narrow access to a database. These are allow rules: a broader server rule can defeat intended database-only network isolation.
- **sp_set_firewall_rule** configures server rules in virtual master; **sp_set_database_firewall_rule** configures rules in the target database. The **0.0.0.0** Azure-services rule is broad, not restricted to one resource group.
- **Managed Instance networking** uses its VNet configuration. A public endpoint needs explicit network controls; a P2S VPN can give remote clients private connectivity. Combine transport access with database authorization.
- **TLS** encrypts SQL connections. Validate the server certificate and use encryption-capable clients. VNet peering supplies routing, not application-layer encryption; retain TLS over private paths.
Encryption and key hierarchy
- **TDE** encrypts database files, logs and associated backups at rest. It does not hide query results from authorized administrators. **TLS** protects transport; **Always Encrypted** protects selected column values from the database engine.
- **TDE on SQL Server** uses a database encryption key protected by a server certificate or supported external key. Back up the certificate and private key so encrypted databases and backups remain recoverable.
- **Customer-managed TDE keys** use Key Vault and a SQL resource identity with required key permissions. Preserve key availability, versions and recovery protection; deleting or disabling the protector can make the database unavailable.
- **Always Encrypted** uses a column encryption key protected by a column master key. An enabled client driver accesses the external key store; database metadata contains protected key values and key references.
- **Deterministic encryption** supports equality-based operations but reveals repeated-value patterns. **Randomized encryption** hides those patterns better, with fewer server-side operations in conventional Always Encrypted.
- **Secure enclaves** enable richer operations on supported encrypted columns inside a protected environment. Match enclave type, attestation, client driver and supported operations; ordinary randomized encryption alone does not enable pattern matching.
- **Server-side cell encryption** commonly uses a database master key, certificate and symmetric key with ENCRYPTBYKEY/DECRYPTBYKEY. It has a different administrator trust boundary from Always Encrypted.
Row, column and presentation controls
- **Row-level security** uses an inline table-valued predicate function and a security policy. Filter predicates restrict visible rows; supported block predicates prevent disallowed writes. Bind tenant identity to trusted session context.
- **Column-level permissions** control access to sensitive columns. **Dynamic data masking** changes results for callers without UNMASK; it is a presentation control and cannot by itself prevent inference by users who can run arbitrary queries.
- **Mask functions** include default, email, random numeric and partial string masks. **partial(prefix, padding, suffix)** preserves the chosen number of characters; count punctuation as part of the string.
- **SAS** delegates storage access with explicit resource, permission and expiry limits. Keep tokens secret, use HTTPS and prefer a supported user delegation SAS over account-key-based delegation where appropriate.
Classification, auditing and change history
- **Sensitivity classification** labels columns by information type and sensitivity. It supports discovery and audit context but does not itself mask, encrypt or deny access. **Microsoft Purview** scans need authorized identity and network reachability.
- **SQL auditing** records selected actions. SQL Server uses an audit plus server/database audit specifications; Azure SQL auditing routes events to supported Storage, Log Analytics or Event Hubs destinations.
- **Retention** must be configured at the audit destination. Storage lifecycle rules and workspace retention govern how long records survive; enabling auditing alone does not establish a required retention period.
- **Microsoft Defender for SQL** adds vulnerability assessment and threat detection. Use parameterized queries and least privilege to prevent SQL injection; threat alerts do not replace secure application code.
- **Change tracking** identifies changed rows with lightweight metadata for synchronization. **CDC** captures logged changes, including historical values, into change tables; neither is a substitute for a complete security audit.
- **CDC setup** enables the database and selected tables, then manages capture/cleanup and retention. Enable database/table change tracking separately when lightweight row synchronization is the requirement.
Monitor, configure, and optimize database resources (20-25%)
Baselines, metrics and alerts
- **Performance baselines** capture representative CPU, data I/O, log I/O, memory, storage and concurrency. Compare workload changes with service limits before increasing capacity; identify the saturated resource first.
- **sys.dm_db_resource_stats** provides recent fine-grained Azure SQL Database resource samples. **sys.resource_stats** in virtual master provides a longer resource history across databases; use Azure Monitor for durable monitoring.
- **Diagnostic settings** export supported metrics and resource logs. Select the correct server, pool, database or instance-database scope. **Log Analytics/KQL** analyzes logs; Event Hubs forwards telemetry to external consumers.
- **Metric alerts** detect resource thresholds; **Activity Log alerts** detect management changes such as resizing. **Service Health alerts** report service incidents and maintenance. **Action groups** provide reusable notification and automation actions.
- **Dynamic thresholds** learn usage patterns; lower sensitivity and a longer evaluation requirement reduce noise. Scope multidimensional or multi-resource rules deliberately so new databases are included where supported.
- **Database watcher** centralizes supported Azure SQL workload monitoring. Platform metrics, engine DMVs, audit logs and Extended Events answer different questions; choose collection and retention for the evidence needed.
Query Store and automatic tuning
- **Query Store** retains query text, plans and runtime history for regression analysis. Keep it in READ_WRITE mode, size its storage, set retention/cleanup and choose a capture policy appropriate to workload volume.
- **QUERY_CAPTURE_MODE = ALL** includes all eligible queries; AUTO/CUSTOM can reduce noise and storage. **INTERVAL_LENGTH_MINUTES** controls runtime aggregation granularity; shorter intervals create more detailed history and more data.
- **DATA_FLUSH_INTERVAL_SECONDS** controls persistence timing. A full quota or another read-only condition can stop new capture; inspect **sys.database_query_store_options**, actual state and read-only reasons before changing settings.
- **Plan forcing** selects a known suitable plan without changing application SQL. Compare duration, CPU, reads and workload conditions; monitor forcing failures and release the force when the underlying issue is fixed.
- **FORCE_LAST_GOOD_PLAN** enables automatic plan correction. Azure SQL Database also supports automatic index recommendations/actions; Managed Instance automatic tuning focuses on plan correction. Configure supported options explicitly for performance tests.
Execution plans and query design
- **Estimated plans** show optimizer choices without executing the query. **Actual plans** add runtime evidence after execution. **Live Query Statistics** shows progress and operator statistics while a query is running.
- **LAST_QUERY_PLAN_STATS** enables retrieval of the last known actual plan through **sys.dm_exec_query_plan_stats** where supported. Cached evidence is transient; it is distinct from Query Store's historical aggregates.
- **sys.dm_exec_requests** identifies current statements, waits and blocking. Combine handles with **sys.dm_exec_sql_text** and **sys.dm_exec_query_plan**; use cached query statistics for cumulative completed-execution evidence.
- **Key lookups** retrieve columns missing from a nonclustered index. Consider a covering index with suitable INCLUDE columns, while weighing index size and write cost. A high estimated cost alone is not runtime proof.
- **Cardinality errors**, implicit conversions, spills, scans and excessive logical reads guide tuning. Keep predicates searchable, use suitable join keys and update relevant statistics before adding hints.
- **Parameter sensitivity** occurs when a reusable plan suits some parameter values poorly. Compare representative values and plans; supported IQP features, targeted recompilation or Query Store controls may help.
Waits, blocking and tempdb
- **LCK_M_*** indicates lock waits. Correlate **sys.dm_exec_requests**, blocking_session_id and **sys.dm_tran_locks**; find the head blocker and transaction scope rather than treating each waiting session independently.
- **RESOURCE_SEMAPHORE** indicates waiting for an execution memory grant. Check **sys.dm_exec_query_memory_grants**, large sorts/hashes, row estimates and concurrency before deciding that more compute is necessary.
- **PAGELATCH_*** waits concern in-memory page synchronization; **PAGEIOLATCH_*** concerns pages waiting on I/O. A resource in database ID 2 points to tempdb, but identify the page type before diagnosing allocation contention.
- **tempdb allocation contention** may improve with equally sized data files and matching growth increments. Start with a sensible CPU-based file count, commonly up to eight, and add files only when measurements justify it.
- **Temporary objects, sorts and row versions** consume tempdb. Reduce avoidable create/drop activity and excessive work; suitable memory-optimized structures can help selected workloads. More files do not fix every tempdb bottleneck.
- **READ_COMMITTED_SNAPSHOT** uses statement-level committed row versions to reduce reader/writer blocking. **SNAPSHOT** supplies a transaction-level view when enabled and selected; writers can still conflict, and version storage must be sized.
Indexes, statistics and storage maintenance
- **sys.dm_db_index_usage_stats** reports seeks, scans, lookups and updates. **sys.dm_db_index_operational_stats** reports operational activity and contention; **sys.dm_db_index_physical_stats** reports physical layout and fragmentation.
- **Statistics** describe data distribution for cardinality estimates. Maintain them after significant changes and inspect sample quality; rebuilding one index does not refresh every column statistic in the database.
- **Index maintenance** should follow page count, fragmentation, page density and workload evidence. Rebuild/reorganize consume I/O and logging; use supported online/resumable options when availability requires them.
- **FILLFACTOR = 70** leaves roughly 30 percent free on leaf pages during creation/rebuild. It can reduce splits for suitable inserts but increases index size and reads; free space is not continuously maintained.
- **Allocated space** differs from used space. In **sys.database_files**, size is in 8-KB pages: divide by **128.0** for MB; subtract FILEPROPERTY(name, 'SpaceUsed') for unused data-file space.
- **Autogrow** is a safety mechanism, not capacity planning. Pre-size files and use sensible fixed growth increments. Avoid routine autoshrink; targeted **DBCC SHRINKFILE** after exceptional reclamation can introduce fragmentation.
Engine configuration and workload limits
- **Database compatibility level** controls selected language and optimizer behaviors; level 110 aligns relevant behavior with SQL Server 2012. It does not emulate every server feature or replace migration testing.
- **Database-scoped configuration** sets controls such as MAXDOP, parameter sniffing and QUERY_OPTIMIZER_HOTFIXES. Use it for Azure SQL Database settings that are not exposed through instance-level sp_configure.
- **OPTIMIZE_FOR_AD_HOC_WORKLOADS** reduces cache memory for first-use ad hoc plans by storing stubs. Parameterization can increase plan reuse; check workload behavior before forcing it.
- **Intelligent query processing** includes supported batch-mode execution, adaptive joins and memory-grant feedback. Batch mode on rowstore can help analytics without requiring a columnstore index; eligibility depends on query and compatibility.
- **Resource Governor** classifies sessions into workload groups backed by resource pools on supported engines. Pools and groups constrain resource use; register the classifier and reconfigure after changes.
- **Azure SQL Database resource limits** are managed by the service. Scale or isolate workloads when necessary; custom Resource Governor configuration is not available there. Log-rate limits cannot be removed by changing its recovery model.
Warehouse and streaming diagnostics
- **Synapse skew** creates uneven work across distributions. Inspect row/space distribution with **DBCC PDW_SHOWSPACEUSED** or **sys.dm_pdw_nodes_db_partition_stats** against the dedicated pool; revise poor distribution keys.
- **Resource classes/workload groups** trade per-query memory against concurrency in dedicated SQL pools. Large loads need adequate memory; monitor queuing, data movement and cache behavior before scaling DWUs.
- **Stream Analytics** capacity signals include SU utilization, backlogged input events and watermark delay. Delay can also reflect source or sink throttling; increasing streaming units helps only when processing capacity is limiting.
- **Databricks monitoring** combines cluster/audit events, Spark listener or metrics output and application telemetry. Route supported logs to centralized analysis; cluster lifecycle logs identify compute changes.
Configure and manage automation of tasks (15-20%)
SQL Server Agent jobs and execution identity
- **SQL Server Agent** schedules jobs on SQL Server and Managed Instance. Jobs contain steps, schedules, ownership and retry/failure actions. Azure SQL Database uses alternatives such as elastic jobs or Automation.
- **SQLAgentUserRole**, **SQLAgentReaderRole** and **SQLAgentOperatorRole** are msdb roles with increasing visibility/control. UserRole manages owned jobs; ReaderRole can view all jobs; OperatorRole adds operational control over local jobs.
- **Credentials** store an external execution identity; **proxies** authorize that identity for selected Agent subsystems and callers. Creation/management of proxies requires appropriate administrator rights, separate from permission to use one.
- **Least-privilege job execution** grants the service account its required OS rights and grants external identities only needed share/NTFS access. T-SQL job-step execution context differs from CmdExec, PowerShell and SSIS proxy execution.
- **MSX/TSX multiserver administration** distributes jobs from a master to targets. Match proxy names and enable supported downloaded-job proxy mapping on targets; confirm platform support before migrating a master or target.
Notifications and operational troubleshooting
- **Database Mail** needs an account, profile and supported SMTP connectivity. Configure Agent to use mail, create an operator and attach job notifications for failure, success or completion.
- **Managed Instance Agent mail** uses the supported **AzureManagedInstance_dbmail_profile** configuration. Job output files and OS-dependent steps may need redesign because the managed service does not expose a normal local filesystem.
- **Job troubleshooting** checks history, step output, owner, proxy/subsystem permissions, network access and retries. A successful interactive command can fail under the Agent execution identity.
- **Patch orchestration** coordinates restarts and maintenance windows. Avoid overlapping SQL VM automated patching with Azure Update Manager scheduling; keep the SQL IaaS Agent extension for supported portal management.
Elastic jobs, runbooks and governance
- **Elastic jobs** run T-SQL across Azure SQL Database targets. Provision the job database and agent, define target groups, grant target permissions and schedule idempotent steps with suitable retry behavior.
- **Elastic-job authentication** can use a supported user-assigned managed identity or database-scoped credentials. Credential-based target discovery and job execution may need separate grants in virtual master and target databases.
- **Azure Automation** runs scheduled administrative workflows through supported PowerShell modules and identities. Grant resource-management permissions and database permissions separately; use an appropriate worker when private network or local execution is needed.
- **Policy-Based Management** evaluates SQL configuration through facets, conditions and policies. **Azure Policy initiatives** group resource-governance definitions; assignments set scope and supported remediation tasks address existing resources.
- **SQL VM fleet management** should separate OS/service health from database maintenance. Use supported configuration or automation tooling to enforce service state, patch policy, backups and monitoring consistently.
Repeatable infrastructure and schema deployment
- **ARM/Bicep** deploys Azure resources; **SSDT/DACPAC** deploys schema and permissions. Parameterize names, locations, sizing and networking so environments can share configuration without sharing secrets.
- **Microsoft.Sql/servers/databases** depends on a logical SQL server. **Microsoft.Sql/managedInstances** has instance and subnet dependencies; **Microsoft.Sql/servers/elasticPools** describes pooled capacity.
- **az sql db create** identifies the database with name, resource group and server. CLI, PowerShell and templates configure resource settings; post-deployment SQL establishes database objects and application permissions.
- **Deployment validation** checks provisioning state, SKU, storage, identity, firewall/DNS and dependencies. Declared infrastructure success does not establish that an application can authenticate or execute its workload.
Data pipelines and event-driven processing
- **Data Factory/Synapse pipelines** orchestrate activities. A parent pipeline can run independent ingestions in parallel, then dimensions and facts through success dependencies; configure failure paths and idempotent reruns.
- **Schedule triggers** run on a clock. **Tumbling-window triggers** track stateful windows with dependencies, retries and backfill. **Storage-event triggers** use Event Grid for file arrival/deletion events.
- **Incremental loads** track a durable watermark or change feed and advance it only after successful processing. **Get Metadata** reads file metadata; explicitly pass the value into the copy/transformation to persist it in destination rows.
- **Copy parallelism** can use supported dynamic-range partitioning for extraction and staged bulk loading into Synapse. Pipeline annotations aid monitoring filters; activity policies control retries, timeout and concurrency.
- **Databricks notebooks** run language-specific code through cell commands such as %sql, %scala and %r. Job compute suits scheduled processing; instance pools reduce eligible compute startup time while adding idle-capacity considerations.
- **Structured Streaming** append emits new result rows, update emits changed rows and complete emits the full result table. Aggregation output depends on watermark/window semantics and sink support; arrival-time filtering is a separate concern.
- **Stream Analytics windows**: tumbling windows are nonoverlapping; hopping windows can overlap; session windows follow activity gaps. Ranking functions such as TOPONE select a record within the requested partition/window.
Plan and configure a high availability and disaster recovery environment (20-25%)
Recovery objectives and managed availability
- **RPO** is acceptable data loss measured in time; **RTO** is acceptable recovery duration. Measure detection, decision, failover/restore and application reconnection as part of recovery testing.
- **High availability** handles component failures; **disaster recovery** addresses larger outages; **backups** recover historical states and accidental changes. Replicas alone do not protect against every deletion or corruption scenario.
- **Zone redundancy** spreads supported service replicas or storage across availability zones in one region. It addresses datacenter failure; cross-region replication or geo-redundant backups address regional disaster recovery.
- **Read scale-out** offloads supported queries to eligible replicas with **ApplicationIntent=ReadOnly**. An internal HA replica is not necessarily an independently addressable copy, and replica reads can lag primary writes.
- **Hyperscale HA/named replicas** support different availability and read-workload needs. Capacity and replica counts must be selected explicitly; a service's internal replication does not automatically provide several client-readable databases.
Geo-replication and failover groups
- **Active geo-replication** creates readable asynchronous Azure SQL Database secondaries. **Failover groups** coordinate failover and expose stable read-write/read-only listener names; use the listener in application connection strings.
- **Planned failover** waits for synchronization where possible. **Forced failover** can lose recent committed writes with asynchronous replication. Automatic failover follows its configured policy and grace period, not an immediate-outage guarantee.
- **Managed Instance failover groups** replicate user databases at instance scope. Plan partner-instance sizing, network connectivity and replicated versus instance-specific objects; individual database failover is a different capability.
- **Application readiness** includes target-side logins/identities, firewall rules, private DNS and dependencies. Contained users and database-level firewall rules travel with supported database replication; server-level configuration needs separate attention.
- **Failover clients** must reconnect and retry transient errors. Stable DNS names remove connection-string edits but do not preserve every active session or transaction; test driver timeout and retry behavior.
Native backup chains and restores
- **Full backup** establishes a restore base. **Differential backup** contains changes since its differential base. **Log backups** preserve the log sequence for point-in-time recovery under an appropriate recovery model.
- **Restore order** is full, latest applicable differential, then every required log in sequence. Use **NORECOVERY** while more restores remain; use **RECOVERY** to bring the database online after the final restore.
- **Tail-log backup** captures remaining log records before a supported restore, when possible. **STOPAT** targets a recovery time within the available log chain; restore testing verifies more than file existence.
- **COPY_ONLY full backups** do not reset the differential base. Secondary-replica backup capabilities depend on SQL Server version; align jobs with replica role, backup preference and supported backup types.
- **BACKUP/RESTORE TO/FROM URL** uses Blob Storage credentials and supported authentication. SAS-based credentials commonly use the container URL as the name and the token without its leading question mark as the secret.
- **Striped backups** use multiple backup devices and require every stripe during restore. **CHECKSUM** helps detect corruption; compression can reduce transfer/storage, while backup encryption needs a recoverable certificate or asymmetric key.
- **System databases and encryption keys** need separate protection. master uses full backups; restoring a user database does not recreate all logins, jobs or credentials. For SSISDB recovery, preserve its master key and required instance configuration.
Managed backups, retention and integrity
- **Azure SQL automated backups** support point-in-time restore within configured short-term retention. **LTR** retains selected full backups with weekly/monthly/yearly policies; it does not provide arbitrary point-in-time recovery across the whole retention period.
- **Azure SQL Database restore** creates a new database instead of overwriting an existing one through native RESTORE. Plan naming, application cutover and cleanup; cross-server/region restore support depends on restore type and platform.
- **Managed Instance native backups** use supported COPY_ONLY backups to Blob Storage alongside service-managed backups. Preserve external encryption material and check target compatibility before relying on a native backup for portability.
- **Geo-restore** depends on geo-redundant backup copies and can have more data loss and recovery delay than a warm replica. **LTR** recovery addresses long-lived history; verify recovery expectations for deleted databases and deleted servers separately.
- **Azure Backup for SQL in Azure VMs** centralizes supported database backups in a Recovery Services vault. **Site Recovery** replicates machines for recovery orchestration; it serves a different purpose from database backup history.
- **DBCC CHECKDB** checks database consistency. PHYSICAL_ONLY reduces check depth for faster physical checks; NOINDEX omits intensive nonclustered-index checks. Continue scheduled full checks rather than treating a fast check as equivalent.
- **Corruption recovery** favors a known good restore. REPAIR_REBUILD performs supported repairs without data loss; REPAIR_ALLOW_DATA_LOSS is a last resort and can remove data. Repair operations require the appropriate exclusive database state.
- **Snapshot backups** coordinate database write suspension, storage snapshots and backup metadata on supported SQL Server deployments. Keep the snapshot set and metadata consistent; snapshotting disks independently can produce an unusable recovery set.
Availability groups and failover clusters
- **Always On availability groups** replicate databases between SQL instances. **Synchronous commit** waits for required secondary log hardening; **asynchronous commit** avoids that network round trip but can lose data on forced failover.
- **Automatic AG failover** requires a supported synchronized synchronous pair and healthy clustering/quorum. Seed a secondary by restoring full/log backups WITH NORECOVERY, then join it, or use supported automatic seeding.
- **AG endpoints** carry replica traffic, often on TCP 5022; allow the configured port. Certificate authentication needs certificates, logins/users and endpoint CONNECT permissions on both sides; client TLS is a separate configuration.
- **Failover cluster instance** protects an entire instance through shared storage and a cluster name. It simplifies instance-object failover but requires resilient shared storage; it does not create an independent database copy.
- **Quorum and witness** prevent conflicting cluster ownership. A cloud witness supplies an arbitration vote using Blob Storage; select a failure domain independent of the nodes and distinguish it from shared database storage.
- **Listener connectivity** may use a VNN with a supported load balancer, a supported DNN design or a multi-subnet deployment. Use compatible drivers and MultiSubnetFailover where applicable; topology affects dependencies and reconnection time.
- **Linux HA** uses supported cluster managers/resource agents and suitable fencing/storage configuration. **Availability sets**, zones and proximity placement groups solve different placement goals; proximity reduces latency but does not supply clustering.
Disaster recovery drills and storage lifecycle
- **Log shipping** repeatedly backs up, copies and restores transaction logs to a warm secondary. Recovery is normally manual, and restore lag determines data currency; it differs from readable replicas and automatic failover groups.
- **Azure Site Recovery test failover** starts recovery machines in an isolated network without replacing production. Test databases, dependencies, identity, routing and application behavior; clean up test resources afterward.
- **LRS** protects within a location; **ZRS** spans zones; **GRS/GZRS** adds asynchronous regional copies. **RA** variants permit secondary reads before account failover. Select redundancy for both outage access and data-loss tolerance.
- **Blob lifecycle management** moves eligible objects to lower-cost tiers and deletes them after retention. Hot favors frequent access; Cool/Cold remain online; Archive requires rehydration and is unsuitable for immediate reads.
- **Immutability retention** prevents modification/deletion for its retention conditions; lifecycle deletion expires data when permitted. Neither replaces SQL backup-chain validation or a tested recovery procedure.