简体   繁体   English

Azure - 数据库[NAME]已达到其大小配额

[英]Azure - The database [NAME] has reached its size quota

This morning I received an email stating my website was not working. 今天早上我收到一封电子邮件,说明我的网站无法使用。 I'm getting an error when ever I try to write to my database. 我尝试写入数据库时​​收到错误。 The Error is: 错误是:

The database [NAME] has reached its size quota. 数据库[NAME]已达到其大小配额。 Partition or delete data, drop indexes, or consult the documentation for possible resolutions. 分区或删除数据,删除索引或查阅文档以获取可能的解决方案。

My database is only 16MB with a 2GB limit! 我的数据库只有16MB,限制为2GB! I ran this query on the database after doing some research. 在做了一些研究之后,我在数据库上运行了这个查询。

SELECT DATABASEPROPERTYEX ('DatabaseName','Edition')
SELECT DATABASEPROPERTYEX('DatabaseName','MaxSizeInBytes')
SELECT (SUM(reserved_page_count) * 8192)
FROM    sys.dm_db_partition_stats

Results were 结果是

Basic 基本

2147483648 2147483648

15777792 15777792

Obviously my database is much smaller than the max size. 显然我的数据库比最大尺寸小得多。 Is there any other problem that may cause this to happen? 还有其他可能导致这种情况发生的问题吗?

I am going to try to delete and restore the database in the mean time. 我将尝试同时删除和恢复数据库。

Thanks! 谢谢!

UPDATE UPDATE

Once I restored the database, it started working again. 一旦我恢复了数据库,它就开始重新运行了。

Just encountered similar problem (same exception message) with Azure DB last night - we have a 50 GB quota for elastic DB pool in Azure and total size of pool DB's is around 4 GB now. 刚刚遇到与Azure数据库类似的问题(相同的异常消息) - 我们在Azure中有弹性数据库池的50 GB配额,池DB的总大小现在大约为4 GB。 So i was expecting that all databases can grow as long as they reach total pool quota. 所以我期望只要达到总池配额,所有数据库都可以增长。

Turns out though that Azure actually handles quotas not based on what you have set in service plan for DB or elastic pool, but based on the quota property stored in DB instead: https://blogs.msdn.microsoft.com/sqlcat/2016/09/13/real-world-azure-sql-db-unexpected-database-maximum-size-limit/ 事实证明,Azure实际上处理的配额不是基于您在数据库或弹性池的服务计划中设置的,而是基于存储在DB中的配额属性: https//blogs.msdn.microsoft.com/sqlcat/2016 / 09/13 /真实世界的蔚蓝-SQL-DB-意外性的数据库最大尺寸限制/

Specifically, when a database with a size quota explicitly lowered from the default is scaled up to a higher service objective, its size quota remains unchanged. 具体而言,当从默认值明确降低大小配额的数据库扩展到更高的服务目标时,其大小配额保持不变。 For an administrator expecting the maximum size quota for the new service objective to be in effect after the scaling operation completes, this may be an unpleasant surprise. 对于期望在缩放操作完成后新服务目标的最大大小配额生效的管理员,这可能是令人不快的意外。

Is it sql db V12? 是sql db V12吗? If SQLDB v12, you can query sys.database_files to see the actual size of the database files. 如果是SQLDB v12,则可以查询sys.database_files以查看数据库文件的实际大小。 I would suggest upgrading to V12 as it brings lot of features that aren't there in earlier version of SQL offering. 我建议升级到V12,因为它带来了早期版本的SQL产品中没有的许多功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM