問題:
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?