Hi @ Nathan Allan
Shrink is currently in preview mode and has the following limitations:
- Shrink is not allowed on unencrypted databases. Any such attempt raises the following error:
_Msg 49532, Level 16, State 1, Line 1
_DBCC SHRINKFILE for data files is not supported in a Hyperscale database when the database is not encrypted. Enable transparent data encryption and try again.
To find the encryption state of the database, execute the following query:
SELECT db_name(database_id) AS 'database_name'
,encryption_state_desc
FROM sys.dm_database_encryption_keys
WHERE database_id = db_id()
If encryption state is other than ENCRYPTED
then shrink will not start.
You can enable encryption on the database using this : https://learn.microsoft.com/en-us/azure/azure-sql/database/transparent-data-encryption-tde-overview?view=azuresql&tabs=azure-portal
If this answers your query, do click Accept Answer and Upvote for was this answer helpful.