aws rds instance not allowing to use model database

0

we have configure aws rds with microsoft sql server.

when we try to access model db,it throws error as "The server principal "name" is not able to access the database "model" under the current security context." we can see model db is present on system and it is online, still it is not accessible for user.

does aws rds itself lock model db for any security reason?? or there is no lock on model db and it is due to incomplete installation??

please help with this.

  • Hi lakhan.

    Which user is it the one you are using? Is it the master user created when the RDS instance was created? Also, is this an Managed or Custom RDS for SQL Server?

    Thanks.

  • Hi Jose, Thanks for responding. for any user it throw same error, i have checked this with sa(service account) user and also with custom user. I am not able to view model db in sql server studio,its is present and online when I checked with sql query. but not able to use it.

  • Hi,

    I am also not able to access the model database. did you find any solution for this issue?

1 Answer
0
Accepted Answer

Hello lakhan,

I can see that you are facing the error message “The server principal "name" is not able to access the database "model" under the current security context” while modeldb is online and is not accessible for any of the user as seen from your latest update and you need some insights regarding the same.

=================

From the latest update on the re:Post I can see you are facing this issue with service account user and other custom user as well. Firstly, Based on the error message it indicates that the user do not have enough permissions to access the ‘model’ database. However, you are facing this issue even on the master user.

To begin with, There could be a possibility that the database was created from another SQL account due to which even the master user does not possess the required permission. With that said, in-order to regain the access to these databases via master account, I would suggest you to reset the master password.

When you set (or change) your master user password for an instance, the master user is automatically added to the db_owner role of all user databases. Password reset will make sure to re-assign any missing database access permissions to the master user. Please follow the following steps to reset the master user password.

=> Open the Amazon RDS console.

=> Select Instances.

=> Select the DB instance, open the Instance Actions menu, and then choose Modify.

=> Type the master user password you want to use in the New Master Password field.

Note: The change is applied asynchronously, as soon as possible, and this change ignores the Apply Immediately setting.

=> Choose Continue, and then choose Modify DB Instance.

Note: Before the process of resetting the master user account, please ensure you have closed SQL Server Management Studio. Once DB instance is available, start SQL Server Management Studio again and retry accessing the database.

[+] : You can also check the video on this link for more guidance : https://aws.amazon.com/premiumsupport/knowledge-center/reset-master-user-password-rds/

Moreover, It looks like a documented issue which can be found in the following Microsoft SQL Server documentation-

[+] : https://learn.microsoft.com/en-us/sql/relational-databases/errors-events/mssqlserver-916-database-engine-error?view=sql-server-ver15

You can follow the ’User Action’ steps mentioned in the above documentation which will help you to grant the specific login access to the named databases.

I hope that the above information was quite helpful. Have a great day ahead!

AWS
answered 8 months ago
profile pictureAWS
EXPERT
reviewed 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions