I'm trying to optimize my Visual Studio experience and my machine in general. I noticed that I have two instances of SQL Server running, one of which is LocalDB. This gets started by Visual Studio.
I would rather it didnt start local db at all but I can imagine it uses it for a few things. Since I already have a full sql instance running it would be better if it used that.
Does anyone know if I can stop this from starting or at least not starting it until it really needs it?
Be aware that LocalDB has the same limitations as SQL Server Express. Finally, you can stop the instance through the stop command: C:\Program Files\Microsoft SQL Server\120\Tools\Binn>SqlLocalDB.exe stop tugberk LocalDB instance "tugberk" stopped.
Once installed, LocalDB is an instance of SQL Server Express that can create and open SQL Server databases. The system database files for the database are stored in the local AppData path, which is normally hidden.
The following procedure worked for me.
(Caveat: I don't use LocalDB at all, so I don't care if this procedure disables it completely. You may feel differently.)
Please note that you will need to repeat this procedure every time you install an update to SQL Server Data Tools (SSDT), since the installer re-adds the key you renamed.
LocalDB does not run as a service like SQL Server Express. It will start and stop/automatically as needed.
LocalDB doesn't create any database services; LocalDB processes are started and stopped automatically when needed. The application is just connecting to "Data Source=(localdb)\v11.0" and LocalDB process is started as a child process of the application. A few minutes after the last connection to this process is closed the process shuts down.
Introducing LocalDB, an improved SQL Express - SQL Server Express Blog
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With