SQL Server does not allow remote connection
I am working on MSBuild task and want to connect osql.exe to remote machine’s sql server. I got following errors.
[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
I am running the following command
osql -U elm -P admin123 -S “Testng-Server\Cygnet” -d ELM_Test -n -b -i “E:\Projects\HOBO1\ELM01\Source\ELM01.Database\DataScript\PopulateData.sql”
It is strangge but when i add host into the command line it worked.
osql -U elm -P admin123 -S “Testng-Server\Cygnet” -h “testing-server\cygnet” -d ELM_Test -n -b -i “E:\Projects\HOBO1\ELM01\Source\ELM01.Database\DataScript\PopulateData.sql”
I got similar problem while connecting to sql server but i don’t know what the solution in it. I will apply above solution once I got that error again. Hope wont get it again 😛