Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while allocating space to the database

Tags:

sql-server

I am creating a database script and having an error while executing it. I am trying to create a database and assign space. Where am I going wrong

Here is the error message

MODIFY FILE encountered operating system error 112(failed to retrieve text for this error. Reason: 15105) while attempting to expand the physical file 'E:\MSSQL10_50.SQL2008R2\MSSQL\DATA\CoreReferenceStaging.mdf'.

USE master
GO

CREATE DATABASE CoreReferenceStaging;
GO

ALTER DATABASE [CoreReferenceStaging] 
MODIFY FILE ( NAME = N'CoreReferenceStaging', SIZE = 51200000KB , FILEGROWTH = 2560000KB )
GO

ALTER DATABASE [CoreReferenceStaging] 
MODIFY FILE ( NAME = N'CoreReferenceStaging_log', SIZE = 15360000KB , FILEGROWTH = 1024000KB )
GO
like image 522
Tom Avatar asked Mar 07 '26 03:03

Tom


2 Answers

Entering NET HELPMSG 112 from a command prompt, the resultant message is "There is not enough space on the disk". It seems there isn't enough space on the E drive volume to extend the file to the specified size.

like image 115
Dan Guzman Avatar answered Mar 08 '26 17:03

Dan Guzman


Your FILEGROWTH is way too big (2.5GB). It probably can't grow by that much. Change it to 100MB (100000KB). Same for your log.

like image 28
cloudsafe Avatar answered Mar 08 '26 19:03

cloudsafe