Sql-Server
Azure SQL 數據庫拋出錯誤 1132“彈性池已達到其儲存限制”錯誤,即使它未滿
我正在嘗試在彈性池內的 Azure SQL 數據庫中執行以下(範例)批處理:
drop table if exists [dbo].[InsertTest]; create table [dbo].[InsertTest] ( [id] uniqueidentifier, [filler] nvarchar(max) ); insert into [dbo].[InsertTest] ([id], [filler]) select top 1000 newid(), replicate('X', 2048) from [sys].[objects] as [T1] cross join [sys].[objects] as [T2]; /* drop table if exists [dbo].[InsertTest]; */
但是該
insert
語句失敗並顯示錯誤消息:Msg 1132, Level 16, State 1, Line 1 The elastic pool has reached its storage limit. The storage used for the elastic pool cannot exceed (51200) MBs.
我試圖通過執行查詢來查看是否空間不足
select [type_desc] as [file_type], [size] / 128 as [size_in_MB], [max_size] / 128 as [max_size_in_MB] from [sys].[database_files];
但似乎我還有空間。
我能做些什麼呢?我錯過了什麼嗎?
錯誤消息涉及彈性池,因此問題可能與目前數據庫之外的另一個數據庫有關。您可以使用以下 DMV 查詢與主數據庫檢索有關彈性池的資訊
SELECT TOP 5 avg_storage_percent / 100.0 * elastic_pool_storage_limit_mb AS ElasticPoolDataSpaceUsedInMB, * FROM sys.elastic_pool_resource_stats