# question

## Translate ISA Server logs IP fields

Querying a ISA Server 2006 proxy log database (MSDE), and the one table, WebProxyLog, has a field clientip (bigint), for example '167903820' - any ideas how to turn that back to a IPv4 address?
1 comment

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

·
is that the value in the log file? This is the data source that got me involved with LogParser :D
0 Likes 0 ·

·

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

·
not sure I would use their function though, may be able to do better . . .
0 Likes 0 ·
·
Excellent thank you! Not sure why I couldn't find that page - I spent about an hour googling it this morning and kept getting guff. Just need it as a one-off at the mo so that function is good enough for now.
0 Likes 0 ·
The number is the IP address. To split the number back into an IP address, go through the following steps: - convert the number into a 8-digit Hexadecimal number - break it down into 4 2-hex-digit numbers - convert each of those into a decimal number - put back together with dots in the appropriate places... What does that link say?

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

·
That is pretty much what the link says
0 Likes 0 ·
·
> For IP address A.B.C.D the big integer stored is (((A*256+B)*256+C)*256+D They use a function like Convert(varchar(3),Convert(Bigint,@bi) / Convert(Bigint,256*256*256)) + '.' + Convert(varchar(3),Convert(Bigint,@bi) / Convert(Bigint,256*256) % 256) + '.' + convert(varchar(3),Convert(Bigint,@bi) / Convert(Bigint,256) % 256) + '.' + convert(varchar(3),Convert(Bigint,@bi) % Convert(Bigint,256) ) where @bi is the bigint
0 Likes 0 ·