SQL SERVER – FIX : ERROR Msg 5174 Each file size must be greater than or equal to 512 KB

Following error occurs when database which is attempted to be created is smaller than 512KB. It is must that all the databases are larger than 512KB. It will also follow with another error 1802, which is due to previous error 5174.

Following code will create the error discussed in this post.CREATE DATABASE TestsON( NAME = 'Tests',FILENAME = 'c:\tests.mdf',SIZE = 12KB )GO

Msg 5174, Level 16, State 1, Line 1
Each file size must be greater than or equal to 512 KB.
Msg 1802, Level 16, State 1, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.

Community Initiatives

About Pinal Dave

Pinal Dave is a Pluralsight Developer Evangelist. He has authored 11 SQL Server database books, 17 Pluralsight courses and have written over 3200 articles on the database technology on his blog at a http://blog.sqlauthority.com. Along with 11+ years of hands on experience he holds a Masters of Science degree and a number of certifications, including MCTS, MCDBA and MCAD (.NET). His past work experiences include Technology Evangelist at Microsoft and Sr. Consultant at SolidQ. Follow @pinaldave
Send Author Pinal Dave
an email at pinal@sqlauthority.com

Email Subscription

Enter your email address to subscribe to this blog and receive notifications of new posts by email.