The SELECT permission was denied on the object 'Users', database 'XXX', schema 'dbo'

问题:

I moved a database from SQL Server 2012 to Azure.我将数据库从 SQL Server 2012 移到 Azure。 I don't want to use the user master , so I created a user test .我不想使用用户master ,所以我创建了一个用户test This is what I did for database XXX on Azure:这是我为 Azure 上的数据库 XXX 所做的:

create user test from login test with default_schema=[dbo]
exec sp_addrolemember 'db_owner','test'

I checked, and the database objects I am interested in are all in the schema dbo .我查了一下,我感兴趣的数据库对象都在架构dbo The table Users is in the schema dbo .Users位于架构dbo

The connection string in my web project has test as the login.我的 web 项目中的连接字符串以test作为登录名。 It produces the error message:它产生错误消息:

The SELECT permission was denied on the object 'Users', database 'XXX', schema 'dbo'

What does the error message mean and what can I do to let user test access the database XXX?错误消息是什么意思,我该怎么做才能让用户test访问数据库 XXX?


解决方案:

参考: https://stackoom.com/en/question/1J7fN
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章