I ran the same queries and it worked for me. Are you able to connect to the DB from SSMS? Ensure you specify the DB name as shown below
----------
Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have created a contained user in a database as follows:
CREATE USER devowner WITH PASSWORD = N'wombat'
And added it to dbowner role:
ALTER ROLE db_owner ADD MEMBER devowner;
But when trying to login, either via SSMS or sqlcmd, i get the error:
I am specifying the correct database in SSMS and in the connection string for sqlcommand.
If I create a login, and then a user associated with the login, I can connect just fine. But the contained user cannot login.
I have also tried GRANT CONNECT to the user, but it has not helped.
What am I missing?
Thanks
I ran the same queries and it worked for me. Are you able to connect to the DB from SSMS? Ensure you specify the DB name as shown below
----------
Please don't forget to Accept Answer and Up-vote if the response helped -- Vaibhav