How do you store an AD octet string in SQL SERVER?
How do you store an AD octet string in SQL SERVER?
I am importing some AD data and would like store what is in AD an octet string and store in SQL. What SQL data type best accomplishes this?
I'm leaning towards varbinary and convert开发者_如何学Pythoning the octet string, but I'm not too sure how to proceed.
I googled around for some examples but couldn't find any.
I'm not familiar with an AD octet string, but arbitrary octets should indeed use [var]binary(size)
- varbinary(max)
being the most versatile. If the string is hex or base-64, the translation should be very easy. It will take less space correctly stored as a BLOB.
I'd convert it to a GUID and store it in a uniqueidentifier column.
See the following: http://support.microsoft.com/kb/325648 and http://www.leadfollowmove.com/archives/powershell/converting-a-guid-string-to-octet-string
精彩评论