Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Hello,How to get workstation ip , that connected to server ?Kind Regards,Sasan.
afrika
Master Smack Fu Yak Hacker
2706 Posts
Posted - 2009-10-07 : 06:07:06
logon to the workstation and in command prompt type "ping localhost"
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts
Posted - 2009-10-07 : 06:09:35
Use sp_who2Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/
rajdaksha
Aged Yak Warrior
595 Posts
Posted - 2009-10-07 : 06:20:52
HiTry this..
CREATE TABLE #TEMP_IP(IP VARCHAR(3000))INSERT INTO #TEMP_IPEXEC XP_CMDSHELL 'IPCONFIG'DECLARE @T1 VARCHAR(300)-- SUBJECT TO LOCALISATIONSET @T1 = (SELECT TOP 1 IP FROM #TEMP_IP WHERE IP LIKE '%IP ADDRESS%' ORDER BY IP DESC)DECLARE @LEN INTSET @LEN = CHARINDEX(':', @T1)SELECT TOP 1 LTRIM(RTRIM(SUBSTRING(@T1, @LEN+1, LEN(@T1)))) AS IPDROP TABLE #TEMP_IP