SQL Server--What is the db_datreader/db_datawriter/db_owner/... "Schema" Useage?

Posted by: bart30508 | in SQL Server | 1 year, 7 months ago |

SQL Server--What is the db_datreader/db_datawriter/db_owner/... "Schema" Useage?

只是為了可以向下兼容之前的SQL Server版本.

對於新版SQL Server沒有用途, 效果與dbo一樣

不過, 使用這些Schema意味著還將附加帶有隱藏的權限

Those default schemas such as db_datareader, db_datawriter etc. are for backwards compatibility reasons.

In SQL Server 2000, schema is as the same as the user and the schema must be created by the corresponding user.

So if migrated from 2000, it must be match each other otherwise there is an error.

But the schema and fixed roles are not necessary to be there.

The database fixed roles such as “db_datareader” are owned by dbo.

But the schemas are ownded by corresponding roles. Both of the above are re-configurable.

“db_datareader” and “db_datawriter” can perform SELECT/INSERT/DELETE/UPDATE operation on any table or view with any schema which due to “Implicit Permissions” of fixed roles.

But in SSMS, for an user with db_datareader role, he can only view the tables/views with the schema db_datareader or dbo or other schemas owned by db_datareader or dbo or the user itself.



tags: SQL Server
Currently unrated


* indicates required

Recent Posts




Apache 1

Data Science 2

Dbfit 1

Design Pattern 1

Devops 4

DigitalOcean 1

Django 1

English 3

Excel 5

Flask 3

Git 1

HackMD 1

Heroku 1

Html/Css 1

Linux 4

Machine Learning 2

Manufacture 1

Mezzanine 18

Oracle 1

Postgresql 7

PowerBI 4

Powershell 4

Python 21


SQL Server 52

SQLite 1

Windows 1

database 8

work-experience 1

其他 1

自我成長 1

資料工程 1


SEO(1) Github(2) Title Tag(2) ML(1) 李宏毅(1) SQL Server(18) Tempdb(1) SSMS(1) Windows(1) 自我成長(2) Excel(1) python Flask(1) python(5) Flask(2)


bart30508 (147)


RSS / Atom

SQL Server--What is the db_datreader/db_datawriter/db_owner/... "Schema" Useage?

© COPYRIGHT 2011-2022. Max的文藝復興. ALL RIGHT RESERVED.