February 3, 2004 at 1:25 am
Hi All,
Can anybody suggest me a datatype to store IPV6 address(16 bytes)? I want to create my primary key on this column.
Regards,
amitm79
February 3, 2004 at 5:33 am
I'd use binary(16). That would be compact yet eminently readable. Do the display formatting at the client.
--Jonathan
February 3, 2004 at 5:59 am
Hi Jonathan,
First of all, IPV6 has 128 bits so if at all you plan to store it in binary it will be binary(128). Another thing is having primary key over a binary(128) will hit the performance severly. Storing it in 8 int's is an option but i am checking the consequences of that.
Regards,
amitm79
February 3, 2004 at 6:13 am
I guess you know this already?
http://www.microsoft.com/windowsserver2003/technologies/ipv6/default.mspx
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
February 3, 2004 at 6:25 am
Sorry, this one is better. Especially the chapter on 'Large Address space'
http://download.microsoft.com/download/5/2/5/525343cc-7ba4-4e3b-a96a-c7a040d98d2d/IPv6.doc
--
Frank Kalis
Microsoft SQL Server MVP
Webmaster: http://www.insidesql.org/blogs
My blog: http://www.insidesql.org/blogs/frankkalis/[/url]
February 3, 2004 at 6:32 am
First of all, binary(16) is 16 bytes, not bits. Another thing is that the minimum number of bytes to store 16 bytes is 16...
--Jonathan
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply