Could not connect to SQL Server using osql -


I have a script that is connected to the default instance of SQL Server 2005. But I am connecting and the following message [SQL Native Client] Named Pipes Provider: Connection to SQL Server can not be opened [53] [SQL Native Client] Login timeout expired [SQL Native Client] on server An error has occured while establishing a connection. When connecting to SQL Server 2005, this failure may arise from the fact that under default settings, SQL Server does not allow remote connections.

The contents of the script are:

  osql -E -S & lt; Servername & gt; -i D: \ script \ script1.sql -o D: \ scripts \ script1.txt  

I saw a network connection from SQL Server Configuration Manager. TCP / IP is enabled but named pipes are disabled.

My question could be the possible cause and solution for this error?

Try OSQL-A-S (local) or OSQL-e-S I do not know Sometimes why does this work, and secondly it does not.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -