{"id":3446,"date":"2015-12-16T10:00:03","date_gmt":"2015-12-16T15:00:03","guid":{"rendered":"https:\/\/academy.sqlbak.com\/?p=3446"},"modified":"2023-10-17T04:55:25","modified_gmt":"2023-10-17T08:55:25","slug":"create-database-failed-some-file-names-listed-could-not-be-created-msg-1802","status":"publish","type":"post","link":"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/","title":{"rendered":"CREATE DATABASE failed. Some file names listed could not be created (Msg 1802)"},"content":{"rendered":"

The error “CREATE DATABASE failed. Some file names listed could not be created. Check related errors.<\/em>” can occur when the user tries to create a database with file names specified. To understand when this error can appear and how to avoid it, let’s consider the following syntax:<\/p>\n

CREATE DATABASE<\/span> Adventureworks \r\nON PRIMARY<\/span>\r\n( NAME = Adventureworks_Data,\r\n\u00a0 FILENAME<\/span> = 'Adventureworks_Data.mdf'<\/span>,\r\n\u00a0 SIZE = 0,\r\n\u00a0 MAXSIZE = 30,\r\n\u00a0 FILEGROWTH = 10% )\r\nLOG<\/span> ON<\/span>\r\n( NAME = Adventureworks_Log,\r\n\u00a0 FILENAME<\/span> = 'Adventureworks_Log.ldf'<\/span>,\r\n\u00a0 SIZE = 3MB,\r\n\u00a0 MAXSIZE = 20MB,\r\n\u00a0 FILEGROWTH = 3MB );\r\nGO<\/span><\/pre>\n

<\/p>\n

In this case, the SQL Server will send the following errors:<\/p>\n

Msg 5174, Level 16, State 1, Line 2<\/span>\r\nEach file size must be greater than or equal to 512 KB.<\/span>\r\nMsg 1802, Level 16, State 1, Line 2<\/span>\r\nCREATE DATABASE failed. Some file names listed could not be created. Check related errors.<\/span><\/pre>\n

The reason why this error appeared is that one of the file parameters is incorrect. In this case, the user set up the size of the data file to zero.\u00a0Msg 5174 gives a hint that\u00a0Each file size must be greater than or equal to 512 KB.<\/p>\n","protected":false},"excerpt":{"rendered":"

The error “CREATE DATABASE failed. Some file names listed could not be created. Check related errors.” can occur when the user tries to create a database with file names specified. To understand when this error can appear and how to avoid it, let’s consider the following syntax: CREATE DATABASE Adventureworks ON PRIMARY ( NAME = […]<\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[159],"tags":[],"yoast_head":"\nCREATE DATABASE failed. Some file names listed could not be created (Msg 1802) - Sql Server Backup Academy<\/title>\n<meta name=\"description\" content=\"How to solve "CREATE DATABASE failed. Some file names listed could not be created (Msg 1802)"\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CREATE DATABASE failed. Some file names listed could not be created (Msg 1802) - Sql Server Backup Academy\" \/>\n<meta property=\"og:description\" content=\"How to solve "CREATE DATABASE failed. Some file names listed could not be created (Msg 1802)"\" \/>\n<meta property=\"og:url\" content=\"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/\" \/>\n<meta property=\"og:site_name\" content=\"Sql Server Backup Academy\" \/>\n<meta property=\"article:published_time\" content=\"2015-12-16T15:00:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-17T08:55:25+00:00\" \/>\n<meta name=\"author\" content=\"Alexandr Omelchenko\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alexandr Omelchenko\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/\",\"url\":\"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/\",\"name\":\"CREATE DATABASE failed. Some file names listed could not be created (Msg 1802) - Sql Server Backup Academy\",\"isPartOf\":{\"@id\":\"https:\/\/academy.sqlbak.com\/#website\"},\"datePublished\":\"2015-12-16T15:00:03+00:00\",\"dateModified\":\"2023-10-17T08:55:25+00:00\",\"author\":{\"@id\":\"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8\"},\"description\":\"How to solve \\\"CREATE DATABASE failed. Some file names listed could not be created (Msg 1802)\\\"\",\"breadcrumb\":{\"@id\":\"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"CREATE DATABASE failed. Some file names listed could not be created (Msg 1802)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/academy.sqlbak.com\/#website\",\"url\":\"https:\/\/academy.sqlbak.com\/\",\"name\":\"Sql Server Backup Academy\",\"description\":\"All you need to know about Sql Server database backup\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/academy.sqlbak.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8\",\"name\":\"Alexandr Omelchenko\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/academy.sqlbak.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8155f02a1f0f4ef52a4a68ef379a922f?s=96&d=monsterid&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8155f02a1f0f4ef52a4a68ef379a922f?s=96&d=monsterid&r=g\",\"caption\":\"Alexandr Omelchenko\"},\"sameAs\":[\"http:\/\/sqlbak.com\"],\"url\":\"https:\/\/academy.sqlbak.com\/author\/alexandr\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"CREATE DATABASE failed. Some file names listed could not be created (Msg 1802) - Sql Server Backup Academy","description":"How to solve \"CREATE DATABASE failed. Some file names listed could not be created (Msg 1802)\"","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/","og_locale":"en_US","og_type":"article","og_title":"CREATE DATABASE failed. Some file names listed could not be created (Msg 1802) - Sql Server Backup Academy","og_description":"How to solve \"CREATE DATABASE failed. Some file names listed could not be created (Msg 1802)\"","og_url":"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/","og_site_name":"Sql Server Backup Academy","article_published_time":"2015-12-16T15:00:03+00:00","article_modified_time":"2023-10-17T08:55:25+00:00","author":"Alexandr Omelchenko","twitter_card":"summary","twitter_misc":{"Written by":"Alexandr Omelchenko","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/","url":"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/","name":"CREATE DATABASE failed. Some file names listed could not be created (Msg 1802) - Sql Server Backup Academy","isPartOf":{"@id":"https:\/\/academy.sqlbak.com\/#website"},"datePublished":"2015-12-16T15:00:03+00:00","dateModified":"2023-10-17T08:55:25+00:00","author":{"@id":"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8"},"description":"How to solve \"CREATE DATABASE failed. Some file names listed could not be created (Msg 1802)\"","breadcrumb":{"@id":"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/academy.sqlbak.com\/create-database-failed-some-file-names-listed-could-not-be-created-msg-1802\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"CREATE DATABASE failed. Some file names listed could not be created (Msg 1802)"}]},{"@type":"WebSite","@id":"https:\/\/academy.sqlbak.com\/#website","url":"https:\/\/academy.sqlbak.com\/","name":"Sql Server Backup Academy","description":"All you need to know about Sql Server database backup","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/academy.sqlbak.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/academy.sqlbak.com\/#\/schema\/person\/a579cfefacf074f062823446cad811a8","name":"Alexandr Omelchenko","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/academy.sqlbak.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8155f02a1f0f4ef52a4a68ef379a922f?s=96&d=monsterid&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8155f02a1f0f4ef52a4a68ef379a922f?s=96&d=monsterid&r=g","caption":"Alexandr Omelchenko"},"sameAs":["http:\/\/sqlbak.com"],"url":"https:\/\/academy.sqlbak.com\/author\/alexandr\/"}]}},"_links":{"self":[{"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts\/3446"}],"collection":[{"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/comments?post=3446"}],"version-history":[{"count":9,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts\/3446\/revisions"}],"predecessor-version":[{"id":3849,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/posts\/3446\/revisions\/3849"}],"wp:attachment":[{"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/media?parent=3446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/categories?post=3446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/academy.sqlbak.com\/wp-json\/wp\/v2\/tags?post=3446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}