Error Locating Server/Instance Specified

  • 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

  • Please post the code that you are using.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • 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.

  • 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[/url]

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply