开发者

Sporadic SQL Server error when trying to connect to the database

I will get the error below randomly when I'm running an asp.net application I开发者_开发知识库 am working on. Usually it will happen ever 3 days or so and I am forced to restart my machine to fix it but it's been getting worse and now a reboot dosn't seem to fix anything. I'm running the application on my machine and doing a lot of debugging. All interactions with the db are done through linq to sql. The db is on another server that I am connecting to. Has anyone run into this before? Any suggestions?

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - No such host is known.)


It may be DNS, try to use some different DNS addresses. :)


I've seen similar before but it was related to a faulty network card that was dropping packets. Have you had any other strange network problems?

In your connection string to the db is the host entered as a hostname or an IP address. If by name try swapping to its IP address instead. This won't solve the underlying problem by may workaround it for you.

Edit

Also have a look at this SO answer here. Are you leaving connections open/orphaning them? That would ring true with the disconnect happening at regular time intervals..

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜