TransWikia.com

RDS MSSQL in-place upgrade how to update master db compatibility level when rdsa account is db owner

Database Administrators Asked by dev_etter on October 28, 2021

Background

  1. My workplace infrastructure team ran a typical in-place upgrade of an RDS MSSQL instance to update the version from 2012 to 2017.
  2. After the upgrade, while logged in as the "master user", I was able to update all user and system databases to 2017 compatibility level except for master and rdsadmin. (I’m not worried about the latter.)
  3. Keeping the master database at 2012 compatibility level concerns me.

Is it recommended that I also update the compatibility level of the master database to 2017? I presume that leaving it at the 2012 level means that I’d be sacrificing some functionality. (I opened a github issue with Microsoft’s documentation for clarification.)
(Related question but not quite close enough to my scenario.)

If that is a yes, here is my problem

I cannot change the compatibility level of master. The "master user" assigned to this RDS instance is not the db owner for the master database. The db owner of the master database is rdsa, which as you’re probably aware, is a disabled AWS sysadmin user that I cannot utilize.

Troubleshooting

  1. I tried running
ALTER DATABASE master
SET COMPATIBILITY_LEVEL = 140;

But I got this error

User does not have permission to alter database 'master', the database does not exist, or the database is not in a state that allows access checks. 

This makes sense. The "master user" that I am logged in as is not the db_owner of the master database.

  1. Next, I asked the infrastructure team to reset the Master User password.
    According to these links, resetting the password should reset anything wrong with the db_owner role:

Unfortunately, this didn’t change the db_owner of master. It was still rdsa. I rebooted the instance just in case and got the same results.

  1. Then I tried adding the "master user" account as dbo in the master database.
USE [master]
GO

CREATE USER [mymasteruser] FOR LOGIN [mymasteruser]
GO

USE [master]
GO

ALTER ROLE [db_owner] ADD MEMBER [mymasteruser]
GO

That didn’t work either, as expected.

User does not have permission to perform this action.

Help

Are there other steps on the configuration side that I can try? That side of things is a bit of a black box for me so any insight is appreciated.

My next step is to contact AWS support.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP