1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

VS08 / SQL Express 2008 Database Error

Discussion in 'Software' started by zebidy, Jul 27, 2010.

  1. zebidy

    zebidy Bit Poster

    I've just installed SQL Express 2008 and all seemed smooth, but when I go into VS08 click right click on my App_data folder and add an SQL Server Database, it hangs and then comes back with:

    "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 connection could be made beause target machine actively refused it"

    I'm completely stuck, I've tried google and to be honest I'm even more confused now.

    Can someone help me get this up and running please.

    (btw: I'm using windows 7, visual studio 2008, sql server express 2008 r2)
    Certifications: CIW Associate
    WIP: Learning asp.net / c#
  2. zebidy

    zebidy Bit Poster

    After over 3 hours of trying to get this to work, the last restart has done it and I hadn't made any change since the last one.... intermittent bug maybe? Very strange.
    Certifications: CIW Associate
    WIP: Learning asp.net / c#
  3. dmarsh

    dmarsh Terabyte Poster

    Generally you are looking at :-

    1. Is the relevant service running, there are about 5 windows services for MS SQL, the DB one is crucial obviously, it should be listed as running /started, if you use the DB a lot and computer is powerful then can make it automatic start type.

    2. If using TCP/IP to connect ensure firewall is not blocking application ports.

    3. Set connection protocols, main options are named pipes, shared memory or TCP/IP.

    TCP/IP tends to be main way to get interop, others can perform better if just using management tools.

    4. Check you instance name is correct and matches the above.

    5. Was instance successfully created in first place, do directories, data files and regisry entries exist?


    Sounds like it was just a service issue, sometimes a reboot will re-start a service, I've even seen SQL service run types change without manual intervention.

    All this stuff demonstrates why you need a good foundation to troubleshoot issues as a developer or DBA, you can still get by but chances are you will struggle more because you are learning multiple subjects at once and some of them may be pre-requisites to understanding other stuff, if you don't realise this and go and do the right research at the right point you can waste days pulling your hair out literally.
    Last edited: Jul 28, 2010
    Certifications: CITP, BSc, HND, SCJP, SCJD, SCWCD, SCBCD, SCEA, N+, Sec+, Proj+, Server+, Linux+, MCTS, MCPD, MCSA, MCITP, CCDH

Share This Page