none
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. (p

    질문

  • Hi everybody,

    I've just installed sql server 2008 r2 and i restored my DB, and i receive this 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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)


    Before i came here i searched every possibilities to fix this error. I followed the correct steps and still shows this error when i am trying to access the website.

    Please help any help will be appreciated

    Thank you so much for you efforts 


    willockss

    2012년 3월 12일 월요일 오전 10:13

답변

  • Thank you so much for your answer, but i succeed to fix my self.

    It was because i was using the default user provided by windows. I've created an SQL user and now is working like a charm

    Thank you so much once again


    willockss

    • 답변으로 표시됨 willockss 2012년 3월 12일 월요일 오후 12:38
    2012년 3월 12일 월요일 오후 12:38

모든 응답

  • Is MSSQL Service running? :-) Is that default or named instance? If it is named instance , have you  created a port and specify it while connecting?

    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/

    2012년 3월 12일 월요일 오전 10:25
  • the mssql service is running. What do you mean with the default name or named instance? i am sorry but i am a newbie

    Thank you so much


    willockss

    2012년 3월 12일 월요일 오전 10:34
  • How many instances (SQL Server installations) do  you install on machine?

    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/

    2012년 3월 12일 월요일 오전 10:49
  • i have just one sql server installed

    willockss

    2012년 3월 12일 월요일 오전 11:38
  • Thank you so much for your answer, but i succeed to fix my self.

    It was because i was using the default user provided by windows. I've created an SQL user and now is working like a charm

    Thank you so much once again


    willockss

    • 답변으로 표시됨 willockss 2012년 3월 12일 월요일 오후 12:38
    2012년 3월 12일 월요일 오후 12:38
  • You could add that windows account to SQL Server (even better than having SQL Login) and grant connect  permissions..

    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/

    2012년 3월 12일 월요일 오후 1:31
  • Hi willockss,

                      I have same problem as you explained above.Can you tell me that how to create SQL user.I am not getting answer to  my problem.I am searching answer from 6 days.Thanks in advance.

    • 답변으로 제안됨 Dinesh Kudale 2012년 12월 29일 토요일 오전 3:20
    2012년 12월 29일 토요일 오전 3:19
  • The error message means that you were not able to contact SQL Server, and there are a whole number of possible reasons:

    1) SQL Server is not running.
    2) You have misspelled the server or instance name.
    3) You are connecting from a remote machine, and there is a firewall in the way.
    4) You are connecting from a remote machine, and the network is segmented.
    5) You are connecting from a remote machine, and the browser service is not running and you are trying to connect to named instance.
    6) You are connecting from a remote machine, but SQL Server does not accept local conncetions.

    And the list goes on.

    I suggest that you start a new thread and give more details on your situation. That is, are you trying to connect locally or remotely? From what program are you trying to connect? SSMS, an application, or what? What do you specify for the server name? And so on.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
    2012년 12월 29일 토요일 오전 10:37
  • I think most search engines have this post as the first hit so I'll put what my solution was here... its the same solution for Sql Server 2005, 2008, 2008 R2 and 2012 if using the default instance. The steps to enable this...

    1. Open up Sql Server Configuration Manager
    2. In the left pane, expand Sql Native Client ** Configuration. Note there is a 32 and 64 bit for later version of Sql and I only do this for the 64 bit version and but I'm sure there are situations where you will need to do it for 32 bit.
    3. In the right pane there should be TCP/IP, just right click and Enable it.
    4. Back in the left pane, expand Sql Server Network Configuration and select Protocols for SQLEXPRESS (may also be MSSQLEXPRESS).
    5. In the left pane, double click on TCP/IP to open the dialog
    6. Go to the IP Addresses tab of the dialog and scroll to the bottom where it says IPALL
    7. Set the TCP Port to 1433
    8. Finally restart the SQL Server Service

    Fairly sure this is going to keep being the default for future versions of Sql. My best guess as for why is because opening up the TCP port + Firewall port can allow anonymous access to the SQL database. This in general tends to be bad as attackers do port sniffing on random IP addresses and then will spend 6 months trying to guess the SA account on the system. An easy way to see if this is happening to you is:

    1. Open up the Event Viewer and check all the failed Sql login attempts. If there are login attempts from random IP addresses in eastern Europe and Russia you probably have an open TCP port and they are trying to guess your password.
    • 답변으로 제안됨 Robins Tomar 2014년 4월 22일 화요일 오전 8:19
    2013년 3월 31일 일요일 오후 7:56
  • Here details image by image to solve the problem

    Start> Program> .

    it may be help you


    • 편집됨 Shahid AB 2013년 4월 4일 목요일 오전 5:38
    • 답변으로 제안됨 Shahid AB 2013년 4월 4일 목요일 오전 5:38
    2013년 4월 4일 목요일 오전 5:37
  • Hi,

    I am getting similar error "SqlState HYT00, Login timeout expired

    A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.

    TCP Provider: Error code 0x6F"

     while trying to connect from Linux using "sqlcmd -S VM-5555 -U DWH_ETL"

    whereas  I am able to connect  the same server and instance from MS SQL management studio, I am also able to ping the server from backend.

    Entries of .ini are

    $cat   odbc.ini

    [VM-5555]

    Driver=/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1790.0

    Server=tcp:VM-5555.xxx.nsroot.net\MSSQL_DWH_SIT,1443

    Database=DWH_Report_SIT

    cat    odbcinst.ini

    [SQL Server Native Client 11.0]

    Description=Microsoft SQL Server ODBC Driver V1.0 for Linux

    Driver=/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1790.0

    Threading=1

    UsageCount=1

    I tried \ & \\ before instance name.

    I was also able to connect other server from Linux, but without using the instance name.

    that time entry in .ini was similar

    cat   odbc.ini_old

    [VM-1272-6223]

    Driver=/opt/microsoft/sqlncli/lib64/libsqlncli-11.0.so.1790.0

    Server=tcp:vm-1222.xxx.nsroot.net

    Database=DWH_Report_DEV

    Can someone pls suggest what is wrong or how can I eliminate contributing factor.

    thanks

    2013년 7월 11일 목요일 오후 8:55
  • First, you should start a new thread and not piggyback on an old thread about something completely different problem. (The error message you get is very generic, and since you connect from Linux, you are in a different ball park altogether.)

    I don't know if SQLCMD on Linux is different than on Windows, but -S usually indicates the server, and you seem to have that as the data source in the ODBC file. Try -S "VM-5555,1443" and see if that works.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    2013년 7월 11일 목요일 오후 10:01