Its not a SQL Server related, but I found it difficult to identify a way to get the NetBIOS name of a computer, hence sharing the same.
Recently, while troubleshooting an issue with MSDTC, I had to use DTCPing tool. I do not cover the DTCPing tool here, but will share more about it in another post. DTCPing tool was expecting NetBIOS name instead of IP address.
So, here are few options to identify the NetBIOS Name of a computer.
Using T-SQL
Select serverproperty('ComputerNamePhysicalNetBIOS')
(Or)
exec master..xp_regread 'HKEY_LOCAL_Machine', 'SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName\','ComputerName'
Using Windows
nbtstat -n (-n -- Lists local NetBIOS names.)
Thats it for now, but if you think there is any other method, post it in the comment section.
One thought on “How to identify NetBIOS Name of a computer?”