{"id":105,"date":"2016-09-25T13:57:02","date_gmt":"2016-09-25T13:57:02","guid":{"rendered":"http:\/\/gkokot.com\/?p=105"},"modified":"2017-02-05T18:40:48","modified_gmt":"2017-02-05T18:40:48","slug":"the-database-cannot-be-opened-because-it-is-version-this-server-supports-version-and-earlier","status":"publish","type":"post","link":"https:\/\/gkokot.com\/?p=105","title":{"rendered":"The database&#8230;cannot be opened because it is version &#8230; This server supports version &#8230; and earlier"},"content":{"rendered":"<p>I am using Visual Studio 2015 and I have installed all available updates, including the SQL updates;<br \/>\nI copied a project of web application using database from one developement environement to another computer.<br \/>\nI run the project on the second environement and I receive following message:<\/p>\n<blockquote><p>The database&#8230;cannot be opened because it is version 856. This server supports version 782 and earlier. A downgrade path is not supported. Could not open new database&#8230;. CREATE DATABASE is aborted. An attempt to attach and auto-named database for file&#8230;failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.<\/p><\/blockquote>\n<p>Solution<\/p>\n<p>Use Command Prompt:<\/p>\n<p><em>&gt;SQLlocalDB<\/em><br \/>\nit will display using version of tools and help.<\/p>\n<blockquote><p>Microsoft (R) SQL Server Express LocalDB Command Line Tool<br \/>\nVersion 13.0.1601.5<br \/>\nCopyright (c) Microsoft Corporation.\u00a0 All rights reserved.<\/p>\n<p>Usage: SqlLocalDB operation [parameters&#8230;]<\/p><\/blockquote>\n<p>I have on my new environement two versions of SQL Server and the version v.12.0\u00a0was running by default as (localdb).<br \/>\nTo change it:<br \/>\nThese commands will stop and delete current (localdb) instance using SQL Server version v.12.0 (SQL Server 2014 using 782)<\/p>\n<p><em>&gt;sqllocaldb stop<\/em><br \/>\n<em>&gt;sqllocaldb delete<\/em><br \/>\nNew start command will initialise localdb with the latest installed SQL Server version (in my case version v.13.0 = SQL Server 2016 using 856)<br \/>\n<em>&gt;sqllocaldb start<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am using Visual Studio 2015 and I have installed all available updates, including the<a class=\"readmore btn btn-info\" href=\"https:\/\/gkokot.com\/?p=105\" rel=\"nofollow\">Read More&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":70,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,3,5],"tags":[],"class_list":["post-105","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-asp-net","category-c","category-visual-studio"],"_links":{"self":[{"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/posts\/105"}],"collection":[{"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gkokot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=105"}],"version-history":[{"count":2,"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/posts\/105\/revisions"}],"predecessor-version":[{"id":107,"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/posts\/105\/revisions\/107"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gkokot.com\/index.php?rest_route=\/wp\/v2\/media\/70"}],"wp:attachment":[{"href":"https:\/\/gkokot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=105"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gkokot.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=105"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gkokot.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=105"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}