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
sitijaafarAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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 & Architect, EE Solution GuideCommented:
>> 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 & Architect, EE Solution GuideCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2005

From novice to tech pro — start learning today.