Bulk copy (bcp)

bcp transfers encrypted data in and out of databases in either plaintext or ciphertext form. By default, bcp copies plaintext data. bcp processes plaintext data files as follows:

This example copies the “customer” table out as plaintext data in native machine format:

bcp uksales.dbo.customer out uk_customers -n -Uroy
-Proy123

Use the -C option for bcp to copy the data as ciphertext. When copying ciphertext, you may copy data out and in across different operating systems. If you are copying character data as ciphertext, both platforms must support the same character set.

The -C option for bcp allows administrators to run bcp when they lack decrypt permission on the data. When the -C option is used, bcp processes data as follows:

The following example copies the “customer” table. The cc_card column is copied out as human-readable ciphertext. Other columns are copied in character format. User “roy” is not required to have decrypt permission on customer cc_card.

 bcp uksales.dbo.customer out uk_customers -C -c -Uroy -Proy123