Reputation: 731
When I try to establish SQL Server connection using SQLCMD utility getting below error.
C:\WINDOWS\system32>sqlcmd -S <ComputerName>\<InstanceName>
Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : SQL Server Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF]. .
Sqlcmd: Error: Microsoft SQL Server Native Client 11.0 : Login timeout expired.
Sqlcmd: Error: Microsoft SQL Server Native Client 11.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..
Do we have any workaround to fix this issue.
Upvotes: 2
Views: 6976
Reputation: 1
If you are installing multiple versions, uninstalling and reinstalling, the -S uppercase option will not work. This is clearly Microsoft's faulty intention. Use the -s lowercase option. SQLCMD -? Options are also capitalized, but only if you haven't deleted them. You can see that the argument control is being processed by a conditional statement. So, it's obviously MS's fault.
Upvotes: 0
Reputation: 3598
SQLCMD -S .\SQLEXPRESS -E
--> connecting windows autheication
Upvotes: 1
Reputation: 731
After adding port number I able to establish SQL connection using SQLCMD Utility.
C:\WINDOWS\system32>sqlcmd -S <ComputerName>\<InstanceName>,<SQL Port Number>
1> Use Master
2> GO
Changed database context to 'master'.
1> EXIT
Upvotes: 1