请大家帮我看看这些错误应该怎么解决:
C:\Documents and Settings\Administrator>osql -E -S"localhost,1433"
[SQL Native Client]TCP Provider: 由于目标机器积极拒绝,无法连接。
[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.
C:\Documents and Settings\Administrator>osql -E -S localhost
\MSSQLSERVER
[SQL Native Client]SQL Network Interfaces: Connection string is not valid[87].
[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.
如何才能连接上呢?
osql -Usa -Paaa
就出来了个
1>
这样能证明连上了吗?
原来那两种连接方式错在那里了?因为我的目的不只是连接上,要运行一个sql文件,建一个database然后再建一堆表,运行的时候就报这种错
[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.