%3CLINGO-SUB%20id%3D%22lingo-sub-1538602%22%20slang%3D%22en-US%22%3ELoad%26nbsp%3Bdata%26nbsp%3Bfrom%26nbsp%3BAlways%26nbsp%3BEncrypted%26nbsp%3Benabled%26nbsp%3BAzure%26nbsp%3BSQL%26nbsp%3Bdatabase%26nbsp%3Busing%26nbsp%3BSSIS%20in%20ADF%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1538602%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20tutorial%20walks%20you%20through%20the%20process%20on%20how%20to%20load%20data%20from%20Always%20Encrypted%20enabled%20Azure%20SQL%20database%20using%20SQL%20Server%20Integration%20Services%20(SSIS)%20in%20Azure%20Data%20Factory.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-align-left%22%3EAzure-SSIS%20integration%20runtime%20has%20built-in%20Microsoft%20ODBC%20Driver%2013%20for%20SQL%20Server.%20In%20this%20tutorial%2C%20we%20use%20SSIS%20ODBC%20source%20with%20Microsoft%20ODBC%20Driver%2013%20to%20load%20data%20from%20Azure%20SQL%20database%20with%20Always%20Encrypted%20enabled%20using%20Azure%20Key%20Vault.%20Details%20about%20ODBC%20driver%20setup%2C%20refer%20to%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fsql%2Fconnect%2Fodbc%2Fusing-always-encrypted-with-the-odbc-driver%3F%23working-with-column-master-key-stores%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Eusing%26nbsp%3BAlways%26nbsp%3BEncrypted%26nbsp%3Bwith%26nbsp%3Bthe%26nbsp%3BODBC%26nbsp%3BDriver%26nbsp%3Bfor%26nbsp%3BSQL%26nbsp%3BServer%3C%2FA%3E%26nbsp%3Bvia%20Azure%26nbsp%3BKey%26nbsp%3BVault%26nbsp%3Bbuilt-in%26nbsp%3B%20keystore%26nbsp%3Bprovider.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EFollow%20the%20steps%20to%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fazure-sql%2Fdatabase%2Falways-encrypted-azure-key-vault-configure%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3Econfigure%26nbsp%3BAlways%26nbsp%3BEncrypted%26nbsp%3Bby%26nbsp%3Busing%26nbsp%3BAzure%26nbsp%3BKey%26nbsp%3BVault%3C%2FA%3E%26nbsp%3B%2C%26nbsp%3BColumn%26nbsp%3BMaster%26nbsp%3BKey%26nbsp%3B(CMK)%26nbsp%3Bis%26nbsp%3Bnow%26nbsp%3Bstored%26nbsp%3Bin%26nbsp%3BAzure%26nbsp%3BKey%26nbsp%3BVault.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%222%22%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.comazure%2Fazure-sql%2Fdatabase%2Falways-encrypted-azure-key-vault-configure%3Ftabs%3Dazure-powershell%23enable-client-application-access%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%20noopener%20noreferrer%22%3EEnable%26nbsp%3Bclient%26nbsp%3Bapplication%26nbsp%3Baccess%3C%2FA%3E%26nbsp%3Bto%26nbsp%3Bget%26nbsp%3Bthe%20%3CSTRONG%3EApplication%26nbsp%3B(client)%26nbsp%3BID%3C%2FSTRONG%3E%20and%20%3CSTRONG%3Eclient%26nbsp%3Bsecrete%3C%2FSTRONG%3E.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22app-application-client-id.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F207154iBBF2843E0F6024DD%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22app-application-client-id.png%22%20alt%3D%22app-application-client-id.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22app-client-secrete.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F207153iE37E6D4FC9D688FA%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22app-client-secrete.png%22%20alt%3D%22app-client-secrete.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E3.%20Grant%26nbsp%3Bthe%26nbsp%3Bclient%26nbsp%3Bapplication%26nbsp%3Bproper%26nbsp%3Bpermissions%26nbsp%3B(get%2C%26nbsp%3BunwrapKey%2C%26nbsp%3Band%26nbsp%3Bverify)%26nbsp%3Bin%26nbsp%3Bthe%26nbsp%3BAzure%26nbsp%3BKey%26nbsp%3BVault.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22app-akv-access-policy.png%22%20style%3D%22width%3A%20255px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F207155i1FF9CE31E81FFFA3%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22app-akv-access-policy.png%22%20alt%3D%22app-akv-access-policy.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%224%22%3E%0A%3CLI%3ECreate%26nbsp%3Bsimple%26nbsp%3BSSIS%26nbsp%3Bpackage%26nbsp%3Bin%26nbsp%3BVisual%26nbsp%3BStudio%26nbsp%3B2017%26nbsp%3Bthat%26nbsp%3Buses%26nbsp%3Ban%26nbsp%3BODBC%26nbsp%3Bsource%26nbsp%3Band%26nbsp%3Ba%26nbsp%3Bflexible%26nbsp%3Bfile%26nbsp%3Bdestination.%20Configure%26nbsp%3Bconnection%26nbsp%3Bstring%26nbsp%3Blike%26nbsp%3Bbelow%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3EDRIVER%3D%7BODBC%26nbsp%3BDriver%26nbsp%3B13%26nbsp%3Bfor%26nbsp%3BSQL%26nbsp%3BServer%7D%3BSERVER%3D%26nbsp%3B%3CENTERYOURSERVER.DATABASE.WINDOWS.NET%3E%3Buid%3D%3CMYUSER%3E%3B%26nbsp%3BDATABASE%3D%3CMYDATABASE%3E%3BColumnEncryption%3DEnabled%3BKeyStoreAuthentication%3DKeyVaultClientSecret%3B%26nbsp%3BKeyStorePrincipalId%3D%3CAPPLICATION%3E%3BKeyStoreSecret%3D%5C%3CCLIENT%3E%3C%2FCLIENT%3E%3C%2FAPPLICATION%3E%3C%2FMYDATABASE%3E%3C%2FMYUSER%3E%3C%2FENTERYOURSERVER.DATABASE.WINDOWS.NET%3E%3C%2FP%3E%0A%3CP%3ENote%3A%3C%2FP%3E%0A%3CP%3ESurround%26nbsp%3Bthe%26nbsp%3Bvalue%26nbsp%3Bwith%26nbsp%3B%3CFONT%20color%3D%22%23FF0000%22%3E%7B%26nbsp%3B%7D%26nbsp%3B%3C%2FFONT%3Ewhen%26nbsp%3Bthere%26nbsp%3Bare%26nbsp%3B%5B%26nbsp%3B%5D%26nbsp%3B%7B%26nbsp%3B(%26nbsp%3B)%26nbsp%3B%2C%26nbsp%3B%3B%26nbsp%3B%3F%26nbsp%3B*%26nbsp%3B%3D%26nbsp%3B!%26nbsp%3B%40%26nbsp%3Bcharacters%26nbsp%3Bin%26nbsp%3Bthe%26nbsp%3Bclient%26nbsp%3Bsecrete%2C%26nbsp%3Band%26nbsp%3Bmanually%26nbsp%3Bescape%26nbsp%3Bthe%26nbsp%3Binterior%26nbsp%3B%7D%26nbsp%3Bwith%26nbsp%3Ba%26nbsp%3Bsecond%26nbsp%3B%7D.%3C%2FP%3E%0A%3CP%3EExample%3A%3C%2FP%3E%0A%3CP%3Ekeystoresecret%3D%3CFONT%20color%3D%22%23FF0000%22%3E%7B%3C%2FFONT%3E)%23%7C%3B_%3D%26amp%3B*%7B%2B%26gt%3B*-.%26amp%3B)%248%3F%25%3CFONT%20color%3D%22%23FF0000%22%3E%7D%3C%2FFONT%3E%7D%7CS%7C_%5E%3F%7C*%3D%3F.%3Bo%3D%3D_%23-QA%3D%26amp%3B%25%3CFONT%20color%3D%22%23FF0000%22%3E%7D%3C%2FFONT%3E%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22odbc-connection-manager.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F207163iA4529038D97A046E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22odbc-connection-manager.png%22%20alt%3D%22odbc-connection-manager.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%225%22%3E%0A%3CLI%3EExecute%20package%20successfully%20in%20Visual%20Studio.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%20start%3D%226%22%3E%0A%3CLI%3EDeploy%20project%20to%20SSIS%20in%20Azure%20Data%20Factory.%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22deploy-ssis-adf.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F207158i5C9728E905E34CD2%2Fimage-size%2Fmedium%3Fv%3D1.0%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22deploy-ssis-adf.png%22%20alt%3D%22deploy-ssis-adf.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSPAN%20style%3D%22font-family%3A%20inherit%3B%22%3E%3CBR%20%2F%3E7.%20Author%20data%20factory%20pipeline%20with%20execute%20SSIS%20package%20activity%2C%20input%20password%20in%20connection%20manager%20parameter.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22adf-execute-ssis-package-activity.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F207164i3F7097FABD9266F8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22adf-execute-ssis-package-activity.png%22%20alt%3D%22adf-execute-ssis-package-activity.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E8.%20Execute%20data%20factory%20pipeline.%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3E%3CSTRONG%3EKnown%20limitation%3A%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%20class%3D%22lia-indent-padding-left-30px%22%3EWhen%20writing%20to%20destination%20table%20which%20has%20the%20Always%20encrypted%20column%2C%20it%20requires%20more%20than%20double%20the%20size%20of%20the%20source%20column%2C%20if%20it%20is%20of%20the%20same%20size%20as%20the%20source%20it%20gives%20error.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1538602%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20tutorial%20walks%20you%20through%20the%20process%20on%20how%20to%20load%26nbsp%3Bdata%26nbsp%3Bfrom%26nbsp%3BAlways%26nbsp%3BEncrypted%26nbsp%3Benabled%26nbsp%3BAzure%26nbsp%3BSQL%26nbsp%3Bdatabase%26nbsp%3Busing%20SQL%26nbsp%3BServer%26nbsp%3BIntegration%26nbsp%3BServices%26nbsp%3B(SSIS)%26nbsp%3Bin%26nbsp%3BAzure%26nbsp%3BData%26nbsp%3BFactory.%3C%2FP%3E%3C%2FLINGO-TEASER%3E
Microsoft

This tutorial walks you through the process on how to load data from Always Encrypted enabled Azure SQL database using SQL Server Integration Services (SSIS) in Azure Data Factory.  

 

Azure-SSIS integration runtime has built-in Microsoft ODBC Driver 13 for SQL Server. In this tutorial, we use SSIS ODBC source with Microsoft ODBC Driver 13 to load data from Azure SQL database with Always Encrypted enabled using Azure Key Vault. Details about ODBC driver setup, refer to using Always Encrypted with the ODBC Driver for SQL Server via Azure Key Vault built-in  keystore provider.

 

  1. Follow the steps to configure Always Encrypted by using Azure Key Vault , Column Master Key (CMK) is now stored in Azure Key Vault.

 

  1. Enable client application access to get the Application (client) ID and client secrete.

app-application-client-id.png

 

app-client-secrete.png

 

3. Grant the client application proper permissions (get, unwrapKey, and verify) in the Azure Key Vault.

app-akv-access-policy.png

 

  1. Create simple SSIS package in Visual Studio 2017 that uses an ODBC source and a flexible file destination. Configure connection string like below:

DRIVER={ODBC Driver 13 for SQL Server};SERVER= <EnterYourServer.database.windows.net>;uid=<myuser>; DATABASE=<mydatabase>;ColumnEncryption=Enabled;KeyStoreAuthentication=KeyVaultClientSecret; KeyStorePrincipalId=<Application (client) ID>;KeyStoreSecret=\<client secrete>

Note:

Surround the value with { } when there are [ ] { ( ) , ; ? * = ! @ characters in the client secrete, and manually escape the interior } with a second }.

Example:

keystoresecret={)#|;_=&*{+>*-.&)$8?%}}|S|_^?|*=?.;o==_#-QA=&%};

odbc-connection-manager.png

 

  1. Execute package successfully in Visual Studio.

 

  1. Deploy project to SSIS in Azure Data Factory.

deploy-ssis-adf.png


7. Author data factory pipeline with execute SSIS package activity, input password in connection manager parameter.

adf-execute-ssis-package-activity.png

 

8. Execute data factory pipeline.

 

Known limitation:

When writing to destination table which has the Always encrypted column, it requires more than double the size of the source column, if it is of the same size as the source it gives error.