Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Conversion from VARCHAR to VARBINARY in SQL Server 2008

Conversion from VARCHAR to VARBINARY in SQL Server 2008

Scheduled Pinned Locked Moved Database
questiondatabasesql-serversysadminsecurity
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Corporal Agarn
    wrote on last edited by
    #1

    Hello, I am looking at encryption in SQL Server 2008. I have the basics down but have a question about sizing the encrypted column. I have two columns of data I want to encrypt. One 9 characters and one 20 characters. Currently VARCHAR(9) and VARCHAR(20). (Yes I know that the VAR means space savings.) What is the minimum VARBINARY needed for these, or a better question how do I calculate the VARBINARY size? Thank you, djj

    A 1 Reply Last reply
    0
    • C Corporal Agarn

      Hello, I am looking at encryption in SQL Server 2008. I have the basics down but have a question about sizing the encrypted column. I have two columns of data I want to encrypt. One 9 characters and one 20 characters. Currently VARCHAR(9) and VARCHAR(20). (Yes I know that the VAR means space savings.) What is the minimum VARBINARY needed for these, or a better question how do I calculate the VARBINARY size? Thank you, djj

      A Offline
      A Offline
      Ashfield
      wrote on last edited by
      #2

      Two suggestions. 1. SQL Server 2008 has built in encryption, why not use that? 2. Why not simply do a few tests to determine what size you need?

      Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP

      C 1 Reply Last reply
      0
      • A Ashfield

        Two suggestions. 1. SQL Server 2008 has built in encryption, why not use that? 2. Why not simply do a few tests to determine what size you need?

        Bob Ashfield Consultants Ltd Proud to be a 2009 Code Project MVP

        C Offline
        C Offline
        Corporal Agarn
        wrote on last edited by
        #3

        The built in encryption is what I am looking at, at least I am using the BOL how to. As to the tests I will do that but it would be nice to have an equation to calculate it. djj

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups