Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conversion from VarChar to VarBinary

Status
Not open for further replies.

djj55

Programmer
Feb 6, 2006
1,761
US
Hello, I am looking at encryption in 2008. I have the basics down but have a question about sizing the encrypted column. Yes I know that the VAR means space savings.

I have two columns of data I want to encrypt. One 9 characters and one 20 characters. Currently VARCHAR(9) and VARCHAR(20). What is the minimum VARBINARY needed for these, or a better question how do I calculate the VARBINARY size?

Thank you,

djj
The Lord is My Shepard (Psalm 23) - I need someone to lead me!
 
Take some of the larger values and encrypt them. Tripple that encrypted size and you should be fine.

Denny
MVP
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration)
MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI)

My Blog
 
Thank you for the answer. I was hoping for an equation but it looks like trial and error is the way to go.

Thanks again,

djj
The Lord is My Shepard (Psalm 23) - I need someone to lead me!
 
Trial and error is usually the best way to go. This way you get the most accurate results.

Denny
MVP
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration)
MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top