Skip to content

Commit e218789

Browse files
Update always-encrypted-wizard-ssms-21.md (#33931)
--------- Co-authored-by: Masha Thomas (MSFT) <[email protected]>
1 parent 83dddd4 commit e218789

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/relational-databases/security/encryption/always-encrypted-wizard-ssms-21.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,22 @@ Use the online approach:
130130

131131
- To minimize the downtime/unavailability of the database to your applications.
132132

133+
## Post migration
134+
135+
Clear the plan cache for all batches and stored procedures that access the table to refresh parameters encryption information.
136+
137+
```sql
138+
ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE;
139+
```
140+
141+
> [!NOTE]
142+
> If you don't remove the plan for the impacted query from the cache, the first execution of the query after encryption might fail.
143+
>
144+
> Use `ALTER DATABASE SCOPED CONFIGURATION CLEAR PROCEDURE_CACHE` or `DBCC FREEPROCCACHE` to clear the plan cache carefully, as it can result in temporary query performance degradation. To minimize the negative impact of clearing the cache, you can selectively remove the plans for only the impacted queries.
145+
146+
Call [sp_refresh_parameter_encryption](../../system-stored-procedures/sp-refresh-parameter-encryption-transact-sql.md) to update the metadata for the parameters of each module (stored procedure, function, view, trigger) that are persisted in [sys.parameters](../..//system-catalog-views/sys-parameters-transact-sql.md) and may have been invalidated by encrypting the columns.
147+
148+
133149
## Related content
134150

135151
- [Always Encrypted](../../../relational-databases/security/encryption/always-encrypted-database-engine.md)

0 commit comments

Comments
 (0)