Is there a way to stop SQL Express 2008 from Idling?

人走茶凉 提交于 2019-12-03 13:49:07

That behavior is not configurable.

You do have to implement a method to poll the database every so often. Also, like the article you linked to said, set the AUTO CLOSE property to false.

Ralph Schwerdt

Just a short SQL query like this every few minutes will prevent SQLserver from going idle:

SELECT TOP 0 NULL
  FROM [master].[dbo].[MSreplication_options]
GO

Write a thread that does a simple query every few minutes. Start the thread in your global.asax Application_Start and you should be done!

Ralph Schwerdt

Here is a good explanation: https://blogs.msdn.microsoft.com/sqlexpress/2008/02/22/understanding-sql-express-behavior-idle-time-resource-usage-auto_close-and-user-instances/

Whatever: I do not know the time after sql express goes idle. I suggest to run the script below every 10 minutes (maybe task scheduler). This will prevent SQL Server Express from going idle:

SELECT TOP 0 NULL FROM [master].[dbo].[MSreplication_options] GO

Also make sure all data bases' property is set to AUTO_CLOSE = FALSE

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!