I need to encrypt few column level data in multiple tables in SQL server 2014. I'm a little confused after reading an article on Encrypt a column of data from the microsoft forum. Do I need to create a new column in the table for encrypted data? I mean is it possible to encrypt the existing column instead of creating a new column for encrypted data? Say Column A has a credit card information which I need to encrypt. Per the article there is a need to create Column B which will store the encrypted credit card information. Is it possible to do an encryption on column A instead of creating extra Column B. Thanks
Column level data encryption in SQL Server 2014
1.2k Views Asked by LearningMacro At
1
There are 1 best solutions below
Related Questions in SQL
- SQL schema for a fill-in-the-blank exercise
- Hibernate: JOIN inheritance question - why the need for two left joins
- What's supposed to be the problem in this query?
- Compare fields in two tables
- How to change woocomerce or full wordpress currency with value from USD to AUD
- Dynamic query creation with Array like implementation
- SQL query to get student enrolled in this month in a course - Moodle
- SQL LAG() function returning 0 for every row despite available previous rows
- Convert C# DateTime.Ticks to Bigquery DateTime Format
- Use row values from another table to select them as columns and establish relations between them (pivot table)
- SQL: Generate combination table based on source and destination column from same table
- how to use system's environnement variables in sql script
- PHP fetchAll on JOIN
- Multitable joining in Sql
- How to display name starting from 'z' by using BETWEEN cmd only?
Related Questions in ENCRYPTION
- Is TLS enough for client server encryption or if dealing with sensitive data, its better to add ur own encryption also. for example leverage AWS SSM?
- Secure Messaging Implementation in C#
- File splitting and encryption
- Large file processing in the web browser
- Java code of AES/GCM/NoPadding encryption algorithm with authentication tag
- AES-256-CBC encryption returning different result in Python and PHP , HELPPP
- Why are encrypted stored procedures taking a long time to execute in SQL Server 2022?
- Why/How does Apache auto-include "DHE" TLS1.2 ciphers while nginx needs "dhparams" file?
- Encrypt in Single Store and Decrypt in SQL Server
- Is it possible to develop a Transparent Data Encryption(TDE) system on macOS now?
- How can I ensure incremental changes in deciphered messages in Python substitution cipher decoding?
- Getting Error Message as "the input string is not a complete block" while Decryting using AES
- Laravel: How to fix "the MAC is invalid" on local environment
- How to encrypt a string and decrypt it using a password
- Willena's sqlite-jdbc-crypt driver for sqlite3 database encryption
Related Questions in SQL-SERVER-2014
- Retriving data row that matches all conditions
- What is the most efficient way of extracting these integers from a string using SQL?
- GROUP BY works but I don't think it should
- Get total minutes between 2 date time
- Connect together different values with splitter that have been grouped by
- The incoming TDS protocol stream is incorrect' error requiring IIS restart
- How to get sum of amount from multiple tables?
- Pivoting/Unpivoting multiple columns using dynamic SQL
- Calculate Weekly totals and should appear immediately after the corresponding week's data
- Count rows by monthend - year to date falling between two dates
- Error when using external dll .net framework in the reporting service 2014 report
- How to optimise a query with multiple subqueries for string aggregation?
- Group by MIN value in SQL Server pivot table query
- Update column with leading zeros
- Join most recent event into daily splits
Related Questions in DATABASE-SECURITY
- How to protect local database files from non-admin users
- Multitenancy with Database connection using credentials to achieve pure isolation and increases security
- Can I protect T-SQL business logic from SQL Server database administrators and owners
- Is CouchDB Authorization Alone Sufficient For Production Apps?
- Building a full stack web app with SvelteKit, MongoDB, and Auth0 while ensuring secure user-specific document access
- where to start building a web service layer to secure my database?
- How to setup row level access in Postgres without creating a user
- Hide a database from logins with VIEW ANY DATABASE permission
- How to give one user full access to MongoDB right after install?
- How to design security policies for a following system including counters in postgres/supabase if postgres functions are used?
- Security trigger when user is added to a database
- Disable update, insert, delete for certain users from certain applications
- Deny doesn't take priority in case of permission chain?
- Postgres: Is Using Both Prepared Statements and Character Escaping Sufficient to Avoid Malicious User Input Attacks?
- Connect mongoDB atlas to application using VPC without username password
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
In almost every case, you have to create a new column for encrypted data. Encrypted data is stored in SQL Server as varbinary type. Plaintext data is almost always in varchar or some other character type. In your case, your ColumnA is probably varchar(16) or something like that while ColumnB is probably varbinary(128).
You can and should drop the original column after the encryption process is complete else you are still exposed to most security risks. You can also rename the new varbinary type column that holds the ciphertext of the sensitive data to the original column name if you like. Just remember that it now holds data in ciphertext instead of the original plaintext.
If your source type is also varbinary and has sufficient length to store the newly encrypted data, you could do an in-place encryption but the risk there is if you change your mind or discovered a bug in your code during or shortly after execution, you don't have a quick & easy way to back out of the changes. You also lose the ability to do side-by-side testing/verification when you encrypt in place. Finally, you probably won't have too many varbinary columns that require encryption, hopefully.