Preparing to downgrade

If you have not already prepared your server for downgrade by following the steps in either “Downgrading from Adaptive Server 15.0.2 to 15.0 GA or 15.0 ESD #1” or “Downgrading from 15.0.2 Adaptive Server to 15.0 ESD#2 or later”, running sp_downgrade 'prepare' may produce one or more of several messages. For example, running:

sp_downgrade 'prepare', '15.0'

Return this output:

Encrypted Columns Item          Required  Action
-----------------------------   ------------------------
master                          Revoke keycustodian_role from user
testdb.dbo.v4.col2              Alter table to drop decrypt default
testdb.dbo.v4.col2              Alter table to decrypt column

Table 2-4 shows the encrypted columns functionality that causes the error message, along with the action you must take in one or more databases to prepare your system for downgrade.

Table 2-4: sp_downgrade error messages

Downgrading to version:

Encrypted columns conditions being checked

Error message output

Action to perform

15.0.1

Existence of key copies in any database

"Alter key to drop key copy"

Run alter encryption key...drop encryption ... for user to drop key copies of the named keys.

15.0.1

Existence of recovery key copy in any database

"Alter key to drop key recovery"

Run alter encryption key...drop encryption ... for recovery to drop recovery copies of the named keys.

15.0.1

Keys encrypted by user-specified password

"Alter key to encrypt by system encryption password"

Use alter encryption key...modify encryption to change the named keys for encryption by system encryption password.

15.0 or 15.0.1

Existence of permissions granted to keycustodian_role

"Revoke privileges from role"

Use revoke command to revoke privileges granted to keycustodian_role in the named database.

15.0 or 15.0.1

keycustodian_role granted to user

"Revoke keycustodian_role from user"

Use revoke command to revoke keycustodian_role from users in named database.

15.0 or 15.0.1

System encryption password longer than 64 bytes

"Reset system encryption password with length <= 64 bytes"

Use sp_encryption to change the system encryption password to one that less than or equal to 64 bytes long.

15.0 or 15.0.1

Existence of decrypt_default property on a column

"Alter table to drop decrypt default"

Use alter table ... replace to remove the decrypt default property form the named column.

15.0 or 15.0.1

Setting of restricted decrypt permission configuration parameter.

"Turn off the configuration parameter resticted decrypt permission"

Use sp_configure to set restricted decrypt permission to 0

15.0 or 15.0.1

Presence of encrypted columns

"Alter table to decrypt column"

Use alter table .. modify to decrypt named column. For 15.0.2 you are asked to decrypt only those columns whose type is not supported for encryption in 15.0.1.

You can run sp_downgrade 'prepare' as many times as is necessary to validate that you have reduced the encrypted columns functionality to the required level. When sp_downgrade detects that all column encryption items have been addressed for the specified downgrade version, it prints the message "There are no errors, databases are ready for downgrade."