|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Friday, September 18, 2009 1:04 PM
Points: 249,
Visits: 706
|
|
Hi All
When i try to open a website.....it throws me the following error.
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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
But, if i refresh the page, i get the website open without any errors.
The error occurs if i open the page for first time in a day. But later website opens properly when i refresh the page after the error occurs.
Why am i getting this error? And How is it resolving automatically?
Please Help !!!
Regards ItzSam
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Saturday, May 04, 2013 11:13 AM
Points: 9,855,
Visits: 9,374
|
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Tuesday, May 12, 2009 4:56 AM
Points: 12,
Visits: 36
|
|
| most probably as i believe, there is either something wrong with the code or some problem with your network if you are accessing server over network. r u always getting this error? or it is just your constant observation.
|
|
|
|
|
SSCommitted
      
Group: General Forum Members
Last Login: Sunday, May 12, 2013 4:26 PM
Points: 1,696,
Visits: 1,742
|
|
Check if the Auto-Close property for the database is set to True in the Database Properties. I have seen this kind of error in the past where Auto-Close was turned on, especially in hosted environments where it is set by default so that the database doesn't take resources, even though it is against all published best practices for this feature.
I had this problem on the sqlclr.net site I run for a few months until I figured it out working with a local restore of the database and running tests with the SQL 2008 PBM which explicity catch the auto-close/auto-shrink options being enabled. If this is a hosted database as mine was, you will need to request the options be turned off by the hosting company.
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008 My Blog | Twitter | MVP Profile Training | Consulting | Become a SQLskills Insider Troubleshooting SQL Server: A Guide for Accidental DBAs
|
|
|
|