SQL Server 2008 - 删除架构所有权 [英] SQL Server 2008 - Removing schema ownership

查看:44
本文介绍了SQL Server 2008 - 删除架构所有权的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚创建了一个新的 Web 应用程序,它接受来自用户的某种基于表单的输入并将其插入到数据库中.为此,我在数据库中创建了一个新用户,并最初为该用户分配了两个角色和架构......

I just created a new web application that accepts some form based input from the user and inserts it in into the database. To go along with this I created a new user in the database and initially assigned the user to two roles and schemas ...

db_datareader
db_datawriter

经过深思熟虑后,我意识到用户不需要成为 db_datareader 角色的一部分,因为用户只将数据插入到数据库中而从不读取任何数据.因此,我返回并删除了 db_datareader 的角色,并注意到模式选项变灰了.我无法从 db_datareader 的架构所有权中删除用户.

After thinking things over I realized the user did not need to be part of the db_datareader role because the user only inserted data into the database and never read any. So I went back and removed the role of db_datareader and noticed that the schema options were grayed out. I could not remove the user from schema ownership of db_datareader.

如何从特定架构的所有权中删除用户?我应该首先分配架构所有权吗?

How does one go about removing a user from ownership of a specific schema? Should I have even assigned schema ownership in the first place?

我以 SQL Server 和 Windows 7 操作系统的管理员身份登录.

I am logged in as administrator of the SQL Server and of the Windows 7 OS.

推荐答案

不,您不应该将架构的所有权分配给用户.您应该刚刚使用户成为架构的成员.将所有权恢复给 dbo 并检查用户帐户是否仍然是架构的成员.

No, you shouldn't have assigned ownership of the schema to the user. You should have just made the user a member of the schema. Revert ownership to dbo and check that the user account is not still a member of the schema.

这篇关于SQL Server 2008 - 删除架构所有权的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆