为SQL Server中的db_owner用户选择拒绝权限

时间:2022-01-17 12:43:44

Using SQL Server 2008. I created a new database, created a new user and mapped the user to the same login name. Gave the user all the roles available including db_owner.

使用SQL Server 2008.我创建了一个新数据库,创建了一个新用户并将用户映射到相同的登录名。为用户提供所有可用角色,包括db_owner。

The user created a new table but when the user tried to select from the table, an error "The SELECT permission was denied on the object ...." showed up.

用户创建了一个新表,但是当用户尝试从表中进行选择时,出现错误“对象上的SELECT权限被拒绝....”。

Why doesn't the user have select permission if the user is member of the db_owner and db_datareader roles?

如果用户是db_owner和db_datareader角色的成员,为什么用户没有select权限?

I recall this used to work before.

我记得以前曾经这样做过。

1 个解决方案

#1


MOst likely the user isn't actually the DBO. Check the table name is [dbo].[tablename] and that the user actually is the dbo.

MOst可能用户实际上不是DBO。检查表名是[dbo]。[tablename],用户实际上是dbo。

Actually - More information about the error would be nice. Cause you usually have select access to tables you have created.

实际上 - 有关错误的更多信息会很好。因为您通常可以选择访问您创建的表。

Are there any deny permissions set?

是否设置了拒绝权限?

#1


MOst likely the user isn't actually the DBO. Check the table name is [dbo].[tablename] and that the user actually is the dbo.

MOst可能用户实际上不是DBO。检查表名是[dbo]。[tablename],用户实际上是dbo。

Actually - More information about the error would be nice. Cause you usually have select access to tables you have created.

实际上 - 有关错误的更多信息会很好。因为您通常可以选择访问您创建的表。

Are there any deny permissions set?

是否设置了拒绝权限?