0

I am using SQL Server Express LocalDB 2014. My application running with one dedicated instance.

Like SQL Server though Management studio can we limit the max memory utilization of sql localDB?

Or what is the threshold it can go max memory size?

enter image description here

user584018
  • 10,186
  • 15
  • 74
  • 160
  • 1
    I suggest you don't change the default setting for LocalDB. A T-SQL script example to change the max memory setting is in [the documentation](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/server-memory-server-configuration-options?view=sql-server-ver16#use-transact-sql). – Dan Guzman Sep 29 '22 at 11:09
  • @Larnu: they are indeed different editions, but for purposes of limits and scaling, LocalDB can be seen as an Express edition that works a bit differently with regards to startup. It is *not* an in-process engine (like SQLite or the now defunct SQL Server Compact) and any resources it uses don't count towards applications accessing it. It is therefore in theory possible to limit LocalDB resources in the same way as a "regular" Express instance, though which configuration settings persist and are respected by LocalDB varies a bit and is not well documented. – Jeroen Mostert Sep 29 '22 at 11:11
  • @Larnu That's not true, LocalDB uses a separate process and holds memory like any other SQL Server, it's essentially a stripped down Express. – Charlieface Sep 29 '22 at 11:12
  • @Larnu, LocalDB is a feature of Express Edition according to the [doc](https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/sql-server-express-localdb?view=sql-server-ver16). – Dan Guzman Sep 29 '22 at 11:13
  • Express Localdb isn't a "thing"; LocalDB and Express are different editions of SQL Server. What are you actually asking about LocalDB or Express? On Express, yes you can limit the memory, though Express already has significant Scale Limits compared to other editions of SQL Server. – Thom A Sep 29 '22 at 11:13
  • Yes, you should be able to connect to LocalDB using SSMS and change the configuration. Have you tried? – Charlieface Sep 29 '22 at 11:13
  • @DanGuzman. There is no option for me to set the limit through script. One of the NT Service account runs the "sqlsrv" process. I see some doc where it's suggestion 1GB limit? https://learn.microsoft.com/en-us/previous-versions/sql/2014/getting-started/features-supported-by-the-editions-of-sql-server-2014?view=sql-server-2014&preserve-view=true#CrossBoxScale – user584018 Sep 29 '22 at 11:58

0 Answers0