Error while allocating space to the database

Viewed 4643

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
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.

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.

Related