Purpose of ProjectsV13 LocalDB instance

Edward Brey picture Edward Brey · Apr 4, 2017 · Viewed 7.8k times · Source

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.

Answer

Kevin Cunnane picture Kevin Cunnane · Apr 4, 2017

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.