SQL Server 2008 - Removing Schema Owner

I just created a new web application that accepts a form-based input from a user and inserts it 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 

Thinking about it, I realized that the user does not need to be part of the db_datareader role, because the user only inserted data into the database and never read it. So I came back and removed the db_datareader role and noticed that the circuit parameters were grayed out. I could not remove the user from the db_datareader schema db_datareader .

How do you go about removing a user from owning a particular scheme? Should I even assign ownership of the scheme in the first place?

I am registered as an administrator of SQL Server and Windows 7.

+4
source share
2 answers

No, you should not assign the user rights to the scheme. You just had to make the user a member of the scheme. Return ownership of the dbo and verify that the user account is not yet a member of the schema.

+5
source

I had the same problem today and found a way to remove the user as the owner of the scheme. Open the node diagram below Security in the database and change the owner for the user that you mistakenly used with the default owner. For example, if any oddball username is specified as the owner of the schema for db_datareader, change it to db_reader and so on.

+11
source

Source: https://habr.com/ru/post/1342352/


All Articles