Ócáid
Mar 31, 11 PM - Apr 2, 11 PM
An ócáid foghlama SQL, Fabric and Power BI is mó. Márta 31 – 2 Aibreán. Bain úsáid as cód FABINSIDER chun $ 400 a shábháil.
Cláraigh inniuNí thacaítear leis an mbrabhsálaí seo a thuilleadh.
Uasghrádú go Microsoft Edge chun leas a bhaint as na gnéithe is déanaí, nuashonruithe slándála, agus tacaíocht theicniúil.
Applies to:
SQL Server
Azure SQL Database
Azure SQL Managed Instance
A data-tier application (DAC) package, also known as a DACPAC, is a portable unit of SQL Server database deployment that defines all of the SQL Server objects, including tables and columns inside the tables. When you publish a DACPAC to a database (when you upgrade a database using a DACPAC), the schema of the target database gets update to match the schema in the DACPAC. You can publish a DACPAC using the Upgrade Data-tier Application Wizard in SQL Server Management Studio, PowerShell, or sqlpackage.
This article addresses special considerations for upgrading a database when the DACPAC or/and the target database contains columns protected with Always Encrypted. If the encryption scheme for a column in the DACPAC differs from the encryption scheme for an existing column in the target database, publishing the DACPAC results in encrypting, decrypting, or re-encrypting the data stored in the column. See the below table for details.
Condition | Action |
---|---|
The column is encrypted in the DACPAC and it isn't encrypted in the database. | The data in the column will be encrypted. |
The column isn't encrypted in the DACPAC and it's encrypted in the database. | The data in the column will be decrypted (the encryption will be removed for the column). |
The column is encrypted both in the DACPAC and the database, but the column in the DACPAC uses a different encryption type or/and a different column encryption key than the corresponding column in the database. | The data in the column will be decrypted and then re-encrypted to match the encryption configuration in the DACPAC. |
Deploying a DAC package may also result in creating or removing metadata objects for column master keys or column encryption keys for Always Encrypted.
To perform cryptographic operations, a tool you use to deploy a DACPAC needs to move the data out of the database. The tool creates a new table (or tables) with the desired encryption configuration in the database, loads all data from the original tables, performs the requested cryptographic operations, uploads the data to the new table(s), and then swaps the original table(s) with the new table(s). Running cryptographic operations can take a long time. During that time, your database is not available to write transactions.
Nóta
If you are using SQL Server 2019 (15.x) and your SQL Server instance is configured with a secure enclave, you can run cryptographic operations in-place, without moving data out of the database. See Configure column encryption in-place using Always Encrypted with secure enclaves. Note that in-place encryption is not available for DACPAC deployments.
To publish DAC package if Always Encrypted is set up in the DACPAC or/and in the target database, you might need some or all of the below permissions, depending on the differences between the schema in the DACPAC and the target database schema.
ALTER ANY COLUMN MASTER KEY, ALTER ANY COLUMN ENCRYPTION KEY, VIEW ANY COLUMN MASTER KEY DEFINITION, VIEW ANY COLUMN ENCRYPTION KEY DEFINITION
If the upgrade operation triggers a data encryption operation, you also need key store permissions to access and use your column master key. For detailed information on key store permissions, go to Create and store column master keys for Always Encrypted and find a section relevant for your key store.
Ócáid
Mar 31, 11 PM - Apr 2, 11 PM
An ócáid foghlama SQL, Fabric and Power BI is mó. Márta 31 – 2 Aibreán. Bain úsáid as cód FABINSIDER chun $ 400 a shábháil.
Cláraigh inniuOiliúint
Deimhniú
Microsoft Certified: Azure Database Administrator Associate - Certifications
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.
Doiciméadúchán
Create & store column master keys for Always Encrypted - SQL Server
Learn how to select a key store and create column master keys for SQL Server Always Encrypted.
Configure column encryption using Always Encrypted Wizard - SQL Server
Learn how to set the Always Encrypted configuration for database columns by using the Always Encrypted Wizard in SQL Server.
Provision Always Encrypted keys using SQL Server Management Studio - SQL Server
Learn how to provision column master keys and column encryption keys for Always Encrypted using SQL Server Management Studio.