[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2950
  • Last Modified:

HResult 0x2, Level 16, State 1 Named Pipes Provider: Could not open a connection to SQL Server [2].

I type sqlcmd but get the below error:

HResult 0x7E, Level 16, State 1
VIA Provider: The specified module could not be found.

Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
 allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.


What I already did are:
1) enable remote connection on TCP/IP and pipes on surface area configuration
2) change the pipe name to \\.\pipe\sql\query
3) off firewall
0
sitijaafar
Asked:
sitijaafar
  • 2
1 Solution
 
lofCommented:
what is the full command you use when executing sqlcmd?
it looks like you are trying to connect through VIA which is different to named pipes and TCP/IP
either you will have to enable VIA as well or use named pipes or TCP/IP
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
>> VIA Provider: The specified module could not be found.

Seems like you have enabled VIA protocol..
If you intend to use VIA, then either the installation of VIA driver is improper or it is corrupted..( Reinstall VIA protocol Drivers again to fix it)

Else disable VIA protocol, Restart SQL Server Services and then check out again..
0
 
Raja Jegan RSQL Server DBA & ArchitectCommented:
And if you got the above error in SQLCMD, then just specify the Servername and instancename correctly to make it work..

http://geekswithblogs.net/TimH/archive/2008/03/12/sql-server-2005-error-via-provider-the-specified-module-could.aspx
0
 
sitijaafarAuthor Commented:
I re-install my sql server 2005 and I choose the default instance. And finally it's work.
0

Featured Post

[Webinar] Kill tickets & tabs using PowerShell

Are you tired of cycling through the same browser tabs everyday to close the same repetitive tickets? In this webinar JumpCloud will show how you can leverage RESTful APIs to build your own PowerShell modules to kill tickets & tabs using the PowerShell command Invoke-RestMethod.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now