Reputation: 31
We have created a sql server database in RDS. This was then restored from a 500Gb .bak backup.
I can login to the sql instance with the admin user I setup in RDS, but can not access the database at all
[42000] [FreeTDS][SQL Server]The server principal "db-user" is not able to access the database "db-name" under the current security context. (916), Time: 0.000000s
Since its RDS I do not have the sysadmin role and I can't even run "use db-name"
How do I create/add a login to this database so that I can read it
Upvotes: 3
Views: 3479
Reputation: 1105
I also go this error. Spent quit a long time on it. In the end got it resolved by just updating password for Master DB Instance. Strange but it worked.
Upvotes: 1
Reputation: 13
You should be able to access any database on your RDS instance with the Master User Account. Then you can add the necessary permissions to your user or the application account. https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/UsingWithRDS.MasterAccounts.html
Upvotes: 0