How can we help you today? How can we help you today?
Andrew P

Activity overview

Latest activity by Andrew P

I've done some testing on this with the WorldWideImporters database and the MSDN walkthrough here. The table script for that object is: CREATE TABLE Purchasing.Supplier_PrivateDetails ( SupplierID INT CONSTRAINT PKFK_Purchasing_Supplier_PrivateDetails PRIMARY KEY CONSTRAINT FK_Purchasing_Supplier_PrivateDetails_Suppliers FOREIGN KEY REFERENCES Purchasing.Suppliers (SupplierID), NationalID NVARCHAR(30) COLLATE Latin1_General_BIN2 ENCRYPTED WITH (COLUMN_ENCRYPTION_KEY = WWI_ColumnEncryptionKey, ENCRYPTION_TYPE = DETERMINISTIC, ALGORITHM = 'AEAD_AES_256_CBC_HMAC_SHA_256' ) NULL, CreditCardNumber NVARCHAR(30) COLLATE Latin1_General_BIN2 ENCRYPTED WITH (COLUMN_ENCRYPTION_KEY = WWI_ColumnEncryptionKey, ENCRYPTION_TYPE = RANDOMIZED, ALGORITHM = 'AEAD_AES_256_CBC_HMAC_SHA_256' ) NULL, ExpiryDate NVARCHAR(5) COLLATE Latin1_General_BIN2 ENCRYPTED WITH (COLUMN_ENCRYPTION_KEY = WWI_ColumnEncryptionKey, ENCRYPTION_TYPE = RANDOMIZED, ALGORITHM = 'AEAD_AES_256_CBC_HMAC_SHA_256' ) NULL ); GO When you look at in SQL Source Control you will see the following : : -- Columns CREATE TABLE [Purchasing].[Supplier_PrivateDetails] ( [SupplierID] [int] NOT NULL, [NationalID] [nvarchar] (30) COLLATE Latin1_General_BIN2 NULL, [CreditCardNumber] [nvarchar] (30) COLLATE Latin1_General_BIN2 NULL, [ExpiryDate] [nvarchar] (5) COLLATE Latin1_General_BIN2 NULL ) ON [PRIMARY] GO -- Constraints and Indexes ALTER TABLE [Purchasing].[Supplier_PrivateDetails] ADD CONSTRAINT [PKFK_Purchasing_Supplier_PrivateDetails] PRIMARY KEY CLUSTERED ([SupplierID]) ON [PRIMARY] GO -- Foreign Keys ALTER TABLE [Purchasing].[Supplier_PrivateDetails] ADD CONSTRAINT [FK_Purchasing_Supplier_PrivateDetails_Suppliers] FOREIGN KEY ([SupplierID]) REFERENCES [Purchasing].[Suppliers] ([SupplierID]) GO So the tool looks at it as if it is a normal table - the scripts folder does not contain the encryption keys, and when you deploy, it will treat it like a normal table. You would need to handle the setup for Always Encrypted using Prescripts - and for that reason, I would recommend using ReadyRoll for AlwaysEncrypted table deployment (you can configure Pre and Post scripts in ReadyRoll) Hope that helps! / comments
I've done some testing on this with the WorldWideImporters database and the MSDN walkthrough here. The table script for that object is: CREATE TABLE Purchasing.Supplier_PrivateDetails ( SupplierID ...
0 votes