Failed to connect to SQL Server using osql
I have a script that connects to the default SQL Server 2005 instance. But I also connected and got the following message instead
[SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [53].
[SQL Native Client]Login timeout expired
[SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections.
Script content:
osql -E -S <servername> -i D:\scripts\script1.sql -o D:\scripts\script1.txt
I have looked at the network connection from SQL Server Configuration Manager. TCP / IP is enabled, but named pipes are disabled.
My question is what is the possible cause and solution for this error?
0
source to share