Database maintenance
The App Store for Intune uses Azure SQL Database Basic tier, which includes built-in automatic maintenance features. No manual database maintenance is required.
Why no manual maintenance is needed
Section titled “Why no manual maintenance is needed”Azure SQL Database handles all maintenance tasks automatically, including:
| Feature | Description |
|---|---|
| Automatic Index Tuning | Azure monitors query patterns and automatically creates, drops, or rebuilds indexes to optimize performance |
| Automatic Plan Correction | Detects and fixes query plan regression issues automatically |
| Automatic Backups | Point-in-Time Restore (PITR) with 7-day retention (Basic tier), up to 35 days on higher tiers |
| Geo-Redundant Storage | Backups are stored redundantly across Azure regions for disaster recovery |
| Automatic Updates | Database engine patches and security updates applied automatically with no downtime |
| Automatic Statistics | Query statistics are automatically updated to ensure optimal query plans |
What about maintenance scripts?
Section titled “What about maintenance scripts?”You may be familiar with on-premises SQL Server maintenance solutions like Ola Hallengren’s Maintenance Solution that schedule index rebuilds, integrity checks, and backup jobs. These are not needed for Azure SQL Database because:
-
Index Maintenance: Azure’s automatic tuning handles index optimization. For a Basic tier database under 2GB, index fragmentation has minimal impact on performance.
-
Integrity Checks (DBCC CHECKDB): Azure runs these automatically. You cannot schedule them yourself on Azure SQL Database.
-
Backup Jobs: Azure manages all backups automatically. You cannot create your own backup jobs, instead, you use Azure’s built-in Point-in-Time Restore feature.
-
Statistics Updates: Azure automatically updates statistics as needed. Manual
UPDATE STATISTICScommands are rarely necessary.
Backup and recovery
Section titled “Backup and recovery”Azure SQL Database provides built-in backup and recovery capabilities:
| Tier | PITR Retention | Backup Storage |
|---|---|---|
| Basic | 7 days | Geo-redundant (GRS) |
| Standard | 35 days | Geo-redundant (GRS) |
| Premium | 35 days | Geo-redundant (GRS) |
To restore your database:
- Go to Azure Portal > SQL databases > your database
- Select Restore in the toolbar
- Select a restore point (any time within retention period)
- Azure creates a new database with data as of that point in time
When to consider scaling up
Section titled “When to consider scaling up”The Basic tier (2GB, 5 DTUs) is suitable for the App Store for Intune’s typical workload. Consider scaling up if you observe:
- Consistent high DTU usage (>80%) in Azure metrics
- Slow query response times
- Timeouts during peak usage
To scale up:
- Go to Azure Portal > SQL databases > your database
- Select Compute + storage
- Select a higher tier (Standard, Premium) or increase DTUs
- Changes take effect within minutes with minimal downtime
Manual maintenance (if ever needed)
Section titled “Manual maintenance (if ever needed)”In rare cases where you need to manually optimize, you can:
-- View index fragmentation (informational only)SELECT OBJECT_NAME(ips.object_id) AS TableName, i.name AS IndexName, ips.avg_fragmentation_in_percentFROM sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, 'LIMITED') ipsJOIN sys.indexes i ON ips.object_id = i.object_id AND ips.index_id = i.index_idWHERE ips.avg_fragmentation_in_percent > 30ORDER BY ips.avg_fragmentation_in_percent DESC;
-- Rebuild a specific index if needed (usually not necessary)ALTER INDEX [IX_AppRequests_UserId] ON [AppRequests] REBUILD;However, for the App Store for Intune’s typical data volumes (hundreds to thousands of app requests), this manual intervention is almost never necessary.