Using bcp with Compressed Data

Pages in a compressed table may have a combination of row-, page-, or uncompressed rows. Tables and partitions listed as not compressed may contain a mixture of rows in different states of compression because you may have created them when the table’s compression level was different.

  • bcp out:
    • Decompresses compressed rows and returns them to the client, either in native or character form.

    • Supports IDENTITY, encrypted columns, and so on.

    • Returns text data as uncompressed.

  • bcp in compresses uncompressed data received from the client according to the table or partition’s compression level.

Using bcp to copy data out and then bcp it back in to a table that is configured for compression results in compressed data, even if the data was originally uncompressed.