There are many reasons why sqlcmd -L will not show a SQL Server. There is not a reliable way to "detect" from machine on the network a SQL Server is running somewhere on the network.
What is your purpose for trying to use sqlcmd -L?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
in LAN I have installed 2 to 3 sql severs but when using sqlcmd -L command I only see 1 server at the location using this command, why does sqlcmd -L command not see other sql sever servers in the network LAN ?
There are many reasons why sqlcmd -L will not show a SQL Server. There is not a reliable way to "detect" from machine on the network a SQL Server is running somewhere on the network.
What is your purpose for trying to use sqlcmd -L?
Hi @Dong Lam trien ,
Hope everything goes well. Here is a related case which may give you some help.
https://learn.microsoft.com/en-us/answers/questions/847351/scan-for-sql-servers-on-network.html
In order to benefit all community members who are having this similar issue, please choose an answer to accept or vote for the answer you think is useful to you. Your contribution is highly appreciated.
Best regards,
Seeya
Hi @Dong Lam trien ,
Welcome to Microsoft Q&A!
Please refer to this document about SQL Server in Windows operating system: https://learn.microsoft.com/en-us/troubleshoot/sql/general/use-sql-server-in-windows
You can use this table in the above link to check if your operating system supports your current version of SQL Server.
Best regards,
Seeya
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
See https://learn.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-ver15
=> Parameter -L[c] => Note
Because of the nature of broadcasting on networks, sqlcmd may not receive a timely response from all servers. Therefore, the list of servers returned may vary for each invocation of this option.
That function was never reliable.
I work as a LAN Lab and install sql server for several machines, right at the machine where sql server is installed I use the command: sqlcmd -L to check if the server is found but this command can't find, this computer i am
using sql server 2008 pro and win10 21H1, you see attached image file
Also this command sqlcmd -L I went to see sql server again, this computer i am using win7 ultimate, do you know why this error ?