Installed SQL Server 2017 Enterprise Core but still the Database limit is 10 GB(Express Edition of SQL Server)

Andreas ss 726 Reputation points
2020-11-02T15:13:07.367+00:00

Hello!

I am using Express Edition of SQL Server in my Visual Studio 2019 project which is limited to 10 GB. I will describe the scenario I have:

  1. I have created a windows form .Net Core 3.1 Application. I use a Express Edition of SQL Server Database named "featuresDatabase1.mdf" in this project. I use Windows 10 Pro as operating system.
  2. Now I need unlimited size of the database. So I have upgraded my operating system to: Windows Server 2019 DataCenter and I have used a "stand alone installation" of Microsoft SQL Server Enterprise Core 2017 (See below image)
    36837-img.jpg

When I run this query I get get below: SELECT AzureSQLDBVersion = @@VERSION

Microsoft SQL Server 2016 (SP1) (KB3182545) - 13.0.4001.0 (X64) Oct 28 2016 18:17:30 Copyright (c) Microsoft Corporation Express Edition (64-bit) on Windows Server 2019 Datacenter 6.3 <X64> (Build 17763:)

So I have installed the "SQL Server Enterprise Core 2017" on the computer. But when I open up my Visual Studio project. The "Express Edition of SQL Server" is still in use in my project and there is then still 10 GB limit.

To make the question simple. The above is now exactly the scenario. I simply don't know how my current database: "featuresDatabase1.mdf" will use the new "SQL Server Enterprise Core 2017" in Visual Studio 2019. What do I need to do from here to make this work?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,658 questions
{count} votes

Accepted answer
  1. Andreas ss 726 Reputation points
    2020-11-03T17:01:18.387+00:00

    Thank you!

    I found a video that shows how it is done:
    https://www.youtube.com/watch?v=swXmjWQTfq4

    What must be done are:

    1. DataSource: Microsoft SQL Server (SqlClient)
    2. Connect to a database (Here choose the one that is attached in SQL Server Management Studio).
    3. Then on properties for the database. Here you find the connection string that will be used.

    37188-n3.png

    Now it works in the C# code to write to the database!

    Thank you for all help!

    0 comments No comments

5 additional answers

Sort by: Most helpful
  1. tibor_karaszi@hotmail.com 4,311 Reputation points
    2020-11-02T15:45:58.34+00:00

    In the SQL Server Installation Center (the setup program), under Tools, there's a "Installed SQL Server Featured Discovery Report". That will show you what is installed. Something like below, executed on my machine:

    36892-capture.png


  2. Shashank Singh 6,251 Reputation points
    2020-11-02T17:03:28.487+00:00

    How my current Express Edition of SQL Server Database named "featuresDatabase1.mdf" will use the SQL Server 2017 ?

    You have 2 options here

    1. backup SQl Server express database, move backup to machine having sql server 2017 and restore it on SQL Server 2017.
    2. Stop the SQL Server service, copy the mdf and ldf files to SQL Server 2017 machine and attach it.

  3. tibor_karaszi@hotmail.com 4,311 Reputation points
    2020-11-02T17:44:44.577+00:00

    Change the connections string so that you don't connect to this strange special version of SQL server that is called LocalDb (which is a non-installed version of SQL Server and that is why it doesn't show up in the discovery report).

    Google connection strings for SQL Server and you will see what it should look like. You need of course to create the database etc as well, but that is general SQL Server stuff.


  4. Jeffrey Williams 1,891 Reputation points
    2020-11-02T22:27:06.423+00:00

    In your VS project - you are using the LocalDB version of SQL which is installed with Visual Studio. The version that was installed is SQL Server 2016 Express...

    You then installed an Enterprise Edition of SQL Server 2017 - which works quite a bit differently from the LocalDB version. The LocalDB version allows you to 'attach' the database when you connect, but for Enterprise you would not do that. In Enterprise Edition (Standard Edition also) - the database is always attached and available.

    https://expressdb.io/sql-server-express-vs-localdb.html

    Now - what you need to do is connect to the Enterprise Edition using SSMS. Once you are connected to that instance, you then need to attach your database to SQL Server 2017. Once the database is attached, you can then update/change the connection for your project to use the database in the new instance.

    https://blogs.gre.ac.uk/cmssupport/application-development/programming/asp-net/connecting-to-sql-server-using-visual-studio/

    You can also use VS to manage the database - but you need to install the components: https://learn.microsoft.com/en-us/sql/ssdt/sql-server-data-tools?view=sql-server-ver15.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.