sqlcmd Connection error
Posted on 2008-11-03
I have a .sql file as below:
SELECT uname, upwd
I am trying to run this from the Vista command line with the following command:
sqlcmd -S DANHP\SQLEXPRESS -i C:\ftp\test.sql -o C:\ftp\output.rpt
the output file returns the following error:
HResult 0xFFFFFFFF, Level 16, State 1
SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
Sqlcmd: Error: Microsoft 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..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
I have checked the server settings and Allow remote connections to this server is enabled and I am using mixed mode authentication and am going to use windows authentication.
When I get this working I will create a bat file to run in windows scheduler.
Thanks is adance for any help.