Purpose of ProjectsV13 LocalDB instance
Asked Answered
T

1

30

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.

Tagliatelle answered 4/4, 2017 at 15:9 Comment(1)
Bug report for Visual Studio database projects and SQL Server Object Explorer that helps show why there is confusion: Database projects use wrong default LocalDB instanceTagliatelle
R
28

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.

Rail answered 4/4, 2017 at 21:56 Comment(1)
Hi Kevin, I notice that (localdb)\ProjectsV13 can be renamed using the right-click context menu within the object explorer. Any risk to doing so?Pomerania

© 2022 - 2024 — McMap. All rights reserved.