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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 IP ?

Author  Topic 

sasan_vm
Yak Posting Veteran

51 Posts

Posted - 2009-10-07 : 03:39:12
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"
Go to Top of Page

senthil_nagore
Master Smack Fu Yak Hacker

1007 Posts

Posted - 2009-10-07 : 06:09:35
Use sp_who2

Senthil.C
------------------------------------------------------
[Microsoft][ODBC SQL Server Driver]Operation canceled

http://senthilnagore.blogspot.com/
Go to Top of Page

rajdaksha
Aged Yak Warrior

595 Posts

Posted - 2009-10-07 : 06:20:52
Hi

Try this..


CREATE TABLE #TEMP_IP
(IP VARCHAR(3000))

INSERT INTO #TEMP_IP
EXEC XP_CMDSHELL 'IPCONFIG'
DECLARE @T1 VARCHAR(300)

-- SUBJECT TO LOCALISATION
SET @T1 = (SELECT TOP 1 IP FROM #TEMP_IP
WHERE IP LIKE '%IP ADDRESS%' ORDER BY IP DESC)

DECLARE @LEN INT
SET @LEN = CHARINDEX(':', @T1)

SELECT TOP 1 LTRIM(RTRIM(SUBSTRING(@T1, @LEN+1, LEN(@T1)))) AS IP

DROP TABLE #TEMP_IP





-------------------------
R...
Go to Top of Page
   

- Advertisement -