IP Address in QoE database RRS feed

  • Question

  • We really use the QoE server's reports, but have to do a lot manpower intensive data manipulation to get what we want.  I'm looking to query for all the appropriate data directly from the QoE's SQL database, but have ran into an issue:

    One of the things that I'm trying to grab is the IP addresses of the caller and callee.  In the QoEMetrics database (dbo.MediaLine), the addresses are stored in a integer field and shows as either a 9 or 10 digit number (some entries are negative) and I don't know how to convert it back to a real IP address.  I noticed that the SubNetMask shows a '-256' or a '-65536' - which is a class C or class B subnet respectively.

    Does anyone know how to grab that number and convert them back to the a.b.c.d format?  (Note:  The query needs to be able to do this on the fly - no stored procedures allowed.)

    Thanks In Advance
    • Edited by Sick Freak Wednesday, April 29, 2009 5:19 PM
    Wednesday, April 29, 2009 12:42 AM


  • Found out that Microsoft already provides a function that does this for us: dbo.pIPIntToString

    Here's my example:

    SELECT Caller_IP =  dbo.pIPIntToString(CallerIPAddr) FROM dbo.MediaLine
    • Marked as answer by Sick Freak Thursday, April 30, 2009 12:05 AM
    Thursday, April 30, 2009 12:05 AM