search
HomeDatabaseMysql Tutorialsql server角色成员身份权限

sql server角色成员身份权限

Jun 07, 2016 pm 03:07 PM
serversqlrightmemberPermissionsRoleidentity

各个 角色 是对应不同 权限 的,sql server中有很多 权限 ,可以把这些 权限 组合或单独赋给各个 角色 ,从而使不同 角色 的用户的 权限 不同,你列出的都是内置 角色 。你看看下面这些对你有没有帮助,希望你解决你的问题。 为便于管理数据库中的 权限 ,SQ

各个角色是对应不同权限的,sql server中有很多权限,可以把这些权限组合或单独赋给各个角色,从而使不同角色的用户的权限不同,你列出的都是内置角色。你看看下面这些对你有没有帮助,希望你解决你的问题。

为便于管理数据库中的权限,SQL Server 提供了若干“角色”,这些角色是用于分组其他主体的安全主体。它们类似于 Microsoft Windows 操作系统中的组。数据库级角色权限作用域为数据库范围。

SQL Server 中有两种类型的数据库级角色:数据库中预定义的“固定数据库角色”和您可以创建的“灵活数据库角色”。

固定数据库角色是在数据库级别定义的,并且存在于每个数据库中。db_owner 和 db_securityadmin 数据库角色成员可以管理固定数据库角色成员身份。但是,只有 db_owner 数据库角色成员能够向 db_owner 固定数据库角色中添加成员。msdb 数据库中还有一些特殊用途的固定数据库角色

您可以向数据库级角色中添加任何数据库帐户和其他 SQL Server 角色。固定数据库角色的每个成员都可向同一个角色添加其他登录名。

重要提示:

请不要将灵活数据库角色添加为固定角色成员。这会导致意外的权限升级。

下表显示了固定数据库级角色及其能够执行的操作。所有数据库中都有这些角色

数据库级别的角色名称及说明

db_owner 固定数据库角色成员可以执行数据库的所有配置和维护活动,还可以删除数据库。

db_securityadmin 固定数据库角色成员可以修改角色成员身份和管理权限。向此角色中添加主体可能会导致意外的权限升级。

db_accessadmin 固定数据库角色成员可以为 Windows 登录名、Windows 组和 SQL Server 登录名添加或删除数据库访问权限

db_backupoperator 固定数据库角色成员可以备份数据库。

db_ddladmin 固定数据库角色成员可以在数据库中运行任何数据定义语言 (DDL) 命令。

db_datawriter 固定数据库角色成员可以在所有用户表中添加、删除或更改数据。

db_datareader 固定数据库角色成员可以从所有用户表中读取所有数据。

db_denydatawriter 固定数据库角色成员不能添加、修改或删除数据库内用户表中的任何数据。

db_denydatareader 固定数据库角色成员不能读取数据库内用户表中的任何数据。

有关数据库级固定角色权限的特定信息,请参阅固定数据库角色权限(数据库引擎)。

msdb 角色 msdb 数据库中包含下表显示的特殊用途的角色

msdb 角色名称及说明

db_ssisadmin
db_ssisoperator
db_ssisltduser
这些数据库角色成员可以管理和使用 SSIS。从早期版本升级的 SQL Server 实例可能包含使用 Data Transformation Services (DTS)(而不是 SSIS)命名的旧版本角色。有关详细信息,请参阅 使用 Integration Services 角色

dc_admin
dc_operator
dc_proxy
这些数据库角色成员可以管理和使用数据收集器。有关详细信息,请参阅数据收集器的安全性。

PolicyAdministratorRole
db_ PolicyAdministratorRole 数据库角色成员可以对基于策略的管理策略和条件执行所有配置和维护活动。有关详细信息,请参阅使用基于策略的管理来管理服务器。

ServerGroupAdministratorRole
ServerGroupReaderRole
这些数据库角色成员可以管理和使用注册的服务器组。有关详细信息,请参阅创建服务器组。

重要提示:

db_ssisadmin 角色和 dc_admin 角色成员也许可以将其权限提升到 sysadmin。之所以会发生此权限提升,是因为这些角色可以修改 Integration Services 包,而 SQL Server 可以使用 SQL Server 代理的 sysadmin 安全上下文来执行 Integration Services 包。若要防止在运行维护计划、数据收集组和其他 Integration Services 包时出现此权限提升,请将运行包的 SQL Server 代理作业配置为使用拥有有限权限的代理帐户,或只将 sysadmin 成员添加到 db_ssisadmin 和 dc_admin 角色

使用服务器级角色

下表说明了用于服务器级角色的命令、视图和函数。

功能 类型 说明

sp_helpdbfixedrole (Transact-SQL)   →  元数据   →  返回固定数据库角色的列表。
sp_dbfixedrolepermission (Transact-SQL)   →  元数据   →  显示固定数据库角色权限
sp_helprole (Transact-SQL)   →  元数据   →  返回当前数据库中有关角色的信息。
sp_helprolemember (Transact-SQL)   →  元数据   →  返回有关当前数据库中某个角色成员的信息。
sys.database_role_members (Transact-SQL)   →  元数据   →  为每个数据库角色的每个成员返回一行。
IS_MEMBER (Transact-SQL)   →  元数据   →  指示当前用户是否为指定 Microsoft Windows 组或 Microsoft SQL Server 数据库角色成员
CREATE ROLE (Transact-SQL)   →  命令   →  在当前数据库中创建新的数据库角色
ALTER ROLE (Transact-SQL)   →  命令   →  更改数据库角色的名称。
DROP ROLE (Transact-SQL)    →  命令从数据库中删除角色
sp_addrole (Transact-SQL)   →  命令   →  在当前数据库中创建新的数据库角色
sp_droprole (Transact-SQL)   →  命令   →  从当前数据库中删除数据库角色
sp_addrolemember (Transact-SQL)   →  命令   →  为当前数据库中的数据库角色添加数据库用户、数据库角色、Windows 登录名或 Windows 组。
sp_droprolemember (Transact-SQL)   →  命令   →  从当前数据库的 SQL Server 角色中删除安全帐户。
public 数据库角色

每个数据库用户都属于 public 数据库角色。如果未向某个用户授予或拒绝对安全对象的特定权限时,该用户将继承授予该对象的 public 角色权限

来源:转载
版权声明:请尊重原作者的版权,转载请注明作者、出处。
本文链接地址:http://www.lao8.org/html/8/2009-7-19/2009719130148.html

本文来自: 老吧网(www.lao8.org) 详细出处参考:http://www.lao8.org/html/8/2009-7-19/2009719130148.html

 

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Explain the InnoDB Buffer Pool and its importance for performance.Explain the InnoDB Buffer Pool and its importance for performance.Apr 19, 2025 am 12:24 AM

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

MySQL vs. Other Programming Languages: A ComparisonMySQL vs. Other Programming Languages: A ComparisonApr 19, 2025 am 12:22 AM

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages ​​such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages ​​have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

Learning MySQL: A Step-by-Step Guide for New UsersLearning MySQL: A Step-by-Step Guide for New UsersApr 19, 2025 am 12:19 AM

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL: Essential Skills for Beginners to MasterMySQL: Essential Skills for Beginners to MasterApr 18, 2025 am 12:24 AM

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL: Structured Data and Relational DatabasesMySQL: Structured Data and Relational DatabasesApr 18, 2025 am 12:22 AM

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL: Key Features and Capabilities ExplainedMySQL: Key Features and Capabilities ExplainedApr 18, 2025 am 12:17 AM

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

The Purpose of SQL: Interacting with MySQL DatabasesThe Purpose of SQL: Interacting with MySQL DatabasesApr 18, 2025 am 12:12 AM

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

MySQL for Beginners: Getting Started with Database ManagementMySQL for Beginners: Getting Started with Database ManagementApr 18, 2025 am 12:10 AM

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment