Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Purpose of ProjectsV13 LocalDB instance

According to this answer, SQL Server Data Tools uses a private LocalDB instance ProjectsV13, which you're not supposed to use for your own applications. Instead, you should use MSSQLLocalDB or your own private instance.

Is this documented anywhere? What does SSDT use its private instance for? (I don't see anything in mine.)

Is a private LocalDB instance basically spinning up a second copy of SQL Server? On the surface, it sounds rather resource intensive to have a dedicated database engine just for tooling metadata. How resource intensive is this really? Does it have a perf impact on starting up and using Visual Studio? If so, and if it's not really needed, can and should you turn it off or consolidate instances in some other way? My guess is not; otherwise, SSDT wouldn't use a private instance, but it would be nice to know how this works under the hood.

like image 759
Edward Brey Avatar asked Apr 04 '17 15:04

Edward Brey


People also ask

What is LocalDB instance?

An instance of SQL Server Express LocalDB is an instance created by a user for their use. Any user on the computer can create a database using an instance of LocalDB, store files under their user profile, and run the process under their credentials. By default, access to the instance of LocalDB is limited to its owner.

How do I connect to my LocalDB instance?

You can connect with MSSMS to LocalDB. Type only in SERVER NAME: (localdb)\v11. 0 and leave it by Windows Authentication and it connects to your LocalDB server and shows you the databases in it.


1 Answers

The primary reason is to avoid conflicts with any "production" databases on MSSQLLocalDB. SSDT creates a new database for every database project you open. If your project is called Adventureworks, this might conflict with an Adventureworks database created by web projects or that are used by local ASP.NET applications you are running / debugging. Since SSDT does this automatically, in the background, it was felt that there was too high a risk of conflict. Hence, a separate instance is used.

The resource usage of LocalDB is pretty low and isn't incurred on startup (it's async). It's designed to spin down when not in use, but does have an impact (10s of MB) when running VS and having SQL Server Object Explorer open, since this connects to the DBs.

like image 152
Kevin Cunnane Avatar answered Sep 16 '22 15:09

Kevin Cunnane