简体   繁体   中英

SQL Server 2005 Browser Service

I've been doing a little work with SQL Server and C# and every time I run the darn thing the connection times out unless I start services.msc and manually restart the service (SQL Browser Service). It's already set to automatic, does anyone know why it would do this? I'm not an advanced programmer, more of an intermediate one. Once I do restart this service it works fine as long as I keep using it. If I stop using it for more than 30 minutes I have to restart it again.

Have you checked the SQl Server Log and the windows event log?

Can you supply some more info., such as the C# code you are using to open/close the connection, the connection string etc.

Is autoclose kicking in?

Defaults to ON for SQL 2005 Express version, but it could have been set for other versions. The database should open automatically though...

Is it a query from the app that times out? Or simply trying to connect to the server to run, say, SELECT @@SERVERNAME?

Can you connect to the SQL Server by name through SSMS without fiddling with the Browser service (I'm not even sure this really requires the Browser service depending on how you connect)? ie does it appear to be running fine except when your program causes it to crash? And once you've restarted it does it work fine repeatedly or do you have to keep restarting it as you use your program?

What version of SQL Server 2005 (and what service pack level) are you using?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM