SQL Server Error 699 typically occurs when the database engine cannot read the expected data from the underlying Azure storage layer, often due to transient network interruptions, incorrect storage account permissions, or a mismatch between the database's expected state and the actual physical files in Azure Blob Storage. To fix this, you must first verify the connectivity between the SQL instance and the Azure storage account, ensure the Managed Identity or Access Key has full read/write permissions, and check for storage throttling or outages in the specific Azure region.
What You'll Need
- Administrative access to the Azure Portal.
- SQL Server Management Studio (SSMS) or Azure Data Studio.
- Contributor or Owner permissions for the Azure Subscription containing the storage account.
- Knowledge of the specific Storage Account name associated with the SQL instance.
Step-by-Step
- Verify Azure Service Health: Before changing configurations, check the Azure Service Health dashboard. Navigate to the Azure Portal, search for "Service Health," and check for any active outages or planned maintenance affecting the storage or SQL services in your specific region. If a regional outage is occurring, Error 699 is likely a symptom of the platform failure, and you must wait for Microsoft to resolve the underlying infrastructure issue.
- Check Storage Account Connectivity: Ensure that the storage account containing the database files is accessible. Go to the storage account in the Azure Portal and check the "Networking" tab. If "Enabled from selected virtual networks and IP addresses" is selected, verify that the SQL Server's virtual network (VNet) or its specific subnet is explicitly allowed. If the firewall is blocking the SQL engine, it will trigger a failure to read data because the request is dropped before it reaches the storage disk.
- Validate Identity and Access Management (IAM): SQL Server in Azure relies on specific permissions to read data from blobs. Navigate to the Storage Account > Access Control (IAM) > Role Assignments. Ensure that the Managed Identity used by the SQL instance has the "Storage Blob Data Contributor" or "Storage Blob Data Owner" role. A common cause of Error 699 is a permission change where the identity still has "Reader" access (which allows listing files) but lacks the actual data-plane permission to read the byte-stream of the database files.
- Inspect Storage Account Keys: If you are using Access Keys rather than Managed Identities, verify that the keys have not been rotated recently. If the keys were rotated in the storage account but not updated in the SQL Server configuration, the engine will fail to authenticate, resulting in a read failure. Update the connection strings or credentials in the SQL instance settings to match the current primary or secondary key.
- Analyze Storage Throttling: High I/O demand can lead to storage throttling, which may manifest as a timeout that the SQL engine interprets as a failure to read expected data. In the Azure Portal, go to the Storage Account > Monitoring > Metrics. Select "Ingress" and "Egress" and look for spikes that hit the account limit. If you see a high number of "ClientOtherErrors" or "ServerTimeoutErrors," you may need to move the data to a Premium storage tier or distribute the load across multiple storage accounts.
- Run DBCC CHECKDB: If the connectivity and permissions are correct, the error may be caused by logical or physical corruption within the data pages. Open SSMS, connect to the database, and run
DBCC CHECKDB ('YourDatabaseName') WITH NO_INFOMSGS, ALL_ERRORMSGS;. This command scans the database for consistency. If it reports allocation errors or page corruption, the "expected data" is missing because the page is corrupted, not because of a network failure. - Perform a Point-in-Time Restore (PITR): If
DBCC CHECKDBreveals corruption that cannot be repaired with theREPAIR_ALLOW_DATA_LOSSoption, your best course of action is to restore the database to a state before the error occurred. In the Azure Portal, go to your SQL Database > Restore. Select a point in time just before the first occurrence of Error 699. This creates a new database from the Azure backups, bypassing the corrupted files in the current storage layer.
Common Mistakes
One of the most frequent mistakes is assuming that "Contributor" access at the Subscription level automatically grants "Storage Blob Data Contributor" access. In Azure, RBAC roles for the management plane (creating/deleting accounts) are separate from the data plane (reading/writing blobs). Many administrators assign the Contributor role and are surprised when the SQL engine still cannot read the data. You must explicitly assign the data-plane roles.
Another common error is ignoring the "Networking" settings of the storage account. Users often enable "Allow Azure services to access this storage account," believing this covers all SQL instances. However, if the SQL instance is inside a specific VNet with strict Network Security Group (NSG) rules, the traffic may still be blocked. Always verify the specific subnet rules rather than relying on the general "Allow Azure services" toggle.
Finally, attempting to run DBCC CHECKDB with REPAIR_ALLOW_DATA_LOSS as a first step is a mistake. This command can permanently delete data to make the database structurally sound. Always attempt a backup restore or a Point-in-Time Restore first to preserve data integrity.
Tips
To prevent Error 699 in the future, implement a monitoring alert for storage latency. By setting an alert in Azure Monitor for "Storage Read Latency," you can be notified when the system is struggling to fetch data before it reaches the threshold that triggers a SQL Server error. This allows you to scale your storage tier proactively.
When managing multiple environments, use a User-Assigned Managed Identity rather than a System-Assigned one. User-assigned identities are independent of the resource lifecycle, meaning if you have to recreate the SQL instance, you don't have to re-assign all the storage permissions from scratch, reducing the window for configuration errors that lead to read failures.
Regularly schedule DBCC CHECKDB runs during low-traffic windows. While Azure provides underlying storage redundancy, logical corruption can still occur. Catching these issues early via scheduled maintenance prevents them from becoming critical "failure to read" errors during peak production hours.
Troubleshooting
If the steps above do not resolve the issue, start by isolating the problem. Try to access the storage account using the Azure Storage Explorer tool from a machine with the same network permissions as the SQL Server. If you cannot download a blob manually, the issue is definitively at the storage/network layer, not the SQL engine.
If you can access the blobs manually but the SQL Server still throws Error 699, check the SQL Server Error Log. Look for accompanying errors such as "Operating system error 5 (Access is denied)" or "Operating system error 64 (The specified network name is no longer available)". An error 5 confirms a permission issue, while error 64 points to a network instability or a DNS failure within the Azure VNet.
If the error persists despite perfect connectivity and permissions, check for "orphaned" files. This happens when the SQL metadata expects a file to exist in the storage account, but the file was manually deleted or moved. In this case, the only resolution is to restore from a backup, as the SQL engine cannot "re-create" missing data pages on its own.
Frequently Asked Questions
Is Error 699 always a sign of data corruption?
No. While it can indicate corruption, it is more frequently a connectivity or permission issue where the SQL engine is physically unable to reach the storage blob containing the data.
Will restarting the Azure SQL instance fix this?
A restart may resolve transient network glitches or clear a hung I/O request, but it will not fix incorrect IAM permissions or physical data corruption.
Does this error happen in on-premises SQL Server?
Error 699 is specific to environments where SQL Server interacts with Azure storage (such as Azure SQL Managed Instance or SQL Server using Azure Blob Storage for backups/snapshots). On-premises servers usually report different OS-level disk errors.
Can I fix Error 699 without losing data?
Yes, if the cause is networking or permissions, fixing those settings restores access immediately without data loss. If the cause is corruption, a Point-in-Time Restore is the best way to recover data with minimal loss.
How long does a Point-in-Time Restore take?
The duration depends on the size of the database and the amount of transaction log data that needs to be replayed. Small databases may take minutes, while multi-terabyte databases can take several hours.