Link to home
Start Free TrialLog in
Avatar of thayduck
thayduckFlag for United States of America

asked on

Need server name using ip address

I have a sql 2008 table that has a ip address field and a empty server name field.

How can I update the server name field using the ip address field within a sql stored procerdure ?

It looks like you have to use nslookup, but I am not sure how.
ASKER CERTIFIED SOLUTION
Avatar of Thorrsson
Thorrsson

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of thayduck

ASKER

Looks like I am not allowed to use xp_cmdshell. I will send a email to our security people to find out why.

SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'xp_cmdshell' by using sp_configure. For more information about enabling 'xp_cmdshell', see "Surface Area Configuration" in SQL Server Books Online.
 
Avatar of Thorrsson
Thorrsson

It is disabled by default ad it opens up alot of possible trouble
Since our server security team will not allow us access to this command I cannot try. I will award you the points since it looks like it might have worked.
Thanks.