SQL Server 26 Error

Discussion in 'Databases' started by OlgaE, Nov 19, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Last time I began to receive this error VERY frequently. Not every time but frequently. I didn't any changes to my connection string. Every connection is called from "using" clause so this is not the problem with many not closed connections.
    What happen?
    Please help.

    At my development environment I use SQL Express, but at the discountasp server my connection string points to 2005 SQL Server.
    connectionString="Data Source=tcp:sql2k514.discountasp.net;Initial Catalog=SQL2005_516252_cross;User ID=SQL2005_54345_adas_user;Password=12345"

    The error is:
    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)
     
  2. I am also receiving this error. My database is on sql2k802.discountasp.net. I can connect to it with Management Studio and the web base management tool. I cannot, however, connect to it from Visual Studio or my website hosted on discountasp.net

    Edit: Moments after posting this, my connection came back. It had been down all morning though.
     
  3. Bruce

    Bruce DiscountASP.NET Staff

    very strange..

    So the same code works some times but not other?
     
  4. Exactly.
    Bellow some links from my site:
    http://www.cross-stitch-pattern.net/Kingfishers-9-29-Free-Design.aspx
    http://www.cross-stitch-pattern.net/Castle-4-18-Free-Design.aspx
    http://www.cross-stitch-pattern.net/Victorian-Woman-58-11-Free-Design.aspx
    http://www.cross-stitch-pattern.net/Saffron-Milk-Cap-68-6-Free-Design.aspx
    http://www.cross-stitch-pattern.net/Bride-in-a-Chariot-51-10-Free-Design.aspx
    If you enter them in random order you will see the error. To eliminate it you should enter the home page http://www.cross-stitch-pattern.net/.
    But after some time the error returns. Sometimes you will successfully reach all of them, sometimes you will fail with the first one.
    :(
     
  5. ...Are you sure the code hits are the same?
    It appears to be only throwing an exception from PhotoManager.cs on some of the page hits.
    Is it possible there is an illegible character in the query for those pages failing?
     
  6. The Same page may cause an error and may not. Perhaps it traffic dependent?
    I am sure that it is not the problem with illegal characters. Is fails on connection.open()
     
  7. How many images are in the folder it's pulling from?
     
  8. It pulls from database. Therefore connection is opened. The page is generated from database.
     
  9. Ooooo. That may indeed have something to do with the connection.
    It is always better to have the images in folders and then link to them.
    I do understand the reasons for dropping them as BLOB's in the DB but it is problematic.
     
  10. So your proposition is to retrieve the images from the database and store them in the directory?
    There are almost 1000 images, but it is possible to write a simple c# program which runs through the database and stores the images at the disk.
    Thank you. I feel that this will help.
     
  11. My suggestion would be yes.
    I'd look at the way some of the popular forum packages do this.
    For example it is a good idea to limit image folders to 200 images or less.
    Image folders should have a naming convention, i.e. ia, ib, ic, etc.
    The only drawback is preventing people form hot-linking to the images.
    If that isn't a problem then moving the images to disk and coming up with a naming/coding convention will pay off tremendously.
     
  12. Thank you a lot for the solution. I feel that you are right. I'll do it.
    The only thing that I can't understand - how it worked till now? Some threshold was reached?
     
  13. Yes I'd say the BLOB's are choking it and I have seen that happen.
    It can be a real pain just pulling that many BLOBs up in SQL Server locally.
     
  14. :confused:
    I saved all the pictiore on the disk. Database size reduced from 300 to 42
    The connection became easie. But...
    I still receive emails that people get that error. Somewhat about 1-2 emails each day. I suppose that the number of failures is much more - peope very rare inform webmasters about such failures - they simply go away.
    How many parallel connections your SQL Server allows?
     
  15. mjp

    mjp

    The only information I could find on intermittent 26 error had to do with the site visitor running Vista and Windows Firewall on their computer (who knows, I've heard stranger things).

    If you don't see the error anymore but some users do, you should ask them about O/S, browser, etc., and see if you can find some kind of common thread on their end.
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page