-> Insert statements were failing with below error,
Msg 40544, Level 17, State 2, Line 12 The database ‘jbswiki’ has reached its size quota. Partition or delete data, drop indexes, or consult the documentation for possible resolutions.
-> Logged into the Azure portal and checked the Azure SQL Database. On the overview tab, I was able to see that the database was full,
-> The resolution for this will be to drop some unwanted objects from the database of increase the database size. I decided to increase the database size from Azure portal.
-> On Azure Portal, Open the Azure SQL Database and then navigated to “Compute + storage” and then increased the size from 500 MB to 1 GB and clicked on save,
-> Once this was done. Insert statements started working fine.
Thank You, Vivek Janakiraman
Disclaimer: The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.
-> Error explains that this database is in a replication relationship. Let’s check if it is part of failover group,
-> Database JBDB is part of failover group. Lets remove this database from failover group and try renaming it.
-> Once removed from failover group. Open Azure SQL Database and click on database JBDB. Open “Geo-Replication” and stop it for JBDB database.
-> Try renaming the database and it will complete this time.
Thank You, Vivek Janakiraman
Disclaimer: The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.
-> Application fails with below error when trying to connect to Azure SQL database,
Msg 40544, Level 17, State 2, Line 10 The database ‘jbswiki’ has reached its size quota. Partition or delete data, drop indexes, or consult the documentation for possible resolutions.
-> Executing below query on “jbswiki” database to check the used and free space on the database,
if convert(varchar(20),SERVERPROPERTY('productversion')) like '8%'
SELECT [name], fileid, filename, [size]/128.0 AS 'Total Size in MB',
[size]/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS 'Available Space In MB',
CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS 'Used Space In MB',
(100-((([size]/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0)/([size]/128.0))*100.0)) AS 'percentage Used'
FROM sysfiles
else
SELECT @@servername as 'ServerName',db_name() as DBName,[name], file_id, physical_name, [size]/128 AS
'Total Size in MB',
[size]/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS 'Available Space In MB',
CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0 AS 'Used Space In MB',
(100-((([size]/128.0 - CAST(FILEPROPERTY(name, 'SpaceUsed') AS int)/128.0)/([size]/128.0))*100.0)) AS 'percentage Used'
FROM sys.database_files
go
-> From the screenshot above, it is clear that the database “jbswiki” is full.
-> Lets try a simple insert statement and check the behaviour,
-> Login to Azure portal and select the database jbswiki. On “Overview” tab you will see that the database is full,
-> Click on “Compute + storage” under Settings. Change the “Data Max Size” to an appropriate value. In my case I have changed from 100 to 500 MB. Click Apply,
-> Application connections to database jbswiki started working fine after above change.
-> Below is the view of “Overview” tab after the change,
-> Lets try an insert and check if it is working,
->It worked fine this time.
Thank You, Vivek Janakiraman
Disclaimer: The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.