Sunday, December 28, 2014

HResult 0xFFFFFFFF, Level 16, State 1


HResult 0xFFFFFFFF, Level 16, State 1
SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired
.

When running sqlcmd on the local machine where SQL server is installed and in the command if we use  sqlcmd –S (localhost\SQLINSTANCE) –i C:\filepath\sqlquery.sql
we get above error.


To resolve the problem change command line to;
sqlcmd –S localhost –i C:\filepath\sqlquery.sql

Make sure -S is in uppercase and -i is in lowercase.

No comments:

Post a Comment