当您达到 SQL Server Express 4GB / 10GB 限制时会发生什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3159136/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What happens when you hit the SQL Server Express 4GB / 10GB limit?
提问by hawbsl
What kind of error occurs? What do users experience? Can you access the database using tools and what if you get it back under the 4GB / 10GB limit?
出现什么样的错误?用户体验什么?您可以使用工具访问数据库吗?如果您将其恢复到 4GB / 10GB 限制之下会怎样?
采纳答案by Jason
As I understand it you will start to see exception messages appear within your event log, such as:
据我了解,您将开始看到事件日志中出现异常消息,例如:
Could not allocate space for object 'dbo.[table]' in database '[database]' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup.
无法为数据库“[database]”中的对象“dbo.[table]”分配空间,因为“PRIMARY”文件组已满。通过删除不需要的文件、删除文件组中的对象来创建磁盘空间。
If you can then reduce the size of the database, you can then continue to add etc as before. Tools should carry on working regardless of the database size.
如果您可以减小数据库的大小,则可以像以前一样继续添加等。无论数据库大小如何,工具都应该继续工作。
Hope this helps!
希望这可以帮助!
回答by Aidin
It is too late but I tested it. The maximum size for SQL express 2008 R2 is 10240 MB for each database. After I reached that I got this error on insert:
为时已晚,但我测试了它。SQL express 2008 R2 的最大大小为每个数据库 10240 MB。在我到达之后,我在插入时遇到了这个错误:
Could not allocate space for object 'TableName'.'PK_Nme' in database 'DBName' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
无法为数据库 'DBName' 中的对象 'TableName'.'PK_Nme' 分配空间,因为 'PRIMARY' 文件组已满。通过删除不需要的文件、删除文件组中的对象、向文件组添加其他文件或为文件组中的现有文件设置自动增长来创建磁盘空间。
After this I restart the SQL service, It stopped and started with no problem. I still could run Select, update delete command. (I did test update command and it was success, but I think If you update to something bigger it may throw error!)
在此之后,我重新启动 SQL 服务,它停止并正常启动。我仍然可以运行选择,更新删除命令。(我确实测试了更新命令并且成功了,但我认为如果你更新到更大的东西可能会抛出错误!)
回答by 8kb
You might see an error like this:
您可能会看到如下错误:
CREATE DATABASE or ALTER DATABASE failed because the resulting cumulative database size would exceed your licensed limit of 4096 MB per database.
CREATE DATABASE 或 ALTER DATABASE 失败,因为产生的累积数据库大小将超过每个数据库 4096 MB 的许可限制。
Or this:
或这个:
Could not allocate space for object 'dbo.buyspace'.'PK__buyspace__4B5BD7F83A81B327' in database 'WAYTOOBIG' because the 'PRIMARY' filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
无法为数据库 'WAYTOOBIG' 中的对象 'dbo.buyspace'.'PK__buyspace__4B5BD7F83A81B327' 分配空间,因为 'PRIMARY' 文件组已满。通过删除不需要的文件、删除文件组中的对象、向文件组添加其他文件或为文件组中的现有文件设置自动增长来创建磁盘空间。
That's from our error log.
那来自我们的错误日志。
回答by Jeff Maass
Users experience the application not working, usually beginning with strange errors that have bubbled up way too high.
用户遇到应用程序无法运行的情况,通常是从突然出现的奇怪错误开始。
Any app built on a Express should have as part of its initial planning - how do we keep the size down. The plan - we'll worry about it whenever is ok, until someone has to fork over the license fee. And that is usually after tons of frustration, down time, debugging, someone thought the problem was a full drive, someone else thought it was that new code release, etc, frustration, etc. and the user has spent some time looking for another vendor who can plan ahead. Which I'm sure is exactly what you are doing. Kudos to you for thinking of your user first!!!!!!!!!
任何构建在 Express 上的应用程序都应该将其作为其初始规划的一部分——我们如何保持大小不变。计划 - 我们会在一切顺利的时候担心它,直到有人不得不支付许可费。这通常是在经历了大量的挫折、停机、调试之后,有人认为问题是驱动器满了,其他人认为是新代码发布等,挫折等等,用户花了一些时间寻找另一个供应商谁能提前计划。我敢肯定这正是你在做什么。 感谢您首先考虑您的用户!!!!!!!!!
回答by Gavin
Actions that increase the size will fail, e.g Insert, Update. You will still be able to access the database and run maintenance on it to bring the size back down.
增加大小的操作将失败,例如插入、更新。您仍然可以访问数据库并对其运行维护以降低大小。
I would setup some maintenance jobs to alert you before the database reaches this size so you can prevent any data being lost.
我会设置一些维护作业来在数据库达到这个大小之前提醒你,这样你就可以防止任何数据丢失。
回答by Franti?ek ?ia?ik
Probably you won't be able to insert any more data, but you will be able to select.
可能您将无法插入更多数据,但您可以选择。
回答by JonPayne
If I remember correctly, when it happened to us, the database just stopped. We had to do a backup to clear enough space to get in and resolve things.
如果我没记错的话,当它发生在我们身上时,数据库就停止了。我们必须进行备份以清除足够的空间来进入并解决问题。
You might like to know that SQL Server 2008 Express R2 now has a 10GB limit, so it might be worth upgrading.
您可能想知道 SQL Server 2008 Express R2 现在有 10GB 的限制,因此可能值得升级。