I'm trying to execute the following (sample) batch in an Azure SQL Database inside an Elastic Pool:
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 statement fails with the error message:
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.
I tried to see if I ran out of space by running the query
select [type_desc] as [file_type], [size] / 128 as [size_in_MB], [max_size] / 128 as [max_size_in_MB] from [sys].[database_files];
but it seems that I still have space left.
What can I do about it? Am I missing something?