How to prevent SQL Server LocalDB auto shutdown?
问题 I'm using SQL Server 2012 Express LocalDB. Instances seem to stop automatically after 10 minutes if there is no activity on them. Is there a clean way to keep an instance running forever? 回答1: The timeout is configurable via T-SQL with 'user instance timeout' option: sp_configure 'show advanced options', 1; RECONFIGURE; GO sp_configure 'user instance timeout', 5; GO The timeout is expressed in minutes and has a maximum value of 65535 . I'm pretty sure you need to restart the instance after