问题:
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?