Databases MSSQLLOCALDB not specified

I used ASP.NET 5 Preview Templates in Visual Studio 2015 to create an ASP.NET 5 site. According to the config.json file, there is a database in (localdb) \ mssqllocaldb.

I want to transfer this database to my actual SQL Server, but when I connect to the server (localdb) \ mssqllocaldb in SQL Server Management Studio to start the backup process, there are no databases in the database. Where is it?

Any idea on how I can migrate this database if I cannot find it in SSMS?

+8
source share
4 answers

In the "Connect to Server" mode, there is a "Settings" button. This opens the Connection Properties tab, which allows you to find the database by either manually entering a name or browsing it. When connected in this way, it is displayed in the list.

+1
source

I had this problem, and I just got it working (I’m doing the MVC-Movie MVC6 tutorial - I’m just in the "Adding a Model" section, where you create a connection to the local database: here ).

Visual Studio 2015 / SQL Server 2014 uses a path other than 2012/2013. Earlier, I had VS2012 and VS2013 installed, and I created local databases in each. VS2012 created the connection as: (localdb) \ v11.0 and the SQL Server Data Tools (SSDT) ​​as (localdb) \ ProjectsV12.

To make (LocalDB) \ MSSQLLocalDB work for you:

  1. Open CMD Prompt and enter SQLLocalDB.exe info show all current database servers in your local connection
  2. You should see an option here for MSSQLLocalDB. type SQLLocalDB.exe start MSSQLLocalDB It will tell you that it has now started.
  3. Go to Visual Studio and click View → SQL Server Object Browser. Here you will need to add SQL Server (right-click on SQL Server and select "Add SQL Server").
  4. In the Server name: field, enter '(LocalDB) \ MSSQLLocalDB' - Username / Server type / Authentication should be left by default. After clicking the "Connect" button, a new database will appear along with your new database.

Databases are now stored in the c: \ users \ [DATABASE-NAME] directory, where, as before, they are stored in your C: \ Users \\ AppData \ Local \ Microsoft \ VisualStudio \ SSDT.

Hope this solves your problem with finding SQLServer, Cheers

+17
source

I came across something else, I could see (LocalDb)\MSSQLLocalDB in the SQL Object Explorer in Visual Studio, although I could not see it in SSMS . So I followed the answers of @Maxithi and @JohnYoungTree to start an instance of LocalDB

To make (LocalDB) \ MSSQLLocalDB work for you:

  1. Open CMD Prompt and enter SQLLocalDB.exe info to show all current database servers in your local connection
  2. You should see an option here for MSSQLLocalDB. type SQLLocalDB.exe start MSSQLLocalDB It will tell you that it has now started.

After that, I went into SSMS and clicked "Connect", then (LocalDb)\MSSQLLocalDB server name as (LocalDb)\MSSQLLocalDB and used Windows authentication. It worked amazingly!

Thanks @Maxithi and @JohnYoungTree

0
source
 //...for entity public class ogrenciCONTEXT:DbContext { public ogrenciCONTEXT():base("sqlim") { } public DbSet<ogrenci> ogrenciler { get; set; } } // for WEB CONFIG <connectionStrings> <add name="sqlim" connectionString="Data Source=(LocalDB)\mssqllocaldb;initial catalog=dosyaismi; Integrated Security=True" providerName="System.Data.SqlClient"/> </connectionStrings> 
-1
source

Source: https://habr.com/ru/post/1237192/


All Articles