Re: Resolving DNS names from extended stored procedures

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Gert E.R. Drapers (GertD_at_SQLDev.Net)
Date: 10/07/04


Date: Thu, 7 Oct 2004 23:51:35 +0200

Are you doing a WSAStartup in your XP?
I have no problems doing gethostbyname to resolve the hostname back to an IP
address.

GertD@SQLDev.Net

Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2004 All rights reserved.

"Rick Genter" <rgenter@silverlink.com> wrote in message
news:eJhtjM%23qEHA.2604@TK2MSFTNGP10.phx.gbl...
> I've developed an extended stored procedure in C and want to resolve a
> hostname from within the stored procedure using DNS. I use getaddrinfo()
> to try and resolve the name. It never works from within the extended
> stored procedure when running within SQL Server 2000 (SP3a applied). A
> hard-coded IP address does work. The error I get back is WSAHOST_NOT_FOUND
> (11001). If I do an NSLOOKUP of the same hostname on the same machine, it
> works fine, so the server is configured OK. SQL Server 2000 is running
> using an account that does have network access; when I specify an IP
> address to my stored procedure, which turns around and establishes a TCP
> connection to a specified port and sends XML over the connection, it
> works.
>
> Are there any known issues resolving DNS names from within extended stored
> procedures?
>
> Thanks in advance.
>
> Rick
> --
> mailto:rgenter "at" silverlink.com
>



Relevant Pages

  • 10.1 - resolving hostnames slow for the first time
    ... I have encountered a very strange problem with 10.1 on my laptop. ... 30s or something like this when estabilishing SSH connection etc. ... Sometimes it even takes so long to resolve something, ... the hostname, then the result gets cached and the hostname is resolved ...
    (alt.os.linux.suse)
  • Re: Re.: Modem Problem.
    ... hostname into /etc/hosts. ... starting when the systems tries to boot. ... If your system can not resolve the FULL hostname from the /etc/hosts file, ... The nameserver has to be reachable NOW ...
    (comp.os.linux.misc)
  • RE: bin/22595: telnetd tricked into using arbitrary peer ip (was: telnetd suckage)
    ... >>> Speaking of telnetd sucking, did anyone ever get around to fixing ... It's also great for your logs... ... resolve hostname -> IP2 ...
    (FreeBSD-Security)
  • Re: Delayed booting problem on F7
    ... It talked about applying iptables but had "never matched protocal" and when it finally came up Thunderbird was broken. ... start by establishing what your hostname is: ... Even if it the hostname is pingable now, I think it would not have been pingable at the time when Karl had the initial problem. ... I'll put down some further possibilities that may have led to this issue {that seemed to resolve itself}. ...
    (Fedora)
  • Re: Delayed booting problem on F7
    ... It talked about applying iptables but had "never matched protocal" and when it finally came up Thunderbird was broken. ... start by establishing what your hostname is: ... Then make sure that hostname can be resolved, either by the hosts file or DNS: ... I'll put down some further possibilities that may have led to this issue {that seemed to resolve itself}. ...
    (Fedora)