Re: Domain Name

From: Michael Tissington (michael_at_nospam.com)
Date: 05/10/04


Date: Mon, 10 May 2004 10:42:06 -0700

Thanks.

Is there anyway of issuing some SQL to return the information from the
server.

(or something else that uniquely identifies the machine)

-- 
Michael Tissington
http://www.oaklodge.com
http://www.tabtag.com
""Michael Cheng [MSFT]"" <v-mingqc@online.microsoft.com> wrote in message
news:RFHjvkmNEHA.3808@cpmsftngxa10.phx.gbl...
> Hi Michael,
>
> Based on my knowledge, it would be difficult to get NetBIOS name from SQL
> Server. However, you could have this as a workaroung
>
> 1. You must have permission on client.
> 2. You shold make a VBS file (for example, named getNetBIOS.vbs)
> =======
> strComputer = "clientComputerName"
> Set objWMIService = GetObject _
>     ("winmgmts:" & "!\\" & strComputer & "\root\cimv2")
> Set colAdapters = objWMIService.ExecQuery _
>     ("Select * from Win32_NetworkAdapterConfiguration Where IPEnabled =
> True")
> For Each objAdapter in colAdapters
>     Wscript.Echo objAdapter.DNSHostName & "." & objAdapter.DNSDomain
> Next
> =======
> 3. You'd better replace "clientComputerName" with the clinet name
> 4. Double click getNetBIOS.vbs, you would get a pop up dialog
> 5. You could launch it from SQL Server by xp_cmdshell
> 'Disk:\Patch\getNetBIOS.vbs' in Query Analyzer
>
> Also, you could have a look at the usage of DOS command: NBTSTAT
>
> Anyway, I understand this method seems complicated and it has many
> limitations. But it's the only way could be provided now. You could have a
> look on the following documents, which will show you how to get NetBIOS
> through API
>
> HOW TO: Obtain the NetBIOS and DNS Computer Names by Using Visual C#
> http://support.microsoft.com/?id=303902
>
> Thank you for your patience and cooperation. If you have any questions or
> concerns, don't hesitate to let me know. We are here to be of assistance!
> Sincerely yours,
>
> Michael Cheng
> Microsoft Online Support
> ***********************************************************
> Get Secure! - www.microsoft.com/security
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only, many thanks.
>


Relevant Pages

  • Re: Keiner vertrauten SQL-Server-Verbindung zugeordnet
    ... Hallo Michael, ... - über den aktuell eingeloggten Windows-Benutzer ... Der SQL Server kann so konfiguriert werden, ...
    (microsoft.public.de.sqlserver)
  • Re: Konverter MS-SQL => MySQL ???
    ... Michael Poremski wrote: ... Use DTS in SQL Server to convert to an ODBC compliant database (SQL ...
    (alt.os.linux.suse)
  • Re: Login failed for user
    ... Errors in Active Server Pages and Microsoft Data Access Components" article ... Dejan Sarka, SQL Server MVP ... "Michael" wrote in message ...
    (microsoft.public.sqlserver.security)
  • Re: Protecting Administrator Account Concern.
    ... > SQL as a guest. ... > server without being an admin. ... > Michael J. Jenkin MVP - SBS, ... > MVP's do not work for Microsoft. ...
    (microsoft.public.windows.server.sbs)
  • Re: Domain Name
    ... it would be difficult to get NetBIOS name from SQL ... You'd better replace "clientComputerName" with the clinet name ... You could launch it from SQL Server by xp_cmdshell ...
    (microsoft.public.sqlserver.programming)